From 1d7f8c7492d02c4d6872c35b0d87f40926200735 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 10 Jan 2025 20:13:00 +0000 Subject: [PATCH] (Commit by workflow script) Update generated documentation. --- .../generated/html_full/annotated.html | 25 +- .../generated/html_full/asio_2node_8cpp.html | 2 +- .../html_full/asio_2node_8cpp_source.html | 4 +- .../generated/html_full/asio_2node_8hpp.html | 2 +- .../html_full/asio_2node_8hpp_source.html | 12 +- .../html_full/asio_2peer__socket_8cpp.html | 2 +- .../asio_2peer__socket_8cpp_source.html | 14 +- .../html_full/asio_2peer__socket_8hpp.html | 2 +- .../asio_2peer__socket_8hpp_source.html | 10 +- .../html_full/asio_2server__socket_8cpp.html | 2 +- .../asio_2server__socket_8cpp_source.html | 8 +- .../html_full/asio_2server__socket_8hpp.html | 2 +- .../asio_2server__socket_8hpp_source.html | 8 +- .../generated/html_full/async_2util_8hpp.html | 2 +- .../html_full/async_2util_8hpp_source.html | 4 +- .../generated/html_full/async_8cpp.html | 2 +- .../html_full/async_8cpp_source.html | 2 +- .../html_full/async__file__logger_8cpp.html | 2 +- .../async__file__logger_8cpp_source.html | 8 +- .../html_full/async__file__logger_8hpp.html | 2 +- .../async__file__logger_8hpp_source.html | 4 +- .../generated/html_full/async__fwd_8hpp.html | 2 +- .../html_full/async__fwd_8hpp_source.html | 6 +- .../generated/html_full/bandwidth_8cpp.html | 2 +- .../html_full/bandwidth_8cpp_source.html | 6 +- .../generated/html_full/bandwidth_8hpp.html | 2 +- .../html_full/bandwidth_8hpp_source.html | 4 +- .../generated/html_full/basic__blob_8hpp.html | 2 +- .../html_full/basic__blob_8hpp_source.html | 10 +- .../generated/html_full/blob_8hpp.html | 2 +- .../generated/html_full/blob_8hpp_source.html | 2 +- .../generated/html_full/blob__fwd_8hpp.html | 2 +- .../html_full/blob__fwd_8hpp_source.html | 2 +- .../html_full/buffer__logger_8cpp.html | 2 +- .../html_full/buffer__logger_8cpp_source.html | 2 +- .../html_full/buffer__logger_8hpp.html | 2 +- .../html_full/buffer__logger_8hpp_source.html | 2 +- .../generated/html_full/cfg__fwd_8hpp.html | 2 +- .../html_full/cfg__fwd_8hpp_source.html | 2 +- .../html_full/cfg__manager_8cpp.html | 2 +- .../html_full/cfg__manager_8cpp_source.html | 2 +- .../html_full/cfg__manager_8hpp.html | 2 +- .../html_full/cfg__manager_8hpp_source.html | 8 +- .../html_full/cfg__manager__fwd_8hpp.html | 2 +- .../cfg__manager__fwd_8hpp_source.html | 2 +- .../html_full/checkpt__timer_8cpp.html | 2 +- .../html_full/checkpt__timer_8cpp_source.html | 6 +- .../html_full/checkpt__timer_8hpp.html | 2 +- .../html_full/checkpt__timer_8hpp_source.html | 2 +- .../generated/html_full/classbool.html | 2 +- ...er__socket_1_1security__token__t_01_4.html | 2 +- ..._distribution_3_01std_1_1size__t_01_4.html | 2 +- doc/flow_doc/generated/html_full/classes.html | 4 +- .../html_full/classflow_1_1Function.html | 4 +- ..._3_01Result_07Args_8_8_8_08_4-members.html | 2 +- ...Function_3_01Result_07Args_8_8_8_08_4.html | 10 +- ...ync_1_1Concurrent__task__loop-members.html | 2 +- ...ow_1_1async_1_1Concurrent__task__loop.html | 2 +- ..._1_1Cross__thread__task__loop-members.html | 2 +- ...1_1async_1_1Cross__thread__task__loop.html | 4 +- ...lassflow_1_1async_1_1Op__list-members.html | 2 +- .../classflow_1_1async_1_1Op__list.html | 2 +- ...egregated__thread__task__loop-members.html | 2 +- ...ync_1_1Segregated__thread__task__loop.html | 4 +- ...1_1Single__thread__task__loop-members.html | 2 +- ..._1async_1_1Single__thread__task__loop.html | 2 +- ..._1async_1_1Task__qing__thread-members.html | 2 +- ...ssflow_1_1async_1_1Task__qing__thread.html | 2 +- ...Timed__concurrent__task__loop-members.html | 2 +- ...sync_1_1Timed__concurrent__task__loop.html | 2 +- ..._concurrent__task__loop__impl-members.html | 2 +- ..._1Timed__concurrent__task__loop__impl.html | 2 +- ...d__single__thread__task__loop-members.html | 2 +- ..._1_1Timed__single__thread__task__loop.html | 2 +- ...low_1_1cfg_1_1Config__manager-members.html | 2 +- .../classflow_1_1cfg_1_1Config__manager.html | 4 +- ...1cfg_1_1Dynamic__cfg__context-members.html | 2 +- ...sflow_1_1cfg_1_1Dynamic__cfg__context.html | 2 +- ...assflow_1_1cfg_1_1Option__set-members.html | 2 +- .../classflow_1_1cfg_1_1Option__set.html | 6 +- ...w_1_1cfg_1_1Option__set__base-members.html | 2 +- ...classflow_1_1cfg_1_1Option__set__base.html | 2 +- ...fg_1_1Static__config__manager-members.html | 2 +- ...low_1_1cfg_1_1Static__config__manager.html | 2 +- ...ow_1_1error_1_1Runtime__error-members.html | 2 +- .../classflow_1_1error_1_1Runtime__error.html | 2 +- ...1_1log_1_1Async__file__logger-members.html | 2 +- ...assflow_1_1log_1_1Async__file__logger.html | 2 +- ...flow_1_1log_1_1Buffer__logger-members.html | 2 +- .../classflow_1_1log_1_1Buffer__logger.html | 2 +- ...classflow_1_1log_1_1Component-members.html | 2 +- .../classflow_1_1log_1_1Component.html | 4 +- .../classflow_1_1log_1_1Config-members.html | 2 +- .../html_full/classflow_1_1log_1_1Config.html | 6 +- ...1_1Config_1_1Atomic__raw__sev-members.html | 2 +- ..._1_1log_1_1Config_1_1Atomic__raw__sev.html | 2 +- ...ssflow_1_1log_1_1Log__context-members.html | 2 +- .../classflow_1_1log_1_1Log__context.html | 6 +- .../classflow_1_1log_1_1Logger-members.html | 2 +- .../html_full/classflow_1_1log_1_1Logger.html | 4 +- ..._1_1Ostream__log__msg__writer-members.html | 2 +- ...w_1_1log_1_1Ostream__log__msg__writer.html | 2 +- ..._1log_1_1Serial__file__logger-members.html | 2 +- ...ssflow_1_1log_1_1Serial__file__logger.html | 2 +- ...og_1_1Simple__ostream__logger-members.html | 2 +- ...low_1_1log_1_1Simple__ostream__logger.html | 2 +- ...read__local__string__appender-members.html | 2 +- ...og_1_1Thread__local__string__appender.html | 4 +- ...w_1_1log_1_1Verbosity__config-members.html | 2 +- ...classflow_1_1log_1_1Verbosity__config.html | 6 +- ...1Congestion__control__classic-members.html | 2 +- ..._flow_1_1Congestion__control__classic.html | 2 +- ...stion__control__classic__data-members.html | 2 +- ...1_1Congestion__control__classic__data.html | 2 +- ...classic__with__bandwidth__est-members.html | 2 +- ...ontrol__classic__with__bandwidth__est.html | 2 +- ...Congestion__control__selector-members.html | 2 +- ...flow_1_1Congestion__control__selector.html | 4 +- ...Congestion__control__strategy-members.html | 2 +- ...flow_1_1Congestion__control__strategy.html | 2 +- ...w_1_1net__flow_1_1Drop__timer-members.html | 2 +- ...classflow_1_1net__flow_1_1Drop__timer.html | 8 +- ...ow_1_1net__flow_1_1Event__set-members.html | 2 +- .../classflow_1_1net__flow_1_1Event__set.html | 6 +- ...et_1_1Socket__as__any__equals-members.html | 2 +- ...Event__set_1_1Socket__as__any__equals.html | 2 +- ..._set_1_1Socket__as__any__hash-members.html | 2 +- ..._1Event__set_1_1Socket__as__any__hash.html | 2 +- ...__flow_1_1Net__env__simulator-members.html | 2 +- ...w_1_1net__flow_1_1Net__env__simulator.html | 2 +- ...lassflow_1_1net__flow_1_1Node-members.html | 2 +- .../classflow_1_1net__flow_1_1Node.html | 340 +- ..._1_1net__flow_1_1Peer__socket-members.html | 2 +- ...lassflow_1_1net__flow_1_1Peer__socket.html | 292 +- ...__receive__stats__accumulator-members.html | 2 +- ...__socket__receive__stats__accumulator.html | 2 +- ..._1_1Peer__socket__send__stats-members.html | 2 +- ...et__flow_1_1Peer__socket__send__stats.html | 2 +- ...ket__send__stats__accumulator-members.html | 2 +- ...eer__socket__send__stats__accumulator.html | 2 +- ...w_1_1net__flow_1_1Port__space-members.html | 2 +- ...classflow_1_1net__flow_1_1Port__space.html | 8 +- ...1_1Send__bandwidth__estimator-members.html | 2 +- ...t__flow_1_1Send__bandwidth__estimator.html | 2 +- ...net__flow_1_1Sequence__number-members.html | 2 +- ...flow_1_1net__flow_1_1Sequence__number.html | 4 +- ...Sequence__number_1_1Generator-members.html | 2 +- ...flow_1_1Sequence__number_1_1Generator.html | 2 +- ..._1net__flow_1_1Server__socket-members.html | 2 +- ...ssflow_1_1net__flow_1_1Server__socket.html | 2 +- ..._1net__flow_1_1Socket__buffer-members.html | 2 +- ...ssflow_1_1net__flow_1_1Socket__buffer.html | 18 +- ..._1_1net__flow_1_1asio_1_1Node-members.html | 2 +- ...lassflow_1_1net__flow_1_1asio_1_1Node.html | 4 +- ..._flow_1_1asio_1_1Peer__socket-members.html | 2 +- ..._1_1net__flow_1_1asio_1_1Peer__socket.html | 2 +- ...low_1_1asio_1_1Server__socket-members.html | 2 +- ..._1net__flow_1_1asio_1_1Server__socket.html | 2 +- ...et__flow_1_1error_1_1Category-members.html | 2 +- ...low_1_1net__flow_1_1error_1_1Category.html | 4 +- ...1perf_1_1Checkpointing__timer-members.html | 2 +- ...sflow_1_1perf_1_1Checkpointing__timer.html | 4 +- ...pointing__timer_1_1Aggregator-members.html | 2 +- ...1_1Checkpointing__timer_1_1Aggregator.html | 2 +- ...ssflow_1_1util_1_1Basic__blob-members.html | 2 +- .../classflow_1_1util_1_1Basic__blob.html | 6 +- ..._1Basic__blob_1_1Deleter__raw-members.html | 2 +- ..._1util_1_1Basic__blob_1_1Deleter__raw.html | 2 +- ..._1util_1_1Basic__string__view-members.html | 2 +- ...ssflow_1_1util_1_1Basic__string__view.html | 2 +- ...l_1_1Blob__with__log__context-members.html | 2 +- ...w_1_1util_1_1Blob__with__log__context.html | 2 +- ..._1_1util_1_1Container__traits-members.html | 2 +- ...lassflow_1_1util_1_1Container__traits.html | 2 +- ...nordered__set_3_01T_01_4_01_4-members.html | 2 +- ...ost_1_1unordered__set_3_01T_01_4_01_4.html | 2 +- ...1_1map_3_01K_00_01V_01_4_01_4-members.html | 2 +- ...3_01std_1_1map_3_01K_00_01V_01_4_01_4.html | 2 +- ..._01std_1_1set_3_01T_01_4_01_4-members.html | 2 +- ...traits_3_01std_1_1set_3_01T_01_4_01_4.html | 2 +- ...h__map_3_01K_00_01V_01_4_01_4-members.html | 2 +- ...ked__hash__map_3_01K_00_01V_01_4_01_4.html | 2 +- ...00_01Hash_00_01Pred_01_4_01_4-members.html | 2 +- ...t_3_01T_00_01Hash_00_01Pred_01_4_01_4.html | 2 +- ..._1Duration__units__beautified-members.html | 2 +- ..._1util_1_1Duration__units__beautified.html | 2 +- ..._1_1util_1_1Linked__hash__map-members.html | 2 +- ...lassflow_1_1util_1_1Linked__hash__map.html | 4 +- ..._1_1util_1_1Linked__hash__set-members.html | 2 +- ...lassflow_1_1util_1_1Linked__hash__set.html | 2 +- ...ow_1_1util_1_1Null__interface-members.html | 2 +- .../classflow_1_1util_1_1Null__interface.html | 2 +- ...l_1_1Rnd__gen__uniform__range-members.html | 2 +- ...w_1_1util_1_1Rnd__gen__uniform__range.html | 2 +- ...nd__gen__uniform__range__base-members.html | 2 +- ...til_1_1Rnd__gen__uniform__range__base.html | 2 +- ...1Rnd__gen__uniform__range__mt-members.html | 2 +- ...1util_1_1Rnd__gen__uniform__range__mt.html | 2 +- ...low_1_1util_1_1Scoped__setter-members.html | 2 +- .../classflow_1_1util_1_1Scoped__setter.html | 22 +- ...1_1Shared__ptr__alias__holder-members.html | 2 +- ...1_1util_1_1Shared__ptr__alias__holder.html | 2 +- ...ow_1_1util_1_1String__ostream-members.html | 2 +- .../classflow_1_1util_1_1String__ostream.html | 4 +- ...1_1util_1_1Unique__id__holder-members.html | 2 +- ...assflow_1_1util_1_1Unique__id__holder.html | 2 +- .../generated/html_full/clock__type_8cpp.html | 2 +- .../html_full/clock__type_8cpp_source.html | 4 +- .../html_full/clock__type__fwd_8hpp.html | 2 +- .../clock__type__fwd_8hpp_source.html | 6 +- .../generated/html_full/common_8cpp.html | 2 +- .../html_full/common_8cpp_source.html | 2 +- .../generated/html_full/common_8hpp.html | 8 +- .../html_full/common_8hpp_source.html | 1195 +- .../concurrent__task__loop_8cpp.html | 2 +- .../concurrent__task__loop_8cpp_source.html | 6 +- .../concurrent__task__loop_8hpp.html | 2 +- .../concurrent__task__loop_8hpp_source.html | 8 +- .../generated/html_full/config_8cpp.html | 2 +- .../html_full/config_8cpp_source.html | 4 +- .../generated/html_full/config_8hpp.html | 2 +- .../html_full/config_8hpp_source.html | 10 +- .../config__enum__end__cpp_8macros_8hpp.html | 2 +- ...g__enum__end__cpp_8macros_8hpp_source.html | 2 +- .../config__enum__end__hdr_8macros_8hpp.html | 2 +- ...g__enum__end__hdr_8macros_8hpp_source.html | 2 +- ...config__enum__start__cpp_8macros_8hpp.html | 2 +- ..._enum__start__cpp_8macros_8hpp_source.html | 2 +- ...config__enum__start__hdr_8macros_8hpp.html | 2 +- ..._enum__start__hdr_8macros_8hpp_source.html | 2 +- .../generated/html_full/cong__ctl_8cpp.html | 2 +- .../html_full/cong__ctl_8cpp_source.html | 6 +- .../generated/html_full/cong__ctl_8hpp.html | 2 +- .../html_full/cong__ctl_8hpp_source.html | 4 +- .../html_full/cong__ctl__classic_8cpp.html | 2 +- .../cong__ctl__classic_8cpp_source.html | 2 +- .../html_full/cong__ctl__classic_8hpp.html | 2 +- .../cong__ctl__classic_8hpp_source.html | 2 +- .../cong__ctl__classic__bw_8cpp.html | 2 +- .../cong__ctl__classic__bw_8cpp_source.html | 4 +- .../cong__ctl__classic__bw_8hpp.html | 2 +- .../cong__ctl__classic__bw_8hpp_source.html | 4 +- .../html_full/cong__ctl__util_8cpp.html | 2 +- .../cong__ctl__util_8cpp_source.html | 4 +- .../html_full/cong__ctl__util_8hpp.html | 2 +- .../cong__ctl__util_8hpp_source.html | 2 +- .../html_full/detail_2async__fwd_8hpp.html | 2 +- .../detail_2async__fwd_8hpp_source.html | 2 +- .../html_full/detail_2cfg__fwd_8hpp.html | 2 +- .../detail_2cfg__fwd_8hpp_source.html | 2 +- .../html_full/detail_2common_8hpp.html | 2 +- .../html_full/detail_2common_8hpp_source.html | 2 +- .../html_full/detail_2log__fwd_8hpp.html | 2 +- .../detail_2log__fwd_8hpp_source.html | 2 +- .../detail_2net__flow__fwd_8hpp.html | 2 +- .../detail_2net__flow__fwd_8hpp_source.html | 2 +- .../html_full/detail_2util_8cpp.html | 2 +- .../html_full/detail_2util_8cpp_source.html | 4 +- .../html_full/detail_2util__fwd_8hpp.html | 2 +- .../detail_2util__fwd_8hpp_source.html | 6 +- .../html_full/dir_000000_000019.html | 2 +- .../html_full/dir_000001_000004.html | 2 +- .../html_full/dir_000001_000013.html | 2 +- .../html_full/dir_000001_000017.html | 2 +- .../html_full/dir_000001_000019.html | 2 +- .../html_full/dir_000002_000005.html | 2 +- .../html_full/dir_000002_000013.html | 2 +- .../html_full/dir_000002_000019.html | 2 +- .../html_full/dir_000003_000018.html | 2 +- .../html_full/dir_000004_000013.html | 2 +- .../html_full/dir_000004_000019.html | 2 +- .../html_full/dir_000007_000019.html | 2 +- .../html_full/dir_000008_000003.html | 2 +- .../html_full/dir_000008_000012.html | 2 +- .../html_full/dir_000008_000013.html | 2 +- .../html_full/dir_000008_000019.html | 2 +- .../html_full/dir_000011_000013.html | 2 +- .../html_full/dir_000011_000019.html | 2 +- .../html_full/dir_000012_000008.html | 2 +- .../html_full/dir_000012_000019.html | 2 +- .../html_full/dir_000013_000001.html | 2 +- .../html_full/dir_000013_000007.html | 2 +- .../html_full/dir_000013_000019.html | 2 +- .../html_full/dir_000016_000001.html | 2 +- .../html_full/dir_000016_000008.html | 2 +- .../html_full/dir_000016_000012.html | 2 +- .../html_full/dir_000016_000013.html | 2 +- .../html_full/dir_000016_000019.html | 2 +- .../html_full/dir_000017_000013.html | 2 +- .../html_full/dir_000017_000019.html | 2 +- .../html_full/dir_000018_000019.html | 2 +- .../html_full/dir_000019_000009.html | 2 +- .../html_full/dir_000019_000013.html | 2 +- .../dir_076e4717ccf31a1bda117b982e8d440f.html | 2 +- .../dir_12ed47f6ecc03f411f952cdaf2e983c4.html | 2 +- .../dir_183f5ca7bfa2ee923b1b08301562c36a.html | 2 +- .../dir_1efabf1cd0b709973fdc844b590473f2.html | 2 +- .../dir_23ec12649285f9fabf3a6b7380226c28.html | 2 +- .../dir_2e2c6296987b56cb51feb2e618f819df.html | 2 +- .../dir_32fe048265414b269410790b72c83abb.html | 2 +- .../dir_460afd45d0ec637b1427e0e06a6fbcf7.html | 2 +- .../dir_4c52cb8b55b918be67d078d7a231760a.html | 2 +- .../dir_6dd0f5e913f2b13fdf6025047ac045ce.html | 2 +- .../dir_7deb60020b604d720cf26eb7de2df042.html | 2 +- .../dir_9381a7bbd03577d6d8720c7f35c94ffa.html | 2 +- .../dir_9d19ee70020ba699428208fa42b853e3.html | 2 +- .../dir_aee2b3c67924e0eefa590b781c13db02.html | 2 +- .../dir_b5abf7709f04a6790223f09f199659e4.html | 2 +- .../dir_bf37cf39814650876b4aa4513810c0b4.html | 2 +- .../dir_c3b46db8887e8285e98d946e3c1c617e.html | 2 +- .../dir_cfb2ffb2869bbb27b7281952022eb856.html | 2 +- .../dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html | 2 +- .../dir_fc8890094717abd5fd945eea3218f11d.html | 2 +- .../html_full/doc-coding__style_8cpp.html | 2 +- .../doc-coding__style_8cpp_source.html | 6 +- .../generated/html_full/drop__timer_8cpp.html | 2 +- .../html_full/drop__timer_8cpp_source.html | 16 +- .../generated/html_full/drop__timer_8hpp.html | 2 +- .../html_full/drop__timer_8hpp_source.html | 8 +- .../html_full/dynamic__cfg__context_8hpp.html | 2 +- .../dynamic__cfg__context_8hpp_source.html | 4 +- .../generated/html_full/endpoint_8cpp.html | 2 +- .../html_full/endpoint_8cpp_source.html | 2 +- .../generated/html_full/endpoint_8hpp.html | 2 +- .../html_full/endpoint_8hpp_source.html | 2 +- .../html_full/error_2error_8cpp.html | 2 +- .../html_full/error_2error_8cpp_source.html | 4 +- .../html_full/error_2error_8hpp.html | 4 +- .../html_full/error_2error_8hpp_source.html | 4 +- .../generated/html_full/error__fwd_8hpp.html | 2 +- .../html_full/error__fwd_8hpp_source.html | 4 +- .../generated/html_full/event__set_8cpp.html | 2 +- .../html_full/event__set_8cpp_source.html | 16 +- .../generated/html_full/event__set_8hpp.html | 2 +- .../html_full/event__set_8hpp_source.html | 6 +- doc/flow_doc/generated/html_full/files.html | 2 +- .../generated/html_full/fmt_8hpp.html | 2 +- .../generated/html_full/fmt_8hpp_source.html | 2 +- .../generated/html_full/functions.html | 2 +- .../generated/html_full/functions_b.html | 2 +- .../generated/html_full/functions_c.html | 10 +- .../generated/html_full/functions_d.html | 2 +- .../generated/html_full/functions_e.html | 2 +- .../generated/html_full/functions_enum.html | 2 +- .../generated/html_full/functions_eval.html | 2 +- .../generated/html_full/functions_f.html | 2 +- .../generated/html_full/functions_func.html | 2 +- .../generated/html_full/functions_func_b.html | 2 +- .../generated/html_full/functions_func_c.html | 2 +- .../generated/html_full/functions_func_d.html | 2 +- .../generated/html_full/functions_func_e.html | 2 +- .../generated/html_full/functions_func_f.html | 2 +- .../generated/html_full/functions_func_g.html | 2 +- .../generated/html_full/functions_func_h.html | 2 +- .../generated/html_full/functions_func_i.html | 3 +- .../generated/html_full/functions_func_l.html | 2 +- .../generated/html_full/functions_func_m.html | 2 +- .../generated/html_full/functions_func_n.html | 3 +- .../generated/html_full/functions_func_o.html | 4 +- .../generated/html_full/functions_func_p.html | 2 +- .../generated/html_full/functions_func_r.html | 2 +- .../generated/html_full/functions_func_s.html | 2 +- .../generated/html_full/functions_func_t.html | 2 +- .../generated/html_full/functions_func_u.html | 2 +- .../generated/html_full/functions_func_v.html | 2 +- .../generated/html_full/functions_func_w.html | 2 +- .../generated/html_full/functions_func_z.html | 2 +- .../generated/html_full/functions_func_~.html | 2 +- .../generated/html_full/functions_g.html | 2 +- .../generated/html_full/functions_h.html | 2 +- .../generated/html_full/functions_i.html | 3 +- .../generated/html_full/functions_k.html | 2 +- .../generated/html_full/functions_l.html | 2 +- .../generated/html_full/functions_m.html | 3 +- .../generated/html_full/functions_n.html | 10 +- .../generated/html_full/functions_o.html | 6 +- .../generated/html_full/functions_p.html | 2 +- .../generated/html_full/functions_q.html | 2 +- .../generated/html_full/functions_r.html | 2 +- .../generated/html_full/functions_rela.html | 2 +- .../generated/html_full/functions_s.html | 8 +- .../generated/html_full/functions_t.html | 2 +- .../generated/html_full/functions_type.html | 12 +- .../generated/html_full/functions_u.html | 2 +- .../generated/html_full/functions_v.html | 2 +- .../generated/html_full/functions_vars.html | 3 +- .../generated/html_full/functions_vars_s.html | 2 +- .../generated/html_full/functions_vars_v.html | 2 +- .../generated/html_full/functions_w.html | 2 +- .../generated/html_full/functions_z.html | 2 +- .../generated/html_full/functions_~.html | 2 +- doc/flow_doc/generated/html_full/globals.html | 2 +- .../generated/html_full/globals_defs.html | 2 +- .../generated/html_full/graph_legend.html | 2 +- .../generated/html_full/hierarchy.html | 129 +- doc/flow_doc/generated/html_full/index.html | 2 +- .../generated/html_full/info_8cpp.html | 2 +- .../generated/html_full/info_8cpp_source.html | 6 +- .../generated/html_full/info_8hpp.html | 2 +- .../generated/html_full/info_8hpp_source.html | 8 +- .../generated/html_full/inherit_graph_54.map | 2 +- .../generated/html_full/inherit_graph_54.md5 | 2 +- .../generated/html_full/inherit_graph_54.svg | 15 +- .../generated/html_full/inherit_graph_55.map | 3 +- .../generated/html_full/inherit_graph_55.md5 | 2 +- .../generated/html_full/inherit_graph_55.svg | 33 +- .../generated/html_full/inherit_graph_56.map | 3 +- .../generated/html_full/inherit_graph_56.md5 | 2 +- .../generated/html_full/inherit_graph_56.svg | 34 +- .../generated/html_full/inherit_graph_57.map | 3 +- .../generated/html_full/inherit_graph_57.md5 | 2 +- .../generated/html_full/inherit_graph_57.svg | 32 +- .../generated/html_full/inherit_graph_58.map | 4 +- .../generated/html_full/inherit_graph_58.md5 | 2 +- .../generated/html_full/inherit_graph_58.svg | 23 +- .../generated/html_full/inherit_graph_59.map | 4 +- .../generated/html_full/inherit_graph_59.md5 | 2 +- .../generated/html_full/inherit_graph_59.svg | 23 +- .../generated/html_full/inherit_graph_60.map | 3 +- .../generated/html_full/inherit_graph_60.md5 | 2 +- .../generated/html_full/inherit_graph_60.svg | 32 +- .../generated/html_full/inherit_graph_61.map | 2 +- .../generated/html_full/inherit_graph_61.md5 | 2 +- .../generated/html_full/inherit_graph_61.svg | 17 +- .../generated/html_full/inherit_graph_62.map | 3 + .../generated/html_full/inherit_graph_62.md5 | 1 + .../generated/html_full/inherit_graph_62.svg | 23 + .../generated/html_full/inherits.html | 20 +- .../html_full/linked__hash__map_8hpp.html | 2 +- .../linked__hash__map_8hpp_source.html | 2 +- .../html_full/linked__hash__set_8hpp.html | 2 +- .../linked__hash__set_8hpp_source.html | 2 +- .../generated/html_full/log_8cpp.html | 2 +- .../generated/html_full/log_8cpp_source.html | 8 +- .../generated/html_full/log_8hpp.html | 2 +- .../generated/html_full/log_8hpp_source.html | 2 +- ...component__enum__declare_8macros_8hpp.html | 2 +- ...nt__enum__declare_8macros_8hpp_source.html | 2 +- .../generated/html_full/log__fwd_8hpp.html | 2 +- .../html_full/log__fwd_8hpp_source.html | 2 +- .../html_full/low__lvl__io_8cpp.html | 2 +- .../html_full/low__lvl__io_8cpp_source.html | 30 +- .../html_full/low__lvl__io_8hpp.html | 2 +- .../html_full/low__lvl__io_8hpp_source.html | 6 +- .../html_full/low__lvl__packet_8cpp.html | 2 +- .../low__lvl__packet_8cpp_source.html | 76 +- .../html_full/low__lvl__packet_8hpp.html | 3 +- .../low__lvl__packet_8hpp_source.html | 2904 +++-- .../namespaceboost_1_1filesystem.html | 4 +- .../html_full/namespaceboost_1_1system.html | 2 +- .../generated/html_full/namespaceflow.html | 18 +- .../html_full/namespaceflow_1_1async.html | 6 +- .../html_full/namespaceflow_1_1cfg.html | 6 +- .../html_full/namespaceflow_1_1cfg_1_1fs.html | 2 +- .../namespaceflow_1_1cfg_1_1opts.html | 2 +- .../html_full/namespaceflow_1_1error.html | 2 +- .../html_full/namespaceflow_1_1log.html | 4 +- .../html_full/namespaceflow_1_1log_1_1fs.html | 2 +- .../html_full/namespaceflow_1_1net__flow.html | 10 +- .../namespaceflow_1_1net__flow_1_1asio.html | 2 +- .../namespaceflow_1_1net__flow_1_1error.html | 4 +- .../html_full/namespaceflow_1_1perf.html | 2 +- .../html_full/namespaceflow_1_1util.html | 93 +- .../namespaceflow_1_1util_1_1bind__ns.html | 2 +- ...namespaceflow_1_1util_1_1this__thread.html | 2 +- .../generated/html_full/namespacemembers.html | 2 +- .../html_full/namespacemembers_enum.html | 2 +- .../html_full/namespacemembers_func.html | 2 +- .../html_full/namespacemembers_type.html | 2 +- .../html_full/namespacemembers_vars.html | 2 +- .../generated/html_full/namespaces.html | 21 +- .../html_full/net__env__simulator_8cpp.html | 2 +- .../net__env__simulator_8cpp_source.html | 6 +- .../html_full/net__env__simulator_8hpp.html | 2 +- .../net__env__simulator_8hpp_source.html | 4 +- .../net__flow_2error_2error_8cpp.html | 2 +- .../net__flow_2error_2error_8cpp_source.html | 6 +- .../net__flow_2error_2error_8hpp.html | 2 +- .../net__flow_2error_2error_8hpp_source.html | 4 +- .../html_full/net__flow__fwd_8hpp.html | 2 +- .../html_full/net__flow__fwd_8hpp_source.html | 4 +- .../html_full/net__flow__util_8cpp.html | 2 +- .../net__flow__util_8cpp_source.html | 4 +- .../generated/html_full/node_8cpp.html | 2 +- .../generated/html_full/node_8cpp_source.html | 40 +- .../generated/html_full/node_8hpp.html | 2 +- .../generated/html_full/node_8hpp_source.html | 162 +- doc/flow_doc/generated/html_full/op_8cpp.html | 2 +- .../generated/html_full/op_8cpp_source.html | 6 +- doc/flow_doc/generated/html_full/op_8hpp.html | 2 +- .../generated/html_full/op_8hpp_source.html | 4 +- .../generated/html_full/option__set_8cpp.html | 2 +- .../html_full/option__set_8cpp_source.html | 4 +- .../generated/html_full/option__set_8hpp.html | 2 +- .../html_full/option__set_8hpp_source.html | 12 +- .../generated/html_full/options_8cpp.html | 2 +- .../html_full/options_8cpp_source.html | 2 +- .../generated/html_full/options_8hpp.html | 2 +- .../html_full/options_8hpp_source.html | 4 +- .../ostream__log__msg__writer_8cpp.html | 2 +- ...ostream__log__msg__writer_8cpp_source.html | 2 +- .../ostream__log__msg__writer_8hpp.html | 2 +- ...ostream__log__msg__writer_8hpp_source.html | 4 +- doc/flow_doc/generated/html_full/pages.html | 2 +- .../html_full/peer__socket_8cpp.html | 2 +- .../html_full/peer__socket_8cpp_source.html | 9882 +++++++++-------- .../html_full/peer__socket_8hpp.html | 3 +- .../html_full/peer__socket_8hpp_source.html | 5439 +++++---- .../generated/html_full/perf__fwd_8hpp.html | 2 +- .../html_full/perf__fwd_8hpp_source.html | 2 +- .../generated/html_full/port__space_8cpp.html | 2 +- .../html_full/port__space_8cpp_source.html | 8 +- .../generated/html_full/port__space_8hpp.html | 2 +- .../html_full/port__space_8hpp_source.html | 4 +- .../generated/html_full/random_8hpp.html | 2 +- .../html_full/random_8hpp_source.html | 2 +- .../generated/html_full/sched__task_8cpp.html | 2 +- .../html_full/sched__task_8cpp_source.html | 6 +- .../generated/html_full/sched__task_8hpp.html | 2 +- .../html_full/sched__task_8hpp_source.html | 8 +- .../html_full/sched__task__fwd_8hpp.html | 2 +- .../sched__task__fwd_8hpp_source.html | 8 +- .../sched__task__handle__state_8cpp.html | 2 +- ...ched__task__handle__state_8cpp_source.html | 4 +- .../sched__task__handle__state_8hpp.html | 2 +- ...ched__task__handle__state_8hpp_source.html | 4 +- .../generated/html_full/search/all_11.js | 4 +- .../generated/html_full/search/all_14.js | 4 +- .../generated/html_full/search/all_2.js | 6 +- .../generated/html_full/search/all_8.js | 2 +- .../generated/html_full/search/all_a.js | 17 +- .../generated/html_full/search/all_b.js | 543 +- .../generated/html_full/search/all_c.js | 26 +- .../generated/html_full/search/all_d.js | 10 +- .../generated/html_full/search/classes_a.js | 5 +- .../generated/html_full/search/functions_8.js | 31 +- .../generated/html_full/search/functions_a.js | 4 +- .../generated/html_full/search/functions_c.js | 21 +- .../generated/html_full/search/functions_d.js | 6 +- .../generated/html_full/search/typedefs_2.js | 8 +- .../generated/html_full/search/variables_0.js | 507 +- .../segregated__thread__task__loop_8cpp.html | 2 +- ...gated__thread__task__loop_8cpp_source.html | 12 +- .../segregated__thread__task__loop_8hpp.html | 2 +- ...gated__thread__task__loop_8hpp_source.html | 8 +- .../generated/html_full/seq__num_8cpp.html | 2 +- .../html_full/seq__num_8cpp_source.html | 8 +- .../generated/html_full/seq__num_8hpp.html | 2 +- .../html_full/seq__num_8hpp_source.html | 6 +- .../html_full/serial__file__logger_8cpp.html | 2 +- .../serial__file__logger_8cpp_source.html | 4 +- .../html_full/serial__file__logger_8hpp.html | 2 +- .../serial__file__logger_8hpp_source.html | 2 +- .../html_full/server__socket_8cpp.html | 2 +- .../html_full/server__socket_8cpp_source.html | 36 +- .../html_full/server__socket_8hpp.html | 2 +- .../html_full/server__socket_8hpp_source.html | 6 +- .../shared__ptr__alias__holder_8hpp.html | 2 +- ...hared__ptr__alias__holder_8hpp_source.html | 2 +- .../simple__ostream__logger_8cpp.html | 2 +- .../simple__ostream__logger_8cpp_source.html | 2 +- .../simple__ostream__logger_8hpp.html | 2 +- .../simple__ostream__logger_8hpp_source.html | 2 +- .../single__thread__task__loop_8cpp.html | 2 +- ...ingle__thread__task__loop_8cpp_source.html | 10 +- .../single__thread__task__loop_8hpp.html | 2 +- ...ingle__thread__task__loop_8hpp_source.html | 8 +- .../html_full/socket__buffer_8cpp.html | 2 +- .../html_full/socket__buffer_8cpp_source.html | 6 +- .../html_full/socket__buffer_8hpp.html | 2 +- .../html_full/socket__buffer_8hpp_source.html | 4 +- .../html_full/socket__stats_8cpp.html | 2 +- .../html_full/socket__stats_8cpp_source.html | 2 +- .../html_full/socket__stats_8hpp.html | 2 +- .../html_full/socket__stats_8hpp_source.html | 2 +- .../html_full/static__cfg__manager_8hpp.html | 2 +- .../static__cfg__manager_8hpp_source.html | 2 +- .../html_full/string__ostream_8cpp.html | 2 +- .../string__ostream_8cpp_source.html | 2 +- .../html_full/string__ostream_8hpp.html | 2 +- .../string__ostream_8hpp_source.html | 2 +- .../html_full/string__view_8hpp.html | 2 +- .../html_full/string__view_8hpp_source.html | 2 +- ...t__flow_1_1error_1_1Code_01_4-members.html | 2 +- ...ow_1_1net__flow_1_1error_1_1Code_01_4.html | 2 +- ...dynamic__change__func__handle-members.html | 2 +- ..._1_1On__dynamic__change__func__handle.html | 2 +- ...cfg_1_1Final__validator__func-members.html | 2 +- ...flow_1_1cfg_1_1Final__validator__func.html | 2 +- ...ow_1_1cfg_1_1Null__value__set-members.html | 2 +- ...structflow_1_1cfg_1_1Null__value__set.html | 2 +- ...1Declare__options__func__args-members.html | 2 +- ...__set_1_1Declare__options__func__args.html | 2 +- ..._file__logger_1_1Log__request-members.html | 2 +- ..._1Async__file__logger_1_1Log__request.html | 2 +- ...le__logger_1_1Throttling__cfg-members.html | 2 +- ...sync__file__logger_1_1Throttling__cfg.html | 2 +- ..._1Config_1_1Component__config-members.html | 2 +- ...1_1log_1_1Config_1_1Component__config.html | 2 +- ...tflow_1_1log_1_1Msg__metadata-members.html | 2 +- .../structflow_1_1log_1_1Msg__metadata.html | 2 +- ...w_1_1net__flow_1_1Ack__packet-members.html | 2 +- ...tructflow_1_1net__flow_1_1Ack__packet.html | 22 +- ...ck__packet_1_1Individual__ack-members.html | 10 +- ...low_1_1Ack__packet_1_1Individual__ack.html | 53 +- ...packet_1_1Individual__ack__coll__graph.map | 15 +- ...packet_1_1Individual__ack__coll__graph.md5 | 2 +- ...packet_1_1Individual__ack__coll__graph.svg | 94 +- ...1Individual__ack__rexmit__off-members.html | 2 +- ...acket_1_1Individual__ack__rexmit__off.html | 8 +- ..._1Individual__ack__rexmit__on-members.html | 2 +- ...packet_1_1Individual__ack__rexmit__on.html | 8 +- ..._1_1net__flow_1_1Data__packet-members.html | 2 +- ...ructflow_1_1net__flow_1_1Data__packet.html | 20 +- ...net__flow_1_1Low__lvl__packet-members.html | 2 +- ...flow_1_1net__flow_1_1Low__lvl__packet.html | 48 +- ...lvl__packet_1_1Aux__raw__data-members.html | 2 +- ...1_1Low__lvl__packet_1_1Aux__raw__data.html | 8 +- ..._packet_1_1Packet__type__info-members.html | 2 +- ...ow__lvl__packet_1_1Packet__type__info.html | 8 +- ...t__flow_1_1Node_1_1Socket__id-members.html | 2 +- ...ow_1_1net__flow_1_1Node_1_1Socket__id.html | 2 +- ...1_1net__flow_1_1Node__options-members.html | 2 +- ...uctflow_1_1net__flow_1_1Node__options.html | 2 +- ...er__socket_1_1Individual__ack-members.html | 9 +- ...ow_1_1Peer__socket_1_1Individual__ack.html | 51 +- ...socket_1_1Individual__ack__coll__graph.map | 17 +- ...socket_1_1Individual__ack__coll__graph.md5 | 2 +- ...socket_1_1Individual__ack__coll__graph.svg | 104 +- ...r__socket_1_1Received__packet-members.html | 2 +- ...w_1_1Peer__socket_1_1Received__packet.html | 10 +- ...1Peer__socket_1_1Sent__packet-members.html | 2 +- ..._flow_1_1Peer__socket_1_1Sent__packet.html | 22 +- ...1_1Sent__packet_1_1Sent__when-members.html | 2 +- ..._socket_1_1Sent__packet_1_1Sent__when.html | 16 +- ...t__flow_1_1Peer__socket__info-members.html | 2 +- ...ow_1_1net__flow_1_1Peer__socket__info.html | 62 +- ...flow_1_1Peer__socket__options-members.html | 2 +- ...1_1net__flow_1_1Peer__socket__options.html | 42 +- ...1Peer__socket__receive__stats-members.html | 2 +- ..._flow_1_1Peer__socket__receive__stats.html | 2 +- ...net__flow_1_1Remote__endpoint-members.html | 2 +- ...flow_1_1net__flow_1_1Remote__endpoint.html | 4 +- ...w_1_1net__flow_1_1Rst__packet-members.html | 2 +- ...tructflow_1_1net__flow_1_1Rst__packet.html | 8 +- ...t__flow_1_1Send__pacing__data-members.html | 2 +- ...ow_1_1net__flow_1_1Send__pacing__data.html | 2 +- ...flow_1_1Syn__ack__ack__packet-members.html | 2 +- ...1_1net__flow_1_1Syn__ack__ack__packet.html | 12 +- ...net__flow_1_1Syn__ack__packet-members.html | 2 +- ...flow_1_1net__flow_1_1Syn__ack__packet.html | 14 +- ...w_1_1net__flow_1_1Syn__packet-members.html | 2 +- ...tructflow_1_1net__flow_1_1Syn__packet.html | 14 +- ...pointing__timer_1_1Checkpoint-members.html | 2 +- ...1_1Checkpointing__timer_1_1Checkpoint.html | 2 +- ...flow_1_1perf_1_1Duration__set-members.html | 2 +- .../structflow_1_1perf_1_1Duration__set.html | 4 +- ...flow_1_1perf_1_1Time__pt__set-members.html | 2 +- .../structflow_1_1perf_1_1Time__pt__set.html | 2 +- ...ctflow_1_1util_1_1Noncopyable-members.html | 85 + .../structflow_1_1util_1_1Noncopyable.html | 113 + ...cheduled__task__handle__state-members.html | 2 +- ...til_1_1Scheduled__task__handle__state.html | 2 +- .../html_full/task__qing__thread_8cpp.html | 2 +- .../task__qing__thread_8cpp_source.html | 6 +- .../html_full/task__qing__thread_8hpp.html | 2 +- .../task__qing__thread_8hpp_source.html | 4 +- .../thread__lcl__str__appender_8cpp.html | 2 +- ...hread__lcl__str__appender_8cpp_source.html | 2 +- .../thread__lcl__str__appender_8hpp.html | 2 +- ...hread__lcl__str__appender_8hpp_source.html | 2 +- .../timed__concurrent__task__loop_8cpp.html | 2 +- ...d__concurrent__task__loop_8cpp_source.html | 2 +- .../timed__concurrent__task__loop_8hpp.html | 2 +- ...d__concurrent__task__loop_8hpp_source.html | 8 +- .../html_full/timed__function_8hpp.html | 2 +- .../timed__function_8hpp_source.html | 2 +- .../html_full/timed__handler_8hpp.html | 2 +- .../html_full/timed__handler_8hpp_source.html | 2 +- doc/flow_doc/generated/html_full/todo.html | 2 +- .../generated/html_full/traits_8hpp.html | 2 +- .../html_full/traits_8hpp_source.html | 2 +- .../html_full/uniq__id__holder_8cpp.html | 2 +- .../uniq__id__holder_8cpp_source.html | 2 +- .../html_full/uniq__id__holder_8hpp.html | 2 +- .../uniq__id__holder_8hpp_source.html | 2 +- .../html_full/util_2detail_2util_8hpp.html | 2 +- .../util_2detail_2util_8hpp_source.html | 6 +- .../generated/html_full/util_2util_8hpp.html | 5 +- .../html_full/util_2util_8hpp_source.html | 1081 +- .../generated/html_full/util_8cpp.html | 2 +- .../generated/html_full/util_8cpp_source.html | 2 +- .../generated/html_full/util__fwd_8hpp.html | 2 +- .../html_full/util__fwd_8hpp_source.html | 38 +- .../html_full/verbosity__config_8cpp.html | 2 +- .../verbosity__config_8cpp_source.html | 4 +- .../html_full/verbosity__config_8hpp.html | 2 +- .../verbosity__config_8hpp_source.html | 2 +- .../verbosity__config__fwd_8hpp.html | 2 +- .../verbosity__config__fwd_8hpp_source.html | 2 +- .../html_full/x__thread__task__loop_8cpp.html | 2 +- .../x__thread__task__loop_8cpp_source.html | 12 +- .../html_full/x__thread__task__loop_8hpp.html | 2 +- .../x__thread__task__loop_8hpp_source.html | 8 +- .../generated/html_public/annotated.html | 21 +- .../html_public/asio_2node_8cpp.html | 2 +- .../html_public/asio_2node_8hpp.html | 2 +- .../html_public/asio_2peer__socket_8cpp.html | 2 +- .../html_public/asio_2peer__socket_8hpp.html | 2 +- .../asio_2server__socket_8cpp.html | 2 +- .../asio_2server__socket_8hpp.html | 2 +- .../html_public/async_2util_8hpp.html | 2 +- .../html_public/async__file__logger_8cpp.html | 2 +- .../html_public/async__file__logger_8hpp.html | 2 +- .../html_public/async__fwd_8hpp.html | 2 +- .../html_public/basic__blob_8hpp.html | 2 +- .../generated/html_public/blob_8hpp.html | 2 +- .../generated/html_public/blob__fwd_8hpp.html | 2 +- .../html_public/buffer__logger_8cpp.html | 2 +- .../html_public/buffer__logger_8hpp.html | 2 +- .../generated/html_public/cfg__fwd_8hpp.html | 2 +- .../html_public/cfg__manager_8cpp.html | 2 +- .../html_public/cfg__manager_8hpp.html | 2 +- .../html_public/cfg__manager__fwd_8hpp.html | 2 +- .../html_public/checkpt__timer_8cpp.html | 2 +- .../html_public/checkpt__timer_8hpp.html | 2 +- .../generated/html_public/classes.html | 4 +- ..._3_01Result_07Args_8_8_8_08_4-members.html | 2 +- ...Function_3_01Result_07Args_8_8_8_08_4.html | 2 +- ...ync_1_1Concurrent__task__loop-members.html | 2 +- ...ow_1_1async_1_1Concurrent__task__loop.html | 2 +- ..._1_1Cross__thread__task__loop-members.html | 2 +- ...1_1async_1_1Cross__thread__task__loop.html | 2 +- ...lassflow_1_1async_1_1Op__list-members.html | 2 +- .../classflow_1_1async_1_1Op__list.html | 2 +- ...egregated__thread__task__loop-members.html | 2 +- ...ync_1_1Segregated__thread__task__loop.html | 2 +- ...1_1Single__thread__task__loop-members.html | 2 +- ..._1async_1_1Single__thread__task__loop.html | 2 +- ...Timed__concurrent__task__loop-members.html | 2 +- ...sync_1_1Timed__concurrent__task__loop.html | 2 +- ..._concurrent__task__loop__impl-members.html | 2 +- ..._1Timed__concurrent__task__loop__impl.html | 2 +- ...d__single__thread__task__loop-members.html | 2 +- ..._1_1Timed__single__thread__task__loop.html | 2 +- ...low_1_1cfg_1_1Config__manager-members.html | 2 +- .../classflow_1_1cfg_1_1Config__manager.html | 2 +- ...1cfg_1_1Dynamic__cfg__context-members.html | 2 +- ...sflow_1_1cfg_1_1Dynamic__cfg__context.html | 2 +- ...assflow_1_1cfg_1_1Option__set-members.html | 2 +- .../classflow_1_1cfg_1_1Option__set.html | 2 +- ...w_1_1cfg_1_1Option__set__base-members.html | 2 +- ...classflow_1_1cfg_1_1Option__set__base.html | 2 +- ...fg_1_1Static__config__manager-members.html | 2 +- ...low_1_1cfg_1_1Static__config__manager.html | 2 +- ...ow_1_1error_1_1Runtime__error-members.html | 2 +- .../classflow_1_1error_1_1Runtime__error.html | 2 +- ...1_1log_1_1Async__file__logger-members.html | 2 +- ...assflow_1_1log_1_1Async__file__logger.html | 2 +- ...flow_1_1log_1_1Buffer__logger-members.html | 2 +- .../classflow_1_1log_1_1Buffer__logger.html | 2 +- ...classflow_1_1log_1_1Component-members.html | 2 +- .../classflow_1_1log_1_1Component.html | 4 +- .../classflow_1_1log_1_1Config-members.html | 2 +- .../classflow_1_1log_1_1Config.html | 2 +- ...ssflow_1_1log_1_1Log__context-members.html | 2 +- .../classflow_1_1log_1_1Log__context.html | 2 +- .../classflow_1_1log_1_1Logger-members.html | 2 +- .../classflow_1_1log_1_1Logger.html | 2 +- ..._1_1Ostream__log__msg__writer-members.html | 2 +- ...w_1_1log_1_1Ostream__log__msg__writer.html | 2 +- ...og_1_1Simple__ostream__logger-members.html | 2 +- ...low_1_1log_1_1Simple__ostream__logger.html | 2 +- ...w_1_1log_1_1Verbosity__config-members.html | 2 +- ...classflow_1_1log_1_1Verbosity__config.html | 2 +- ...ow_1_1net__flow_1_1Event__set-members.html | 2 +- .../classflow_1_1net__flow_1_1Event__set.html | 2 +- ...et_1_1Socket__as__any__equals-members.html | 2 +- ...Event__set_1_1Socket__as__any__equals.html | 2 +- ..._set_1_1Socket__as__any__hash-members.html | 2 +- ..._1Event__set_1_1Socket__as__any__hash.html | 2 +- ...__flow_1_1Net__env__simulator-members.html | 2 +- ...w_1_1net__flow_1_1Net__env__simulator.html | 2 +- ...lassflow_1_1net__flow_1_1Node-members.html | 2 +- .../classflow_1_1net__flow_1_1Node.html | 2 +- ..._1_1net__flow_1_1Peer__socket-members.html | 2 +- ...lassflow_1_1net__flow_1_1Peer__socket.html | 2 +- ..._1_1Peer__socket__send__stats-members.html | 2 +- ...et__flow_1_1Peer__socket__send__stats.html | 2 +- ..._1net__flow_1_1Server__socket-members.html | 2 +- ...ssflow_1_1net__flow_1_1Server__socket.html | 2 +- ..._1_1net__flow_1_1asio_1_1Node-members.html | 2 +- ...lassflow_1_1net__flow_1_1asio_1_1Node.html | 2 +- ..._flow_1_1asio_1_1Peer__socket-members.html | 2 +- ..._1_1net__flow_1_1asio_1_1Peer__socket.html | 2 +- ...low_1_1asio_1_1Server__socket-members.html | 2 +- ..._1net__flow_1_1asio_1_1Server__socket.html | 2 +- ...1perf_1_1Checkpointing__timer-members.html | 2 +- ...sflow_1_1perf_1_1Checkpointing__timer.html | 2 +- ...pointing__timer_1_1Aggregator-members.html | 2 +- ...1_1Checkpointing__timer_1_1Aggregator.html | 2 +- ...ssflow_1_1util_1_1Basic__blob-members.html | 2 +- .../classflow_1_1util_1_1Basic__blob.html | 2 +- ..._1util_1_1Basic__string__view-members.html | 2 +- ...ssflow_1_1util_1_1Basic__string__view.html | 2 +- ...l_1_1Blob__with__log__context-members.html | 2 +- ...w_1_1util_1_1Blob__with__log__context.html | 2 +- ..._1_1util_1_1Container__traits-members.html | 2 +- ...lassflow_1_1util_1_1Container__traits.html | 2 +- ...nordered__set_3_01T_01_4_01_4-members.html | 2 +- ...ost_1_1unordered__set_3_01T_01_4_01_4.html | 2 +- ...1_1map_3_01K_00_01V_01_4_01_4-members.html | 2 +- ...3_01std_1_1map_3_01K_00_01V_01_4_01_4.html | 2 +- ..._01std_1_1set_3_01T_01_4_01_4-members.html | 2 +- ...traits_3_01std_1_1set_3_01T_01_4_01_4.html | 2 +- ...h__map_3_01K_00_01V_01_4_01_4-members.html | 2 +- ...ked__hash__map_3_01K_00_01V_01_4_01_4.html | 2 +- ...00_01Hash_00_01Pred_01_4_01_4-members.html | 2 +- ...t_3_01T_00_01Hash_00_01Pred_01_4_01_4.html | 2 +- ..._1_1util_1_1Linked__hash__map-members.html | 2 +- ...lassflow_1_1util_1_1Linked__hash__map.html | 2 +- ..._1_1util_1_1Linked__hash__set-members.html | 2 +- ...lassflow_1_1util_1_1Linked__hash__set.html | 2 +- ...ow_1_1util_1_1Null__interface-members.html | 2 +- .../classflow_1_1util_1_1Null__interface.html | 2 +- ...l_1_1Rnd__gen__uniform__range-members.html | 2 +- ...w_1_1util_1_1Rnd__gen__uniform__range.html | 2 +- ...nd__gen__uniform__range__base-members.html | 2 +- ...til_1_1Rnd__gen__uniform__range__base.html | 2 +- ...1Rnd__gen__uniform__range__mt-members.html | 2 +- ...1util_1_1Rnd__gen__uniform__range__mt.html | 2 +- ...low_1_1util_1_1Scoped__setter-members.html | 2 +- .../classflow_1_1util_1_1Scoped__setter.html | 4 +- ...1_1Shared__ptr__alias__holder-members.html | 2 +- ...1_1util_1_1Shared__ptr__alias__holder.html | 2 +- ...ow_1_1util_1_1String__ostream-members.html | 2 +- .../classflow_1_1util_1_1String__ostream.html | 2 +- ...1_1util_1_1Unique__id__holder-members.html | 2 +- ...assflow_1_1util_1_1Unique__id__holder.html | 2 +- .../html_public/clock__type_8cpp.html | 2 +- .../html_public/clock__type__fwd_8hpp.html | 2 +- .../generated/html_public/common_8cpp.html | 2 +- .../generated/html_public/common_8hpp.html | 2 +- .../concurrent__task__loop_8cpp.html | 2 +- .../concurrent__task__loop_8hpp.html | 2 +- .../generated/html_public/config_8cpp.html | 2 +- .../generated/html_public/config_8hpp.html | 2 +- .../config__enum__end__cpp_8macros_8hpp.html | 2 +- .../config__enum__end__hdr_8macros_8hpp.html | 2 +- ...config__enum__start__cpp_8macros_8hpp.html | 2 +- ...config__enum__start__hdr_8macros_8hpp.html | 2 +- .../html_public/dir_000000_000009.html | 2 +- .../html_public/dir_000001_000005.html | 2 +- .../html_public/dir_000001_000008.html | 2 +- .../html_public/dir_000001_000009.html | 2 +- .../html_public/dir_000002_000005.html | 2 +- .../html_public/dir_000002_000009.html | 2 +- .../html_public/dir_000003_000005.html | 2 +- .../html_public/dir_000003_000009.html | 2 +- .../html_public/dir_000004_000009.html | 2 +- .../html_public/dir_000005_000001.html | 2 +- .../html_public/dir_000005_000009.html | 2 +- .../html_public/dir_000007_000001.html | 2 +- .../html_public/dir_000007_000004.html | 2 +- .../html_public/dir_000007_000005.html | 2 +- .../html_public/dir_000007_000009.html | 2 +- .../html_public/dir_000008_000005.html | 2 +- .../html_public/dir_000008_000009.html | 2 +- .../html_public/dir_000009_000005.html | 2 +- .../dir_183f5ca7bfa2ee923b1b08301562c36a.html | 2 +- .../dir_23ec12649285f9fabf3a6b7380226c28.html | 2 +- .../dir_460afd45d0ec637b1427e0e06a6fbcf7.html | 2 +- .../dir_4c52cb8b55b918be67d078d7a231760a.html | 2 +- .../dir_9381a7bbd03577d6d8720c7f35c94ffa.html | 2 +- .../dir_aee2b3c67924e0eefa590b781c13db02.html | 2 +- .../dir_bf37cf39814650876b4aa4513810c0b4.html | 2 +- .../dir_c3b46db8887e8285e98d946e3c1c617e.html | 2 +- .../dir_cfb2ffb2869bbb27b7281952022eb856.html | 2 +- .../dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html | 2 +- .../dynamic__cfg__context_8hpp.html | 2 +- .../generated/html_public/endpoint_8cpp.html | 2 +- .../generated/html_public/endpoint_8hpp.html | 2 +- .../html_public/error_2error_8cpp.html | 2 +- .../html_public/error_2error_8hpp.html | 4 +- .../html_public/error__fwd_8hpp.html | 2 +- .../html_public/event__set_8cpp.html | 2 +- .../html_public/event__set_8hpp.html | 2 +- doc/flow_doc/generated/html_public/files.html | 2 +- .../generated/html_public/fmt_8hpp.html | 2 +- .../generated/html_public/functions.html | 2 +- .../generated/html_public/functions_b.html | 2 +- .../generated/html_public/functions_c.html | 10 +- .../generated/html_public/functions_d.html | 2 +- .../generated/html_public/functions_e.html | 2 +- .../generated/html_public/functions_enum.html | 2 +- .../generated/html_public/functions_eval.html | 2 +- .../generated/html_public/functions_f.html | 2 +- .../generated/html_public/functions_func.html | 2 +- .../html_public/functions_func_b.html | 2 +- .../html_public/functions_func_c.html | 2 +- .../html_public/functions_func_d.html | 2 +- .../html_public/functions_func_e.html | 2 +- .../html_public/functions_func_f.html | 2 +- .../html_public/functions_func_g.html | 2 +- .../html_public/functions_func_h.html | 2 +- .../html_public/functions_func_i.html | 2 +- .../html_public/functions_func_l.html | 2 +- .../html_public/functions_func_m.html | 2 +- .../html_public/functions_func_n.html | 3 +- .../html_public/functions_func_o.html | 4 +- .../html_public/functions_func_p.html | 2 +- .../html_public/functions_func_r.html | 2 +- .../html_public/functions_func_s.html | 2 +- .../html_public/functions_func_t.html | 2 +- .../html_public/functions_func_u.html | 2 +- .../html_public/functions_func_v.html | 2 +- .../html_public/functions_func_w.html | 2 +- .../html_public/functions_func_z.html | 2 +- .../html_public/functions_func_~.html | 2 +- .../generated/html_public/functions_g.html | 2 +- .../generated/html_public/functions_h.html | 2 +- .../generated/html_public/functions_i.html | 2 +- .../generated/html_public/functions_k.html | 2 +- .../generated/html_public/functions_l.html | 2 +- .../generated/html_public/functions_m.html | 2 +- .../generated/html_public/functions_n.html | 3 +- .../generated/html_public/functions_o.html | 4 +- .../generated/html_public/functions_p.html | 2 +- .../generated/html_public/functions_r.html | 2 +- .../generated/html_public/functions_rela.html | 2 +- .../generated/html_public/functions_s.html | 8 +- .../generated/html_public/functions_t.html | 2 +- .../generated/html_public/functions_type.html | 10 +- .../generated/html_public/functions_u.html | 2 +- .../generated/html_public/functions_v.html | 5 +- .../generated/html_public/functions_vars.html | 2 +- .../html_public/functions_vars_s.html | 2 +- .../html_public/functions_vars_v.html | 2 +- .../generated/html_public/functions_w.html | 2 +- .../generated/html_public/functions_z.html | 2 +- .../generated/html_public/functions_~.html | 2 +- .../generated/html_public/globals.html | 2 +- .../generated/html_public/globals_defs.html | 2 +- .../generated/html_public/graph_legend.html | 2 +- .../generated/html_public/hierarchy.html | 143 +- doc/flow_doc/generated/html_public/index.html | 2 +- .../generated/html_public/info_8cpp.html | 2 +- .../generated/html_public/info_8hpp.html | 2 +- .../html_public/inherit_graph_37.map | 7 +- .../html_public/inherit_graph_37.md5 | 2 +- .../html_public/inherit_graph_37.svg | 96 +- .../html_public/inherit_graph_38.map | 7 +- .../html_public/inherit_graph_38.md5 | 2 +- .../html_public/inherit_graph_38.svg | 97 +- .../html_public/inherit_graph_39.map | 3 +- .../html_public/inherit_graph_39.md5 | 2 +- .../html_public/inherit_graph_39.svg | 33 +- .../html_public/inherit_graph_40.map | 3 +- .../html_public/inherit_graph_40.md5 | 2 +- .../html_public/inherit_graph_40.svg | 27 +- .../html_public/inherit_graph_41.md5 | 2 +- .../html_public/inherit_graph_41.svg | 2 +- .../html_public/inherit_graph_42.map | 2 +- .../html_public/inherit_graph_42.md5 | 2 +- .../html_public/inherit_graph_42.svg | 19 +- .../html_public/inherit_graph_43.map | 2 +- .../html_public/inherit_graph_43.md5 | 2 +- .../html_public/inherit_graph_43.svg | 17 +- .../html_public/inherit_graph_44.map | 3 +- .../html_public/inherit_graph_44.md5 | 2 +- .../html_public/inherit_graph_44.svg | 30 +- .../html_public/inherit_graph_45.map | 4 + .../html_public/inherit_graph_45.md5 | 1 + .../html_public/inherit_graph_45.svg | 39 + .../generated/html_public/inherits.html | 18 +- .../html_public/linked__hash__map_8hpp.html | 2 +- .../html_public/linked__hash__set_8hpp.html | 2 +- .../generated/html_public/log_8cpp.html | 2 +- .../generated/html_public/log_8hpp.html | 2 +- .../generated/html_public/log__fwd_8hpp.html | 2 +- .../namespaceboost_1_1filesystem.html | 2 +- .../html_public/namespaceboost_1_1system.html | 2 +- .../generated/html_public/namespaceflow.html | 4 +- .../html_public/namespaceflow_1_1async.html | 2 +- .../html_public/namespaceflow_1_1cfg.html | 2 +- .../namespaceflow_1_1cfg_1_1fs.html | 2 +- .../namespaceflow_1_1cfg_1_1opts.html | 2 +- .../html_public/namespaceflow_1_1error.html | 2 +- .../html_public/namespaceflow_1_1log.html | 2 +- .../namespaceflow_1_1log_1_1fs.html | 2 +- .../namespaceflow_1_1net__flow.html | 2 +- .../namespaceflow_1_1net__flow_1_1asio.html | 2 +- .../namespaceflow_1_1net__flow_1_1error.html | 4 +- .../html_public/namespaceflow_1_1perf.html | 2 +- .../html_public/namespaceflow_1_1util.html | 13 +- ...namespaceflow_1_1util_1_1this__thread.html | 2 +- .../html_public/namespacemembers.html | 2 +- .../html_public/namespacemembers_enum.html | 2 +- .../html_public/namespacemembers_func.html | 2 +- .../html_public/namespacemembers_type.html | 2 +- .../html_public/namespacemembers_vars.html | 2 +- .../generated/html_public/namespaces.html | 21 +- .../html_public/net__env__simulator_8cpp.html | 2 +- .../html_public/net__env__simulator_8hpp.html | 2 +- .../net__flow_2error_2error_8cpp.html | 2 +- .../net__flow_2error_2error_8hpp.html | 2 +- .../html_public/net__flow__fwd_8hpp.html | 2 +- .../generated/html_public/node_8cpp.html | 2 +- .../generated/html_public/node_8hpp.html | 2 +- .../generated/html_public/op_8cpp.html | 2 +- .../generated/html_public/op_8hpp.html | 2 +- .../html_public/option__set_8cpp.html | 2 +- .../html_public/option__set_8hpp.html | 2 +- .../generated/html_public/options_8cpp.html | 2 +- .../generated/html_public/options_8hpp.html | 2 +- .../ostream__log__msg__writer_8cpp.html | 2 +- .../ostream__log__msg__writer_8hpp.html | 2 +- doc/flow_doc/generated/html_public/pages.html | 2 +- .../html_public/peer__socket_8cpp.html | 2 +- .../html_public/peer__socket_8hpp.html | 2 +- .../generated/html_public/perf__fwd_8hpp.html | 2 +- .../generated/html_public/random_8hpp.html | 2 +- .../html_public/sched__task_8cpp.html | 2 +- .../html_public/sched__task_8hpp.html | 2 +- .../html_public/sched__task__fwd_8hpp.html | 2 +- .../generated/html_public/search/all_10.js | 4 +- .../generated/html_public/search/all_13.js | 8 +- .../generated/html_public/search/all_2.js | 4 +- .../generated/html_public/search/all_c.js | 10 +- .../generated/html_public/search/all_d.js | 14 +- .../generated/html_public/search/classes_9.js | 5 +- .../html_public/search/functions_c.js | 13 +- .../html_public/search/functions_d.js | 4 +- .../html_public/search/typedefs_2.js | 8 +- .../segregated__thread__task__loop_8cpp.html | 2 +- .../segregated__thread__task__loop_8hpp.html | 2 +- .../html_public/server__socket_8cpp.html | 2 +- .../html_public/server__socket_8hpp.html | 2 +- .../shared__ptr__alias__holder_8hpp.html | 2 +- .../simple__ostream__logger_8cpp.html | 2 +- .../simple__ostream__logger_8hpp.html | 2 +- .../single__thread__task__loop_8cpp.html | 2 +- .../single__thread__task__loop_8hpp.html | 2 +- .../static__cfg__manager_8hpp.html | 2 +- .../html_public/string__ostream_8cpp.html | 2 +- .../html_public/string__ostream_8hpp.html | 2 +- .../html_public/string__view_8hpp.html | 2 +- ...t__flow_1_1error_1_1Code_01_4-members.html | 2 +- ...ow_1_1net__flow_1_1error_1_1Code_01_4.html | 2 +- ...dynamic__change__func__handle-members.html | 2 +- ..._1_1On__dynamic__change__func__handle.html | 2 +- ...cfg_1_1Final__validator__func-members.html | 2 +- ...flow_1_1cfg_1_1Final__validator__func.html | 2 +- ...ow_1_1cfg_1_1Null__value__set-members.html | 2 +- ...structflow_1_1cfg_1_1Null__value__set.html | 2 +- ...1Declare__options__func__args-members.html | 2 +- ...__set_1_1Declare__options__func__args.html | 2 +- ...le__logger_1_1Throttling__cfg-members.html | 2 +- ...sync__file__logger_1_1Throttling__cfg.html | 2 +- ...tflow_1_1log_1_1Msg__metadata-members.html | 2 +- .../structflow_1_1log_1_1Msg__metadata.html | 2 +- ...1_1net__flow_1_1Node__options-members.html | 2 +- ...uctflow_1_1net__flow_1_1Node__options.html | 2 +- ...t__flow_1_1Peer__socket__info-members.html | 2 +- ...ow_1_1net__flow_1_1Peer__socket__info.html | 2 +- ...flow_1_1Peer__socket__options-members.html | 2 +- ...1_1net__flow_1_1Peer__socket__options.html | 2 +- ...1Peer__socket__receive__stats-members.html | 2 +- ..._flow_1_1Peer__socket__receive__stats.html | 2 +- ...net__flow_1_1Remote__endpoint-members.html | 2 +- ...flow_1_1net__flow_1_1Remote__endpoint.html | 2 +- ...pointing__timer_1_1Checkpoint-members.html | 2 +- ...1_1Checkpointing__timer_1_1Checkpoint.html | 2 +- ...flow_1_1perf_1_1Duration__set-members.html | 2 +- .../structflow_1_1perf_1_1Duration__set.html | 2 +- ...flow_1_1perf_1_1Time__pt__set-members.html | 2 +- .../structflow_1_1perf_1_1Time__pt__set.html | 2 +- ...ctflow_1_1util_1_1Noncopyable-members.html | 85 + .../structflow_1_1util_1_1Noncopyable.html | 111 + .../timed__concurrent__task__loop_8cpp.html | 2 +- .../timed__concurrent__task__loop_8hpp.html | 2 +- .../html_public/timed__function_8hpp.html | 2 +- .../html_public/timed__handler_8hpp.html | 2 +- doc/flow_doc/generated/html_public/todo.html | 2 +- .../generated/html_public/traits_8hpp.html | 2 +- .../html_public/uniq__id__holder_8cpp.html | 2 +- .../html_public/uniq__id__holder_8hpp.html | 2 +- .../html_public/util_2util_8hpp.html | 5 +- .../generated/html_public/util_8cpp.html | 2 +- .../generated/html_public/util__fwd_8hpp.html | 2 +- .../html_public/verbosity__config_8cpp.html | 2 +- .../html_public/verbosity__config_8hpp.html | 2 +- .../verbosity__config__fwd_8hpp.html | 2 +- .../x__thread__task__loop_8cpp.html | 2 +- .../x__thread__task__loop_8hpp.html | 2 +- 1095 files changed, 14063 insertions(+), 13509 deletions(-) create mode 100644 doc/flow_doc/generated/html_full/inherit_graph_62.map create mode 100644 doc/flow_doc/generated/html_full/inherit_graph_62.md5 create mode 100644 doc/flow_doc/generated/html_full/inherit_graph_62.svg create mode 100644 doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable-members.html create mode 100644 doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable.html create mode 100644 doc/flow_doc/generated/html_public/inherit_graph_45.map create mode 100644 doc/flow_doc/generated/html_public/inherit_graph_45.md5 create mode 100644 doc/flow_doc/generated/html_public/inherit_graph_45.svg create mode 100644 doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable-members.html create mode 100644 doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable.html diff --git a/doc/flow_doc/generated/html_full/annotated.html b/doc/flow_doc/generated/html_full/annotated.html index 591eabdd4..c29cf0a78 100644 --- a/doc/flow_doc/generated/html_full/annotated.html +++ b/doc/flow_doc/generated/html_full/annotated.html @@ -184,23 +184,24 @@  CDuration_units_beautifiedInternally used class that enables some of the activities of beautify_chrono_ostream() API  CLinked_hash_mapAn object of this class is a map that combines the lookup speed of a boost::unordered_map<> and ordering and iterator stability capabilities of an std::list<>  CLinked_hash_setAn object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<> - CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor - CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator - CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved - CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object - CScheduled_task_handle_stateInternal-use data store used by schedule[d]_task_*(), each object containing the state relevant to a single call to either schedule_task_from_now() or schedule_task_at() - CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value - CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively - CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string - CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end - CFunction - CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function + CNoncopyableUseful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized) + CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor + CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator + CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved + CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object + CScheduled_task_handle_stateInternal-use data store used by schedule[d]_task_*(), each object containing the state relevant to a single call to either schedule_task_from_now() or schedule_task_at() + CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value + CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively + CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string + CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end + CFunction + CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function diff --git a/doc/flow_doc/generated/html_full/asio_2node_8cpp.html b/doc/flow_doc/generated/html_full/asio_2node_8cpp.html index 6ab38f572..ac9d82c6b 100644 --- a/doc/flow_doc/generated/html_full/asio_2node_8cpp.html +++ b/doc/flow_doc/generated/html_full/asio_2node_8cpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2node_8cpp_source.html b/doc/flow_doc/generated/html_full/asio_2node_8cpp_source.html index aca666cef..6c60bd2a3 100644 --- a/doc/flow_doc/generated/html_full/asio_2node_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2node_8cpp_source.html @@ -138,12 +138,12 @@
Contains classes that add boost.asio integration to the main Flow-protocol classes such as net_flow::...
Definition: node.cpp:25
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
boost::asio::ip::udp::endpoint Udp_endpoint
Short-hand for the UDP endpoint (IP/port) type.
Definition: util_fwd.hpp:208
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
A set of low-level options affecting a single Flow Node, including Peer_socket objects and other obje...
Definition: options.hpp:449
diff --git a/doc/flow_doc/generated/html_full/asio_2node_8hpp.html b/doc/flow_doc/generated/html_full/asio_2node_8hpp.html index a84494806..ae3dde054 100644 --- a/doc/flow_doc/generated/html_full/asio_2node_8hpp.html +++ b/doc/flow_doc/generated/html_full/asio_2node_8hpp.html @@ -102,7 +102,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2node_8hpp_source.html b/doc/flow_doc/generated/html_full/asio_2node_8hpp_source.html index 0fa02dcfe..b18ddecb7 100644 --- a/doc/flow_doc/generated/html_full/asio_2node_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2node_8hpp_source.html @@ -1061,7 +1061,7 @@
989} // namespace flow::net_flow::asio
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Logger * get_logger() const
Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
Definition: log.cpp:225
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
Event_type
Type of event or condition of interest supported by class Event_set.
Definition: event_set.hpp:307
@@ -1069,7 +1069,7 @@
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
Definition: node.hpp:937
static const uint8_t S_DEFAULT_CONN_METADATA
Type and value to supply as user-supplied metadata in SYN, if user chooses to use [[a]sync_]connect()...
Definition: node.hpp:1403
Event_set::Ptr event_set_create(Error_code *err_code=0)
Creates a new Event_set in Event_set::State::S_INACTIVE state with no sockets/events stored; returns ...
Definition: event_set.cpp:881
-
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
+
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
A server socket able to listen on a single Flow port for incoming connections and return peer sockets...
A subclass of net_flow::Node that adds the ability to easily and directly use net_flow sockets in gen...
Definition: node.hpp:236
void async_op(typename Socket::Ptr sock, Function< Non_blocking_func_ret_type(Error_code *)> &&non_blocking_func, Non_blocking_func_ret_type would_block_ret_val, Event_set::Event_type ev_type, const Fine_time_pt &wait_until, Function< void(const Error_code &, Non_blocking_func_ret_type)> &&on_result)
Implementation of core asynchronous transfer methods, namely asio::Peer_socket::async_send(),...
Definition: node.hpp:581
@@ -1099,9 +1099,9 @@
bool scheduled_task_cancel(log::Logger *logger_ptr, Scheduled_task_handle task)
Attempts to prevent the execution of a previously scheduled (by schedule_task_from_now() or similar) ...
Definition: sched_task.cpp:26
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
boost::asio::ip::udp::endpoint Udp_endpoint
Short-hand for the UDP endpoint (IP/port) type.
Definition: util_fwd.hpp:208
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
@@ -1111,7 +1111,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp.html b/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp.html index 19c5113c6..ed6468363 100644 --- a/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp.html +++ b/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp_source.html b/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp_source.html index ee44cd8fe..c7ef78c66 100644 --- a/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2peer__socket_8cpp_source.html @@ -333,12 +333,12 @@
261
262} // namespace flow::net_flow::asio
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
@ S_PEER_SOCKET_WRITABLE
Event type specifying the condition of interest wherein a target Peer_socket sock is such that callin...
@ S_PEER_SOCKET_READABLE
Event type specifying the condition of interest wherein a target Peer_socket sock is such that callin...
-
Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
-
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
+
Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
+
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
@ S_CLOSED
Neither future reads nor writes are possible, AND Node has disowned the Peer_socket.
Error_code disconnect_cause() const
The error code that perviously caused state() to become State::S_CLOSED, or success code if state is ...
Node * node() const
Node that produced this Peer_socket.
Definition: peer_socket.cpp:95
@@ -369,15 +369,15 @@
std::ostream & operator<<(std::ostream &os, const Peer_socket *sock)
Prints string representation of given socket to given standard ostream and returns the latter.
@ S_WAIT_USER_TIMEOUT
A blocking (sync_) or background-blocking (async_) operation timed out versus user-supplied time limi...
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
A set of low-level options affecting a single Peer_socket.
Definition: options.hpp:36
Represents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remo...
Definition: endpoint.hpp:93
diff --git a/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp.html b/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp.html index 02fbf4a98..eed1daf78 100644 --- a/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp.html +++ b/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp_source.html b/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp_source.html index b25bcdab1..16af45419 100644 --- a/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2peer__socket_8hpp_source.html @@ -596,10 +596,10 @@
524} // Peer_socket::handler_func()
525
526} // namespace flow::net_flow::asio
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
Definition: node.hpp:937
-
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
+
A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
A subclass of net_flow::Node that adds the ability to easily and directly use net_flow sockets in gen...
Definition: node.hpp:236
A net_flow::Peer_socket that adds integration with boost.asio.
Definition: peer_socket.hpp:41
~Peer_socket() override
Boring virtual destructor as in superclass. See notes there.
Definition: peer_socket.cpp:37
@@ -625,15 +625,15 @@
Contains classes that add boost.asio integration to the main Flow-protocol classes such as net_flow::...
Definition: node.cpp:25
Fine_time_pt chrono_duration_from_now_to_fine_time_pt(const boost::chrono::duration< Rep, Period > &dur)
Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
Definition: util.hpp:42
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
A set of low-level options affecting a single Peer_socket.
Definition: options.hpp:36
diff --git a/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp.html b/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp.html index b3c389f08..ed6781fe5 100644 --- a/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp.html +++ b/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp_source.html b/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp_source.html index 71d2b18bc..a75a0c001 100644 --- a/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2server__socket_8cpp_source.html @@ -209,7 +209,7 @@
137
138} // namespace flow::net_flow::asio
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
@ S_SERVER_SOCKET_ACCEPTABLE
Event type specifying the condition of interest wherein a target Server_socket serv is such that call...
A server socket able to listen on a single Flow port for incoming connections and return peer sockets...
@@ -237,13 +237,13 @@
Contains classes that add boost.asio integration to the main Flow-protocol classes such as net_flow::...
Definition: node.cpp:25
std::ostream & operator<<(std::ostream &os, const Peer_socket *sock)
Prints string representation of given socket to given standard ostream and returns the latter.
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
A set of low-level options affecting a single Peer_socket.
Definition: options.hpp:36
diff --git a/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp.html b/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp.html index 51b66a3e8..e5097d588 100644 --- a/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp.html +++ b/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp_source.html b/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp_source.html index 6fd9e14b2..b7ca3857b 100644 --- a/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/asio_2server__socket_8hpp_source.html @@ -384,7 +384,7 @@
312} // Server_socket::handler_func()
313
314} // namespace flow::net_flow::asio
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
Definition: node.hpp:937
A server socket able to listen on a single Flow port for incoming connections and return peer sockets...
@@ -407,15 +407,15 @@
Contains classes that add boost.asio integration to the main Flow-protocol classes such as net_flow::...
Definition: node.cpp:25
Fine_time_pt chrono_duration_from_now_to_fine_time_pt(const boost::chrono::duration< Rep, Period > &dur)
Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
Definition: util.hpp:42
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
A set of low-level options affecting a single Peer_socket.
Definition: options.hpp:36
diff --git a/doc/flow_doc/generated/html_full/async_2util_8hpp.html b/doc/flow_doc/generated/html_full/async_2util_8hpp.html index 7b72387ae..cd269c379 100644 --- a/doc/flow_doc/generated/html_full/async_2util_8hpp.html +++ b/doc/flow_doc/generated/html_full/async_2util_8hpp.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/async_2util_8hpp_source.html b/doc/flow_doc/generated/html_full/async_2util_8hpp_source.html index 16266ebe8..72d6b1dd7 100644 --- a/doc/flow_doc/generated/html_full/async_2util_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/async_2util_8hpp_source.html @@ -243,7 +243,7 @@
171
172} // namespace flow::async
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
virtual bool should_log(Sev sev, const Component &component) const =0
Given attributes of a hypothetical message that would be logged, return true if that message should b...
#define FLOW_LOG_SET_CONTEXT(ARG_logger_ptr, ARG_component_payload)
For the rest of the block within which this macro is instantiated, causes all FLOW_LOG_....
Definition: log.hpp:405
@@ -260,7 +260,7 @@ diff --git a/doc/flow_doc/generated/html_full/async_8cpp.html b/doc/flow_doc/generated/html_full/async_8cpp.html index 1b5e3d8a5..2d0f110b1 100644 --- a/doc/flow_doc/generated/html_full/async_8cpp.html +++ b/doc/flow_doc/generated/html_full/async_8cpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/async_8cpp_source.html b/doc/flow_doc/generated/html_full/async_8cpp_source.html index 346719d22..4ca4f830b 100644 --- a/doc/flow_doc/generated/html_full/async_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/async_8cpp_source.html @@ -122,7 +122,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__file__logger_8cpp.html b/doc/flow_doc/generated/html_full/async__file__logger_8cpp.html index a6cd3d7a1..67475936a 100644 --- a/doc/flow_doc/generated/html_full/async__file__logger_8cpp.html +++ b/doc/flow_doc/generated/html_full/async__file__logger_8cpp.html @@ -94,7 +94,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__file__logger_8cpp_source.html b/doc/flow_doc/generated/html_full/async__file__logger_8cpp_source.html index 3293d35db..a60614599 100644 --- a/doc/flow_doc/generated/html_full/async__file__logger_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/async__file__logger_8cpp_source.html @@ -655,10 +655,10 @@
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Definition: log_fwd.hpp:224
@ S_WARNING
Message indicates a "bad" condition that is not frequent enough to be of severity Sev::S_TRACE.
@ S_INFO
Message indicates a not-"bad" condition that is not frequent enough to be of severity Sev::S_TRACE.
-
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:356
+
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:381
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
In addition to the task object (function) itself, these are the data placed onto the queue of m_async...
size_t m_msg_size
Number of characters in m_msg_copy pointee string.
@@ -670,7 +670,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__file__logger_8hpp.html b/doc/flow_doc/generated/html_full/async__file__logger_8hpp.html index 2564b933e..849a01706 100644 --- a/doc/flow_doc/generated/html_full/async__file__logger_8hpp.html +++ b/doc/flow_doc/generated/html_full/async__file__logger_8hpp.html @@ -107,7 +107,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__file__logger_8hpp_source.html b/doc/flow_doc/generated/html_full/async__file__logger_8hpp_source.html index 5680d8ebd..a066619c4 100644 --- a/doc/flow_doc/generated/html_full/async__file__logger_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/async__file__logger_8hpp_source.html @@ -891,7 +891,7 @@
boost::unique_lock< Mutex > Lock_guard
Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
Definition: util_fwd.hpp:265
boost::mutex Mutex_non_recursive
Short-hand for non-reentrant, exclusive mutex. ("Reentrant" = one can lock an already-locked-in-that-...
Definition: util_fwd.hpp:215
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
In addition to the task object (function) itself, these are the data placed onto the queue of m_async...
size_t m_msg_size
Number of characters in m_msg_copy pointee string.
@@ -906,7 +906,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__fwd_8hpp.html b/doc/flow_doc/generated/html_full/async__fwd_8hpp.html index a9377ab49..b00f99e29 100644 --- a/doc/flow_doc/generated/html_full/async__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/async__fwd_8hpp.html @@ -157,7 +157,7 @@ diff --git a/doc/flow_doc/generated/html_full/async__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/async__fwd_8hpp_source.html index 3a04071a9..ddf2d4bc0 100644 --- a/doc/flow_doc/generated/html_full/async__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/async__fwd_8hpp_source.html @@ -632,7 +632,7 @@
560Strand_ptr op_to_exec_ctx<Strand_ptr>(Concurrent_task_loop* loop, const Op& op);
561
562} // namespace flow::async
-
Definition: common.hpp:507
+
Definition: common.hpp:512
The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
Exec_ctx_ptr op_to_exec_ctx(Concurrent_task_loop *loop, const Op &op)
Template specialization model for operation that obtains the underlying execution context,...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
@@ -654,13 +654,13 @@
Function< void()> Task
Short-hand for a task that can be posted for execution by a Concurrent_task_loop or flow::util::Task_...
Definition: async_fwd.hpp:96
auto asio_handler_via_op(Concurrent_task_loop *loop, const Op &op, Handler &&handler)
Given a boost.asio completion handler handler for a boost.asio async_*() action on some boost....
Function< void(bool short_fire)> Scheduled_task
Short-hand for tasks that can be scheduled/fired by schedule_task_from_now() and similar.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
diff --git a/doc/flow_doc/generated/html_full/bandwidth_8cpp.html b/doc/flow_doc/generated/html_full/bandwidth_8cpp.html index 7f2bec0be..53383b841 100644 --- a/doc/flow_doc/generated/html_full/bandwidth_8cpp.html +++ b/doc/flow_doc/generated/html_full/bandwidth_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/bandwidth_8cpp_source.html b/doc/flow_doc/generated/html_full/bandwidth_8cpp_source.html index e254cb7a9..da8a8fa57 100644 --- a/doc/flow_doc/generated/html_full/bandwidth_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/bandwidth_8cpp_source.html @@ -339,13 +339,13 @@
#define FLOW_LOG_WARNING(ARG_stream_fragment)
Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...
Definition: log.hpp:152
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Definition: log.hpp:227
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
diff --git a/doc/flow_doc/generated/html_full/bandwidth_8hpp.html b/doc/flow_doc/generated/html_full/bandwidth_8hpp.html index 650f73586..e612ef902 100644 --- a/doc/flow_doc/generated/html_full/bandwidth_8hpp.html +++ b/doc/flow_doc/generated/html_full/bandwidth_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/bandwidth_8hpp_source.html b/doc/flow_doc/generated/html_full/bandwidth_8hpp_source.html index eef575a2a..05a75df14 100644 --- a/doc/flow_doc/generated/html_full/bandwidth_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/bandwidth_8hpp_source.html @@ -400,12 +400,12 @@
Const_target_ptr Const_ptr
Short-hand for ref-counted pointer to immutable values of type Target_type::element_type (a-la T cons...
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
diff --git a/doc/flow_doc/generated/html_full/basic__blob_8hpp.html b/doc/flow_doc/generated/html_full/basic__blob_8hpp.html index 722a0a0cf..a78765f8a 100644 --- a/doc/flow_doc/generated/html_full/basic__blob_8hpp.html +++ b/doc/flow_doc/generated/html_full/basic__blob_8hpp.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_full/basic__blob_8hpp_source.html b/doc/flow_doc/generated/html_full/basic__blob_8hpp_source.html index 58fd9ce91..2682899af 100644 --- a/doc/flow_doc/generated/html_full/basic__blob_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/basic__blob_8hpp_source.html @@ -2662,16 +2662,16 @@
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Definition: log.hpp:227
@ S_TRACE
Message indicates any condition that may occur with great frequency (thus verbose if logged).
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
Definition: basic_blob.hpp:29
-
bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
Returns true if and only if the given value is within the given range, given as a [low,...
Definition: util.hpp:262
+
bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
Returns true if and only if the given value is within the given range, given as a [low,...
Definition: util.hpp:287
void swap(Basic_blob< Allocator, S_SHARING_ALLOWED > &blob1, Basic_blob< Allocator, S_SHARING_ALLOWED > &blob2, log::Logger *logger_ptr)
Equivalent to blob1.swap(blob2).
-
bool in_closed_range(T const &min_val, T const &val, T const &max_val)
Returns true if and only if the given value is within the given range, inclusive.
Definition: util.hpp:246
+
bool in_closed_range(T const &min_val, T const &val, T const &max_val)
Returns true if and only if the given value is within the given range, inclusive.
Definition: util.hpp:271
bool blobs_sharing(const Basic_blob< Allocator, S_SHARING_ALLOWED > &blob1, const Basic_blob< Allocator, S_SHARING_ALLOWED > &blob2)
Returns true if and only if both given objects are not zero() == true, and they either co-own a commo...
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
-
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:386
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
+
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:391
diff --git a/doc/flow_doc/generated/html_full/blob_8hpp.html b/doc/flow_doc/generated/html_full/blob_8hpp.html index 975d47d3a..e27721cb7 100644 --- a/doc/flow_doc/generated/html_full/blob_8hpp.html +++ b/doc/flow_doc/generated/html_full/blob_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/blob_8hpp_source.html b/doc/flow_doc/generated/html_full/blob_8hpp_source.html index 3193dcb43..f1a543a38 100644 --- a/doc/flow_doc/generated/html_full/blob_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/blob_8hpp_source.html @@ -663,7 +663,7 @@ diff --git a/doc/flow_doc/generated/html_full/blob__fwd_8hpp.html b/doc/flow_doc/generated/html_full/blob__fwd_8hpp.html index 50252c63b..058b6d727 100644 --- a/doc/flow_doc/generated/html_full/blob__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/blob__fwd_8hpp.html @@ -121,7 +121,7 @@ diff --git a/doc/flow_doc/generated/html_full/blob__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/blob__fwd_8hpp_source.html index 4b680aa58..04cccfe88 100644 --- a/doc/flow_doc/generated/html_full/blob__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/blob__fwd_8hpp_source.html @@ -201,7 +201,7 @@ diff --git a/doc/flow_doc/generated/html_full/buffer__logger_8cpp.html b/doc/flow_doc/generated/html_full/buffer__logger_8cpp.html index 02f3279c6..82592260a 100644 --- a/doc/flow_doc/generated/html_full/buffer__logger_8cpp.html +++ b/doc/flow_doc/generated/html_full/buffer__logger_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/buffer__logger_8cpp_source.html b/doc/flow_doc/generated/html_full/buffer__logger_8cpp_source.html index cb7220aab..defc3b130 100644 --- a/doc/flow_doc/generated/html_full/buffer__logger_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/buffer__logger_8cpp_source.html @@ -159,7 +159,7 @@ diff --git a/doc/flow_doc/generated/html_full/buffer__logger_8hpp.html b/doc/flow_doc/generated/html_full/buffer__logger_8hpp.html index 789894259..03a4ecdd4 100644 --- a/doc/flow_doc/generated/html_full/buffer__logger_8hpp.html +++ b/doc/flow_doc/generated/html_full/buffer__logger_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/buffer__logger_8hpp_source.html b/doc/flow_doc/generated/html_full/buffer__logger_8hpp_source.html index 787bde963..0232ec4d4 100644 --- a/doc/flow_doc/generated/html_full/buffer__logger_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/buffer__logger_8hpp_source.html @@ -236,7 +236,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__fwd_8hpp.html b/doc/flow_doc/generated/html_full/cfg__fwd_8hpp.html index 3153f28c2..dd10282d5 100644 --- a/doc/flow_doc/generated/html_full/cfg__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/cfg__fwd_8hpp.html @@ -133,7 +133,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/cfg__fwd_8hpp_source.html index 3e2867639..d62a49265 100644 --- a/doc/flow_doc/generated/html_full/cfg__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cfg__fwd_8hpp_source.html @@ -411,7 +411,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__manager_8cpp.html b/doc/flow_doc/generated/html_full/cfg__manager_8cpp.html index 52fc052df..9a3818e82 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager_8cpp.html +++ b/doc/flow_doc/generated/html_full/cfg__manager_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__manager_8cpp_source.html b/doc/flow_doc/generated/html_full/cfg__manager_8cpp_source.html index 6b6708571..0dbdf2ad3 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/cfg__manager_8cpp_source.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__manager_8hpp.html b/doc/flow_doc/generated/html_full/cfg__manager_8hpp.html index fa212612d..6342318c4 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager_8hpp.html +++ b/doc/flow_doc/generated/html_full/cfg__manager_8hpp.html @@ -123,7 +123,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__manager_8hpp_source.html b/doc/flow_doc/generated/html_full/cfg__manager_8hpp_source.html index 5d80f1420..eab140f8c 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cfg__manager_8hpp_source.html @@ -2795,7 +2795,7 @@
2723} // namespace flow::cfg
-
Definition: common.hpp:507
+
Definition: common.hpp:512
Manages a config setup, intended for a single daemon process, by maintaining 1 or more set(s) of stat...
void log_help(log::Sev sev=log::Sev::S_INFO) const
Logs what help_to_ostream() would print.
boost::array< std::list< On_dynamic_change_func >, S_N_D_VALUE_SETS > m_on_dynamic_change_funcs
List of callbacks to execute after m_d_value_sets members (the pointers) are next assigned: one per e...
@@ -2873,10 +2873,10 @@
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Definition: log_fwd.hpp:224
@ S_INFO
Message indicates a not-"bad" condition that is not frequent enough to be of severity Sev::S_TRACE.
boost::unique_lock< Mutex > Lock_guard
Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
Definition: util_fwd.hpp:265
-
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:356
+
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:381
boost::mutex Mutex_non_recursive
Short-hand for non-reentrant, exclusive mutex. ("Reentrant" = one can lock an already-locked-in-that-...
Definition: util_fwd.hpp:215
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
Opaque handle for managing a dynamic config change callback.
@@ -2889,7 +2889,7 @@ diff --git a/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp.html b/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp.html index c98ee8fae..cfbfe661a 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp.html @@ -153,7 +153,7 @@

diff --git a/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp_source.html index 985c8e7b6..d32e9c36b 100644 --- a/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cfg__manager__fwd_8hpp_source.html @@ -198,7 +198,7 @@ diff --git a/doc/flow_doc/generated/html_full/checkpt__timer_8cpp.html b/doc/flow_doc/generated/html_full/checkpt__timer_8cpp.html index 98fabf7f4..ec1764f5a 100644 --- a/doc/flow_doc/generated/html_full/checkpt__timer_8cpp.html +++ b/doc/flow_doc/generated/html_full/checkpt__timer_8cpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/checkpt__timer_8cpp_source.html b/doc/flow_doc/generated/html_full/checkpt__timer_8cpp_source.html index 90eb1ce0f..5ccbcb711 100644 --- a/doc/flow_doc/generated/html_full/checkpt__timer_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/checkpt__timer_8cpp_source.html @@ -657,8 +657,8 @@
@ S_CPU_THREAD_TOTAL_HI_RES
Similar to S_CPU_TOTAL_HI_RES but applied to the calling thread as opposed to entire process.
@ S_CPU_TOTAL_HI_RES
Measures processor time (user- and kernel-level total) spent by the current process; this is the high...
@ S_CPU_USER_LO_RES
Along with S_CPU_SYS_LO_RES, measures processor time (user-level) spent by the current process; this ...
-
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:356
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:381
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
The entirety of the information recorded with each Checkpointing_timer::checkpoint() call; it contain...
const std::string m_name
User-supplied name of the checkpoint.
Duration_set m_since_last
For the T.checkpoint() call that generated *this, for each enabled Clock_type: Time elapsed since eit...
@@ -669,7 +669,7 @@ diff --git a/doc/flow_doc/generated/html_full/checkpt__timer_8hpp.html b/doc/flow_doc/generated/html_full/checkpt__timer_8hpp.html index 008fcfae7..32c18a9e6 100644 --- a/doc/flow_doc/generated/html_full/checkpt__timer_8hpp.html +++ b/doc/flow_doc/generated/html_full/checkpt__timer_8hpp.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_full/checkpt__timer_8hpp_source.html b/doc/flow_doc/generated/html_full/checkpt__timer_8hpp_source.html index 0670f98b6..34bea0554 100644 --- a/doc/flow_doc/generated/html_full/checkpt__timer_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/checkpt__timer_8hpp_source.html @@ -849,7 +849,7 @@ diff --git a/doc/flow_doc/generated/html_full/classbool.html b/doc/flow_doc/generated/html_full/classbool.html index da522f760..c31252cc2 100644 --- a/doc/flow_doc/generated/html_full/classbool.html +++ b/doc/flow_doc/generated/html_full/classbool.html @@ -69,7 +69,7 @@
The documentation for this class was generated from the following files: diff --git a/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01Peer__socket_1_1security__token__t_01_4.html b/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01Peer__socket_1_1security__token__t_01_4.html index 85e081842..75b8e2980 100644 --- a/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01Peer__socket_1_1security__token__t_01_4.html +++ b/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01Peer__socket_1_1security__token__t_01_4.html @@ -69,7 +69,7 @@
The documentation for this class was generated from the following files: diff --git a/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01std_1_1size__t_01_4.html b/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01std_1_1size__t_01_4.html index fffa7a3f0..a4f89a6b6 100644 --- a/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01std_1_1size__t_01_4.html +++ b/doc/flow_doc/generated/html_full/classboost_1_1random_1_1uniform__int__distribution_3_01std_1_1size__t_01_4.html @@ -69,7 +69,7 @@
The documentation for this class was generated from the following files: diff --git a/doc/flow_doc/generated/html_full/classes.html b/doc/flow_doc/generated/html_full/classes.html index 053d56325..2c9360156 100644 --- a/doc/flow_doc/generated/html_full/classes.html +++ b/doc/flow_doc/generated/html_full/classes.html @@ -100,7 +100,7 @@
Msg_metadata (flow::log)
N
-
Net_env_simulator (flow::net_flow)
Node (flow::net_flow::asio)
Node (flow::net_flow)
Node_options (flow::net_flow)
Null_interface (flow::util)
Null_value_set (flow::cfg)
+
Net_env_simulator (flow::net_flow)
Node (flow::net_flow::asio)
Node (flow::net_flow)
Node_options (flow::net_flow)
Noncopyable (flow::util)
Null_interface (flow::util)
Null_value_set (flow::cfg)
O
Config_manager::On_dynamic_change_func_handle (flow::cfg)
Op_list (flow::async)
Option_set (flow::cfg)
Option_set_base (flow::cfg)
Ostream_log_msg_writer (flow::log)
@@ -126,7 +126,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1Function.html b/doc/flow_doc/generated/html_full/classflow_1_1Function.html index 706336590..bfcc800aa 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1Function.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1Function.html @@ -73,14 +73,14 @@

Detailed Description

template<typename Signature>
class flow::Function< Signature >
-

Definition at line 507 of file common.hpp.

+

Definition at line 512 of file common.hpp.


The documentation for this class was generated from the following file: diff --git a/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html index 06c7bd963..bb8378221 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html b/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html index f1e4e0d21..0ed3fadf9 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html @@ -134,7 +134,7 @@

Rationale

-

Definition at line 554 of file common.hpp.

+

Definition at line 559 of file common.hpp.

Member Typedef Documentation

◆ Function_base

@@ -152,7 +152,7 @@

Definition at line 561 of file common.hpp.

+

Definition at line 566 of file common.hpp.

@@ -183,7 +183,7 @@

Definition at line 666 of file common.hpp.

+

Definition at line 671 of file common.hpp.

@@ -214,7 +214,7 @@

Rationale

Provided due to ubuiquity of code that uses boost::function::empty() which std::function lacks.

Returns
See above.
-

Definition at line 660 of file common.hpp.

+

Definition at line 665 of file common.hpp.

@@ -224,7 +224,7 @@

Rationale

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop-members.html index 189485e04..8e054a020 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop-members.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop.html index 2ec67c4a7..a2070d3e1 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Concurrent__task__loop.html @@ -945,7 +945,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop-members.html index b51cf0eb0..27a2869b4 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop-members.html @@ -114,7 +114,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop.html index 38caef58f..35dee6724 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Cross__thread__task__loop.html @@ -983,7 +983,7 @@

Logging subtlety for large thread pools

Definition at line 81 of file x_thread_task_loop.cpp.

-

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), m_est_hw_core_pinning_helps_algo, m_est_hw_core_sharing_helps_algo, m_hw_threads_is_grouping_collated, m_n_threads_or_zero, m_nickname, m_qing_threads, m_shared_task_engine, n_threads(), flow::async::optimize_pinning_in_thread_pool(), flow::util::ostream_op_string(), post(), and flow::async::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION.

+

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), m_est_hw_core_pinning_helps_algo, m_est_hw_core_sharing_helps_algo, m_hw_threads_is_grouping_collated, m_n_threads_or_zero, m_nickname, m_qing_threads, m_shared_task_engine, n_threads(), flow::async::optimize_pinning_in_thread_pool(), flow::util::ostream_op_string(), post(), and flow::async::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION.

Referenced by flow::async::Single_thread_task_loop::start().

@@ -1373,7 +1373,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list-members.html index ba7c597b9..b0256be29 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list-members.html @@ -96,7 +96,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list.html index 9a72c6b49..ddd4501bb 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Op__list.html @@ -487,7 +487,7 @@

Implementation detail

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop-members.html index c53f39d3e..c4c25c45a 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop-members.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop.html index f3546d02f..2074d5871 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Segregated__thread__task__loop.html @@ -1143,7 +1143,7 @@

Logging subtlety for large thread pools

Definition at line 98 of file segregated_thread_task_loop.cpp.

-

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_est_hw_core_pinning_helps_algo, m_est_hw_core_sharing_helps_algo, m_hw_threads_is_grouping_collated, m_n_threads_or_zero, m_nickname, m_qing_threads, m_task_engines, n_threads(), flow::async::optimize_pinning_in_thread_pool(), flow::util::ostream_op_string(), post(), flow::async::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION, and task_engine().

+

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_est_hw_core_pinning_helps_algo, m_est_hw_core_sharing_helps_algo, m_hw_threads_is_grouping_collated, m_n_threads_or_zero, m_nickname, m_qing_threads, m_task_engines, n_threads(), flow::async::optimize_pinning_in_thread_pool(), flow::util::ostream_op_string(), post(), flow::async::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION, and task_engine().

Here is the call graph for this function:
@@ -1534,7 +1534,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop-members.html index a4bd6d12a..29d201de7 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop-members.html @@ -101,7 +101,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop.html index 86f2d87ab..da61e2c97 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Single__thread__task__loop.html @@ -730,7 +730,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread-members.html index f16decbe4..d5cbccc20 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread-members.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread.html index 6d3475160..4484c98fe 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Task__qing__thread.html @@ -537,7 +537,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html index 9bce5be17..cf0c6558d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop.html index 7147732df..4d0d21a06 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop.html @@ -337,7 +337,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html index 8028196ab..29b97fe29 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html index d1a74572b..d75718604 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html @@ -1131,7 +1131,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html index 3a572613a..60517eb74 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop.html b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop.html index 12f938bf4..36ab42380 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1async_1_1Timed__single__thread__task__loop.html @@ -538,7 +538,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager-members.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager-members.html index 1399c31a7..788ff3d15 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager-members.html @@ -138,7 +138,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager.html index bc33dae5f..dc141621c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Config__manager.html @@ -670,7 +670,7 @@

Logging assumption

Definition at line 1470 of file cfg_manager.hpp.

-

References FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), flow::cfg::Config_manager< S_d_value_set >::m_d_baseline_value_sets, flow::cfg::Config_manager< S_d_value_set >::m_d_value_sets, flow::cfg::Config_manager< S_d_value_set >::m_nickname, flow::cfg::Config_manager< S_d_value_set >::m_s_d_opt_sets, flow::util::ostream_op_string(), flow::cfg::Config_manager< S_d_value_set >::S_N_S_VALUE_SETS, and flow::cfg::Config_manager< S_d_value_set >::S_N_VALUE_SETS.

+

References FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), flow::cfg::Config_manager< S_d_value_set >::m_d_baseline_value_sets, flow::cfg::Config_manager< S_d_value_set >::m_d_value_sets, flow::cfg::Config_manager< S_d_value_set >::m_nickname, flow::cfg::Config_manager< S_d_value_set >::m_s_d_opt_sets, flow::util::ostream_op_string(), flow::cfg::Config_manager< S_d_value_set >::S_N_S_VALUE_SETS, and flow::cfg::Config_manager< S_d_value_set >::S_N_VALUE_SETS.

Here is the call graph for this function:
@@ -2863,7 +2863,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html index 98174eb79..e10ed2eb6 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html @@ -85,7 +85,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context.html index 98ed88e2a..feda0a9d9 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Dynamic__cfg__context.html @@ -403,7 +403,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set-members.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set-members.html index 848d633f9..b3b97f835 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set-members.html @@ -131,7 +131,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set.html index 89efa2c28..4135036a7 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set.html @@ -619,7 +619,7 @@

Definition at line 2042 of file option_set.hpp.

-

References FLOW_LOG_INFO, flow::util::key_exists(), and flow::log::S_TRACE.

+

References FLOW_LOG_INFO, flow::util::key_exists(), and flow::log::S_TRACE.

Referenced by flow::cfg::Config_manager< S_d_value_set >::option_set_canonicalize_or_reject().

@@ -1098,7 +1098,7 @@

Definition at line 1783 of file option_set.hpp.

-

References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::util::key_exists(), flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_args, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_call_type, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_compare_parsed_vals_args, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_option_set, flow::util::ostream_op_string(), and flow::log::S_TRACE.

+

References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::util::key_exists(), flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_args, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_call_type, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_compare_parsed_vals_args, flow::cfg::Option_set< Value_set >::Declare_options_func_args::m_option_set, flow::util::ostream_op_string(), and flow::log::S_TRACE.

Here is the call graph for this function:
@@ -1909,7 +1909,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base-members.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base-members.html index 8d7307886..c0bea7459 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base-members.html @@ -81,7 +81,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base.html index b470908a7..f9a7e8b69 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Option__set__base.html @@ -489,7 +489,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager-members.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager-members.html index 930a6373a..1e738e365 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager-members.html @@ -146,7 +146,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager.html b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager.html index b6e62f500..6f7adc0ed 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1cfg_1_1Static__config__manager.html @@ -646,7 +646,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error-members.html b/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error-members.html index 8688bd3f0..32fc4b841 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error.html b/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error.html index da68afbf5..80b5afe86 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1error_1_1Runtime__error.html @@ -289,7 +289,7 @@

Performance

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger-members.html index b4a6ed342..4ef73e339 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger-members.html @@ -126,7 +126,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger.html index dd707c58d..a0ea9debd 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Async__file__logger.html @@ -1352,7 +1352,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger-members.html index 366fca149..2406e391e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger-members.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger.html index 53e6e238f..cc1bc0732 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Buffer__logger.html @@ -553,7 +553,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component-members.html index 03ef48e03..6051ffb26 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component-members.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component.html index 856067ccc..598632747 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Component.html @@ -591,7 +591,7 @@

Log_context(..., Cool_log_component::S_WIDGETRY) // Ditto for your own code. Use your own enum.
Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
Definition: log.hpp:1619
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
Definition: node.hpp:937
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638

Now, this->get_log_component().payload_type() will equal that of Flow_log_component and Cool_log_component, respectively, within those 2 classes. In particular, a custom Logger implementation can use payload_type() – and in particular the derived payload_type_index() – to interpret the Components of values from the 2 entirely disparate enums in different ways. More in particular, the out-of-the-box Loggers use Config to do all of that without your having to worry about it (but your own Logger would potentially have to worry about it particularly if not using log::Config... though we suggest that you should, barring excellent design counter-reasons).

Returns
See above.
@@ -723,7 +723,7 @@

Rationale

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config-members.html index 4c95f85e8..bd689d399 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config-members.html @@ -109,7 +109,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config.html index 31443e46c..98c6869cd 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config.html @@ -860,7 +860,7 @@

component_names meaning

Definition at line 970 of file config.hpp.

-

References component_to_union_idx(), flow::util::key_exists(), m_component_names_by_union_idx, m_component_union_idxs_by_name, normalize_component_name(), and normalized_component_name().

+

References component_to_union_idx(), flow::util::key_exists(), m_component_names_by_union_idx, m_component_union_idxs_by_name, normalize_component_name(), and normalized_component_name().

Here is the call graph for this function:
@@ -929,7 +929,7 @@

Rationale for enum_sparse_length

Definition at line 929 of file config.hpp.

-

References flow::util::key_exists(), m_component_cfgs_by_payload_type, and m_verbosities_by_component.

+

References flow::util::key_exists(), m_component_cfgs_by_payload_type, and m_verbosities_by_component.

Here is the call graph for this function:
@@ -1629,7 +1629,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev-members.html index 71a4c1e6e..cfb6d2e7e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev-members.html @@ -78,7 +78,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html index eeb6e56f7..5b6a65e35 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html @@ -171,7 +171,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context-members.html index f96523519..fa7d639a0 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context-members.html @@ -87,7 +87,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context.html index ca62b87a2..ccb675d41 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Log__context.html @@ -365,7 +365,7 @@

References m_component.

-

Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::perf::Checkpointing_timer::Checkpointing_timer(), flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), flow::net_flow::Node::handle_syn_ack_ack_to_syn_rcvd(), flow::net_flow::Node::log_accumulated_acks(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::Node::low_lvl_packet_sent(), flow::net_flow::Node::mark_data_packet_sent(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::net_flow::Low_lvl_packet::serialize_to_raw_data_and_log(), flow::net_flow::Node::snd_flying_pkts_erase_one(), flow::net_flow::Node::snd_flying_pkts_push_one(), and flow::net_flow::Drop_timer::start_timer().

+

Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::perf::Checkpointing_timer::Checkpointing_timer(), flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), flow::net_flow::Node::handle_syn_ack_ack_to_syn_rcvd(), flow::net_flow::Node::log_accumulated_acks(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::Node::low_lvl_packet_sent(), flow::net_flow::Node::mark_data_packet_sent(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::net_flow::Low_lvl_packet::serialize_to_raw_data_and_log(), flow::net_flow::Node::snd_flying_pkts_erase_one(), flow::net_flow::Node::snd_flying_pkts_push_one(), and flow::net_flow::Drop_timer::start_timer().

Here is the caller graph for this function:
@@ -398,7 +398,7 @@

References m_logger.

-

Referenced by flow::net_flow::Node::async_low_lvl_ack_send(), flow::net_flow::Node::async_low_lvl_syn_ack_ack_send_or_close_immediately(), flow::net_flow::Node::async_no_sock_low_lvl_rst_send(), flow::net_flow::asio::Node::async_op(), flow::net_flow::Node::async_rcv_wnd_recovery(), flow::net_flow::Node::async_sock_low_lvl_rst_send(), flow::net_flow::Node::async_wait_latency_then_handle_incoming(), flow::net_flow::Node::cancel_timers(), flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::close_abruptly(), flow::cfg::Config_manager< S_d_value_set >::Config_manager(), flow::net_flow::Node::connect_with_metadata(), flow::net_flow::Node::connect_worker(), flow::perf::Checkpointing_timer::Aggregator::create_aggregated_result(), flow::net_flow::Node::create_syn(), flow::net_flow::Node::create_syn_ack(), flow::net_flow::Node::event_set_close(), flow::net_flow::Node::event_set_create(), flow::net_flow::Socket_buffer::feed_buf_move(), flow::net_flow::Socket_buffer::feed_bufs_copy(), flow::net_flow::Node::handle_incoming(), flow::net_flow::Node::handle_incoming_with_simulation(), flow::net_flow::Node::handle_syn_ack_ack_to_syn_rcvd(), flow::net_flow::Node::handle_syn_to_listening_server(), flow::net_flow::Node::listen(), flow::net_flow::Node::log_accumulated_acks(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::Node::low_lvl_packet_sent(), flow::net_flow::Node::mark_data_packet_sent(), flow::net_flow::Node::perform_regular_infrequent_tasks(), flow::async::Cross_thread_task_loop::post(), flow::async::Segregated_thread_task_loop::post_impl(), flow::net_flow::Node::receive_wnd_recovery_data_received(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::async::Segregated_thread_task_loop::Segregated_thread_task_loop(), flow::net_flow::Node::send_worker(), flow::net_flow::Low_lvl_packet::serialize_to_raw_data_and_log(), flow::net_flow::Node::serv_create_forward_plus_ctor_args(), flow::net_flow::Node::setup_connection_timers(), flow::net_flow::Node::setup_drop_timer(), flow::net_flow::Node::snd_flying_pkts_erase_one(), flow::net_flow::Node::snd_flying_pkts_push_one(), flow::net_flow::Node::sock_create_forward_plus_ctor_args(), flow::net_flow::Node::sock_data_to_reassembly_q_unless_overflow(), flow::net_flow::Node::sock_info(), flow::net_flow::Node::sock_track_new_data_after_gap_rexmit_off(), flow::async::Segregated_thread_task_loop::start(), flow::async::Cross_thread_task_loop::start(), flow::net_flow::Drop_timer::start_timer(), flow::net_flow::Node::sync_sock_low_lvl_rst_send(), flow::async::Task_qing_thread::Task_qing_thread(), flow::net_flow::Node::this_thread_init_logger_setup(), and flow::net_flow::Node::worker_run().

+

Referenced by flow::net_flow::Node::async_low_lvl_ack_send(), flow::net_flow::Node::async_low_lvl_syn_ack_ack_send_or_close_immediately(), flow::net_flow::Node::async_no_sock_low_lvl_rst_send(), flow::net_flow::asio::Node::async_op(), flow::net_flow::Node::async_rcv_wnd_recovery(), flow::net_flow::Node::async_sock_low_lvl_rst_send(), flow::net_flow::Node::async_wait_latency_then_handle_incoming(), flow::net_flow::Node::cancel_timers(), flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::close_abruptly(), flow::cfg::Config_manager< S_d_value_set >::Config_manager(), flow::net_flow::Node::connect_with_metadata(), flow::net_flow::Node::connect_worker(), flow::perf::Checkpointing_timer::Aggregator::create_aggregated_result(), flow::net_flow::Node::create_syn(), flow::net_flow::Node::create_syn_ack(), flow::net_flow::Node::event_set_close(), flow::net_flow::Node::event_set_create(), flow::net_flow::Socket_buffer::feed_buf_move(), flow::net_flow::Socket_buffer::feed_bufs_copy(), flow::net_flow::Node::handle_incoming(), flow::net_flow::Node::handle_incoming_with_simulation(), flow::net_flow::Node::handle_syn_ack_ack_to_syn_rcvd(), flow::net_flow::Node::handle_syn_to_listening_server(), flow::net_flow::Node::listen(), flow::net_flow::Node::log_accumulated_acks(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::Node::low_lvl_packet_sent(), flow::net_flow::Node::mark_data_packet_sent(), flow::net_flow::Node::perform_regular_infrequent_tasks(), flow::async::Cross_thread_task_loop::post(), flow::async::Segregated_thread_task_loop::post_impl(), flow::net_flow::Node::receive_wnd_recovery_data_received(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::async::Segregated_thread_task_loop::Segregated_thread_task_loop(), flow::net_flow::Node::send_worker(), flow::net_flow::Low_lvl_packet::serialize_to_raw_data_and_log(), flow::net_flow::Node::serv_create_forward_plus_ctor_args(), flow::net_flow::Node::setup_connection_timers(), flow::net_flow::Node::setup_drop_timer(), flow::net_flow::Node::snd_flying_pkts_erase_one(), flow::net_flow::Node::snd_flying_pkts_push_one(), flow::net_flow::Node::sock_create_forward_plus_ctor_args(), flow::net_flow::Node::sock_data_to_reassembly_q_unless_overflow(), flow::net_flow::Node::sock_info(), flow::net_flow::Node::sock_track_new_data_after_gap_rexmit_off(), flow::async::Segregated_thread_task_loop::start(), flow::async::Cross_thread_task_loop::start(), flow::net_flow::Drop_timer::start_timer(), flow::net_flow::Node::sync_sock_low_lvl_rst_send(), flow::async::Task_qing_thread::Task_qing_thread(), flow::net_flow::Node::this_thread_init_logger_setup(), and flow::net_flow::Node::worker_run().

Here is the caller graph for this function:
@@ -597,7 +597,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger-members.html index 1b0ccf220..66de9dec7 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger-members.html @@ -94,7 +94,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger.html index e466f1668..1799a3044 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Logger.html @@ -663,7 +663,7 @@

Naming rationale

Definition at line 36 of file log.cpp.

-

References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_SET_CONTEXT, FLOW_LOG_WARNING, flow::util::ostream_op_string(), and s_this_thread_nickname_ptr.

+

References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_SET_CONTEXT, FLOW_LOG_WARNING, flow::util::ostream_op_string(), and s_this_thread_nickname_ptr.

Here is the call graph for this function:
@@ -709,7 +709,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer-members.html index 25d0c8a0a..d6f208f15 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer-members.html @@ -94,7 +94,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer.html index 1741df183..703a6c0ef 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Ostream__log__msg__writer.html @@ -824,7 +824,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger-members.html index 0d8cc17a4..2b1572f96 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger-members.html @@ -113,7 +113,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger.html index 9a3c6457e..8045fc55a 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Serial__file__logger.html @@ -633,7 +633,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger-members.html index 35a919b62..d08009948 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger-members.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger.html index 96c167ebd..067f9c7dd 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Simple__ostream__logger.html @@ -505,7 +505,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender-members.html index e10b230b3..77c54fb5c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender-members.html @@ -86,7 +86,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender.html index 7a4749e82..3b1973382 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Thread__local__string__appender.html @@ -177,7 +177,7 @@
}
static Thread_local_string_appender * get_this_thread_string_appender(const util::Unique_id_holder &source_obj_id)
Returns a pointer to the exactly one Thread_local_string_appender object that is accessible from the ...
Each object of this class stores (at construction) and returns (on demand) a numeric ID unique from a...
-
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:342
+
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:367

Note, once again, that because get_this_thread_string_appender() returns a thread-local object, it is by definition impossible to corrupt anything inside it due to multiple threads writing to it. (That is unless, of course, you try passing that pointer to another thread and writing to it there, but that's basically malicious behavior; so don't do that.)

Thread safety

Well, see above. If you use class as prescribed, then it's safe to read and write without locking around object of this class.

@@ -555,7 +555,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config-members.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config-members.html index c68961a4b..1a5291bff 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config-members.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config.html b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config.html index 30f0d7c08..b55f06b62 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1log_1_1Verbosity__config.html @@ -230,7 +230,7 @@

Definition at line 157 of file verbosity_config.cpp.

-

References m_component_sev_pairs, m_last_result_message, and flow::util::ostream_op_string().

+

References m_component_sev_pairs, m_last_result_message, and flow::util::ostream_op_string().

Here is the call graph for this function:
@@ -340,7 +340,7 @@

Definition at line 44 of file verbosity_config.cpp.

-

References m_component_sev_pairs, m_last_result_message, flow::util::ostream_op_string(), S_ALL_COMPONENT_NAME_ALIAS, flow::log::Config::S_MOST_VERBOSE_SEV_DEFAULT, S_PAIR_SEPARATOR, and S_TOKEN_SEPARATOR.

+

References m_component_sev_pairs, m_last_result_message, flow::util::ostream_op_string(), S_ALL_COMPONENT_NAME_ALIAS, flow::log::Config::S_MOST_VERBOSE_SEV_DEFAULT, S_PAIR_SEPARATOR, and S_TOKEN_SEPARATOR.

Referenced by operator>>().

@@ -735,7 +735,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic-members.html index b309a352e..3c66be749 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic-members.html @@ -100,7 +100,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic.html index 9b0b01190..36305817b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic.html @@ -591,7 +591,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data-members.html index c6410810e..b18e7dbb9 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data-members.html @@ -107,7 +107,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data.html index 953676149..ebdd75fb2 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__data.html @@ -1000,7 +1000,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est-members.html index f200f33e3..9f9d0b827 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est-members.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html index 640f542b3..ccd12b955 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html @@ -747,7 +747,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector-members.html index a7a3198e4..9c5f8feb2 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector-members.html @@ -84,7 +84,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector.html index 13176dbed..de942e1b8 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__selector.html @@ -220,7 +220,7 @@

References flow::net_flow::Peer_socket_options::S_CLASSIC, and flow::net_flow::Peer_socket_options::S_CLASSIC_BANDWIDTH_ESTIMATED.

-

Referenced by flow::net_flow::Node::connect_worker(), and flow::net_flow::Node::handle_syn_to_listening_server().

+

Referenced by flow::net_flow::Node::connect_worker(), and flow::net_flow::Node::handle_syn_to_listening_server().

Here is the caller graph for this function:
@@ -439,7 +439,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy-members.html index f2f86715e..6ad7dee0c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy-members.html @@ -97,7 +97,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy.html index 1cb0d3469..5bb555d0d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Congestion__control__strategy.html @@ -656,7 +656,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer-members.html index 14560845e..53fe255f7 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer-members.html @@ -122,7 +122,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer.html index 26123bc52..dfd71346d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Drop__timer.html @@ -514,7 +514,7 @@

References Drop_timer(), and timer_failure().

-

Referenced by flow::net_flow::Node::setup_drop_timer().

+

Referenced by flow::net_flow::Node::setup_drop_timer().

Here is the call graph for this function:
@@ -620,7 +620,7 @@

Definition at line 118 of file drop_timer.cpp.

-

References disable_timer(), FLOW_LOG_TRACE, flow::util::key_exists(), m_at_events_start_oldest_flying_packet, m_during_events_newest_acked_packet, m_flying_packets, m_in_events_group, m_sock, and start_timer().

+

References disable_timer(), FLOW_LOG_TRACE, flow::util::key_exists(), m_at_events_start_oldest_flying_packet, m_during_events_newest_acked_packet, m_flying_packets, m_in_events_group, m_sock, and start_timer().

Here is the call graph for this function:
@@ -724,7 +724,7 @@

Definition at line 72 of file drop_timer.cpp.

-

References FLOW_LOG_TRACE, flow::util::key_exists(), m_during_events_newest_acked_packet, m_flying_packets, and m_in_events_group.

+

References FLOW_LOG_TRACE, flow::util::key_exists(), m_during_events_newest_acked_packet, m_flying_packets, and m_in_events_group.

Here is the call graph for this function:
@@ -1336,7 +1336,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set-members.html index e9c5e7313..093f536a9 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set-members.html @@ -137,7 +137,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set.html index 3455feaec..880db1811 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set.html @@ -1310,7 +1310,7 @@

Definition at line 761 of file event_set.cpp.

-

References flow::util::ostream_op_to_string(), and flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >::size().

+

References flow::util::ostream_op_to_string(), and flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >::size().

Referenced by clear(), flow::net_flow::Node::event_set_all_check_delta(), and events_detected().

@@ -1639,7 +1639,7 @@

Definition at line 777 of file event_set.cpp.

-

References flow::util::ostream_op_to_string().

+

References flow::util::ostream_op_to_string().

Referenced by flow::net_flow::Node::event_set_all_check_delta(), and flow::net_flow::Node::event_set_check_baseline().

@@ -2304,7 +2304,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html index aab91a60b..63b18ca09 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html @@ -77,7 +77,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html index cb039dd8f..eaeb80b8e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html @@ -138,7 +138,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html index 9ffe18e2c..4b2c98386 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html @@ -77,7 +77,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html index bb1d5620f..504fe3d67 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html @@ -127,7 +127,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator-members.html index 640d50ee9..df290992a 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator-members.html @@ -106,7 +106,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator.html index 30d7b180f..5c5bb7f0b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Net__env__simulator.html @@ -734,7 +734,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node-members.html index d5a6e1695..7c683101d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node-members.html @@ -273,7 +273,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node.html index 5661f2250..cb6561ee7 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Node.html @@ -1357,11 +1357,11 @@

Definition at line 6456 of file peer_socket.cpp.

+

Definition at line 6462 of file peer_socket.cpp.

-

References advance_seq_num().

+

References advance_seq_num().

-

Referenced by advance_seq_num(), get_seq_num_range(), and send_worker().

+

Referenced by advance_seq_num(), get_seq_num_range(), and send_worker().

Here is the call graph for this function:
@@ -1420,7 +1420,7 @@

Definition at line 6468 of file peer_socket.cpp.

+

Definition at line 6474 of file peer_socket.cpp.

@@ -1541,9 +1541,9 @@

Definition at line 5857 of file peer_socket.cpp.

+

Definition at line 5863 of file peer_socket.cpp.

-

References async_sock_low_lvl_packet_send_or_close_immediately(), FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), max_block_size(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_ESTABLISHED, and sock_rcv_wnd().

+

References async_sock_low_lvl_packet_send_or_close_immediately(), FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), max_block_size(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_ESTABLISHED, and sock_rcv_wnd().

Here is the call graph for this function:
@@ -1724,9 +1724,9 @@

Returns
See async_sock_low_lvl_packet_send().
-

Definition at line 5839 of file peer_socket.cpp.

+

Definition at line 5845 of file peer_socket.cpp.

-

References async_sock_low_lvl_packet_send_or_close_immediately(), flow::log::Log_context::get_logger(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), and sock_rcv_wnd().

+

References async_sock_low_lvl_packet_send_or_close_immediately(), flow::log::Log_context::get_logger(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), and sock_rcv_wnd().

Here is the call graph for this function:
@@ -1908,11 +1908,11 @@

Definition at line 5397 of file peer_socket.cpp.

+

Definition at line 5403 of file peer_socket.cpp.

-

References async_rcv_wnd_recovery(), async_sock_low_lvl_packet_send_or_close_immediately(), FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_task_engine, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::util::schedule_task_from_now(), and sock_rcv_wnd().

+

References async_rcv_wnd_recovery(), async_sock_low_lvl_packet_send_or_close_immediately(), FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_task_engine, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::util::schedule_task_from_now(), and sock_rcv_wnd().

-

Referenced by async_rcv_wnd_recovery(), and receive_wnd_updated().

+

Referenced by async_rcv_wnd_recovery(), and receive_wnd_updated().

Here is the call graph for this function:
@@ -2052,9 +2052,9 @@

Definition at line 1019 of file low_lvl_io.cpp.

-

References async_sock_low_lvl_packet_send_paced(), close_connection_immediately(), and socket_id().

+

References async_sock_low_lvl_packet_send_paced(), close_connection_immediately(), and socket_id().

-

Referenced by async_low_lvl_ack_send(), async_low_lvl_syn_ack_ack_send_or_close_immediately(), async_rcv_wnd_recovery(), handle_connection_rexmit_timer_event(), and send_worker().

+

Referenced by async_low_lvl_ack_send(), async_low_lvl_syn_ack_ack_send_or_close_immediately(), async_rcv_wnd_recovery(), handle_connection_rexmit_timer_event(), and send_worker().

Here is the call graph for this function:
@@ -2181,7 +2181,7 @@

References async_sock_low_lvl_packet_send_paced(), and flow::log::Log_context::get_logger().

-

Referenced by handle_incoming(), and rst_and_close_connection_immediately().

+

Referenced by handle_incoming(), and rst_and_close_connection_immediately().

Here is the call graph for this function:
@@ -2302,11 +2302,11 @@

Returns
true if should send; false if should wait until it becomes true and THEN send.
-

Definition at line 5039 of file peer_socket.cpp.

+

Definition at line 5045 of file peer_socket.cpp.

References FLOW_LOG_TRACE.

-

Referenced by send_worker().

+

Referenced by send_worker().

Here is the caller graph for this function:
@@ -2350,11 +2350,11 @@

Definition at line 4447 of file peer_socket.cpp.

+

Definition at line 4453 of file peer_socket.cpp.

References flow::log::Log_context::get_logger(), and flow::util::scheduled_task_cancel().

-

Referenced by close_connection_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and handle_syn_to_listening_server().

+

Referenced by close_connection_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and handle_syn_to_listening_server().

Here is the call graph for this function:
@@ -2437,9 +2437,9 @@

Returns
false if and only if the ack is sufficiently invalid to have made this method close the socket.
-

Definition at line 2545 of file peer_socket.cpp.

+

Definition at line 2551 of file peer_socket.cpp.

-

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::util::in_open_open_range(), flow::net_flow::Peer_socket::Sent_packet::m_packet, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, flow::net_flow::Peer_socket::Sent_packet::m_size, flow::net_flow::Peer_socket::rexmit_on(), flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, and flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION.

+

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::util::in_open_open_range(), flow::net_flow::Peer_socket::Sent_packet::m_packet, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, flow::net_flow::Peer_socket::Sent_packet::m_size, flow::net_flow::Peer_socket::rexmit_on(), flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, and flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION.

Here is the call graph for this function:
@@ -2500,9 +2500,9 @@

Returns
Iterator into sock->m_snd_flying_pkts_by_sent_when indicating the latest-sent packet that should be Dropped due to acks; past_oldest() a/k/a end() if none should be so Dropped.
-

Definition at line 2936 of file peer_socket.cpp.

+

Definition at line 2942 of file peer_socket.cpp.

-

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_acks_after_me, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

+

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_acks_after_me, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

Here is the call graph for this function:
@@ -2564,9 +2564,9 @@

Definition at line 5615 of file peer_socket.cpp.

+

Definition at line 5621 of file peer_socket.cpp.

-

References flow::async::asio_exec_ctx_post(), FLOW_ERROR_EMIT_ERROR, flow::log::Log_context::get_logger(), m_task_engine, rst_and_close_connection_immediately(), running(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::error::S_USER_CLOSED_ABRUPTLY, and socket_id().

+

References flow::async::asio_exec_ctx_post(), FLOW_ERROR_EMIT_ERROR, flow::log::Log_context::get_logger(), m_task_engine, rst_and_close_connection_immediately(), running(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::error::S_USER_CLOSED_ABRUPTLY, and socket_id().

Referenced by flow::net_flow::Peer_socket::close_abruptly().

@@ -2647,11 +2647,11 @@

Definition at line 5683 of file peer_socket.cpp.

+

Definition at line 5689 of file peer_socket.cpp.

-

References cancel_timers(), event_set_all_check_delta(), FLOW_ERROR_LOG_ERROR, FLOW_LOG_INFO, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >::insert(), m_ports, m_servs, m_sock_events, m_socks, flow::net_flow::Port_space::return_port(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Event_set::S_PEER_SOCKET_READABLE, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, serv_peer_socket_closed(), sock_disconnect_completed(), sock_disconnect_detected(), sock_load_info_struct(), sock_log_detail(), sock_set_int_state(), and socket_id().

+

References cancel_timers(), event_set_all_check_delta(), FLOW_ERROR_LOG_ERROR, FLOW_LOG_INFO, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >::insert(), m_ports, m_servs, m_sock_events, m_socks, flow::net_flow::Port_space::return_port(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Event_set::S_PEER_SOCKET_READABLE, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, serv_peer_socket_closed(), sock_disconnect_completed(), sock_disconnect_detected(), sock_load_info_struct(), sock_log_detail(), sock_set_int_state(), and socket_id().

-

Referenced by async_sock_low_lvl_packet_send_or_close_immediately(), handle_incoming(), receive_emptied_rcv_buf_while_disconnecting(), rst_and_close_connection_immediately(), and worker_run().

+

Referenced by async_sock_low_lvl_packet_send_or_close_immediately(), handle_incoming(), receive_emptied_rcv_buf_while_disconnecting(), rst_and_close_connection_immediately(), and worker_run().

Here is the call graph for this function:

@@ -2859,7 +2859,7 @@

Returns
Shared pointer to Peer_socket, which is in the S_OPEN main state; or null pointer, indicating an error.
-

Definition at line 3944 of file peer_socket.cpp.

+

Definition at line 3950 of file peer_socket.cpp.

@@ -2916,11 +2916,11 @@

Returns
See connect().
-

Definition at line 3951 of file peer_socket.cpp.

+

Definition at line 3957 of file peer_socket.cpp.

-

References flow::async::asio_exec_ctx_post(), connect_with_metadata(), FLOW_ERROR_EMIT_ERROR, FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::max_block_size(), flow::net_flow::error::S_CONN_METADATA_TOO_LARGE, and flow::net_flow::error::S_NODE_NOT_RUNNING.

+

References flow::async::asio_exec_ctx_post(), connect_with_metadata(), FLOW_ERROR_EMIT_ERROR, FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::max_block_size(), flow::net_flow::error::S_CONN_METADATA_TOO_LARGE, and flow::net_flow::error::S_NODE_NOT_RUNNING.

-

Referenced by flow::net_flow::asio::Node::async_connect_impl(), and connect_with_metadata().

+

Referenced by flow::net_flow::asio::Node::async_connect_impl(), and connect_with_metadata().

Here is the call graph for this function:
@@ -2995,9 +2995,9 @@

Definition at line 4005 of file peer_socket.cpp.

+

Definition at line 4011 of file peer_socket.cpp.

-

References flow::net_flow::Congestion_control_selector::create_strategy(), FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), flow::util::key_exists(), flow::net_flow::Peer_socket::m_opts, flow::net_flow::Peer_socket::m_opts_mutex, flow::net_flow::Remote_endpoint::m_udp_endpoint, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::error::S_CANNOT_CONNECT_TO_IP_ANY, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::S_PORT_ANY, flow::net_flow::Peer_socket::S_SYN_SENT, flow::net_flow::Peer_socket::Send_bandwidth_estimator, flow::net_flow::Sequence_number::set_metadata(), and socket_id().

+

References flow::net_flow::Congestion_control_selector::create_strategy(), FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), flow::util::key_exists(), flow::net_flow::Peer_socket::m_opts, flow::net_flow::Peer_socket::m_opts_mutex, flow::net_flow::Remote_endpoint::m_udp_endpoint, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::error::S_CANNOT_CONNECT_TO_IP_ANY, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::S_PORT_ANY, flow::net_flow::Peer_socket::S_SYN_SENT, flow::net_flow::Peer_socket::Send_bandwidth_estimator, flow::net_flow::Sequence_number::set_metadata(), and socket_id().

Here is the call graph for this function:
@@ -3041,11 +3041,11 @@

Returns
Pointer to new packet object suitable for async_sock_low_lvl_packet_send_paced() without having to fill any further data members in the object.
-

Definition at line 5811 of file peer_socket.cpp.

+

Definition at line 5817 of file peer_socket.cpp.

References flow::log::Log_context::get_logger().

-

Referenced by handle_connection_rexmit_timer_event().

+

Referenced by handle_connection_rexmit_timer_event().

Here is the call graph for this function:
@@ -3094,11 +3094,11 @@

Returns
See create_syn().
-

Definition at line 5826 of file peer_socket.cpp.

+

Definition at line 5832 of file peer_socket.cpp.

References flow::log::Log_context::get_logger().

-

Referenced by handle_connection_rexmit_timer_event(), and handle_syn_to_listening_server().

+

Referenced by handle_connection_rexmit_timer_event(), and handle_syn_to_listening_server().

Here is the call graph for this function:
@@ -3203,9 +3203,9 @@

Returns
true normally; false if too many retransmissions detected, and thus sock was closed.
-

Definition at line 3102 of file peer_socket.cpp.

+

Definition at line 3108 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_sent_time, and flow::net_flow::Peer_socket::rexmit_on().

+

References flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_sent_time, and flow::net_flow::Peer_socket::rexmit_on().

Here is the call graph for this function:
@@ -3259,11 +3259,11 @@

Definition at line 3317 of file peer_socket.cpp.

+

Definition at line 3323 of file peer_socket.cpp.

References FLOW_LOG_INFO, flow::net_flow::Peer_socket::rexmit_on(), and flow::net_flow::Peer_socket::S_ESTABLISHED.

-

Referenced by setup_drop_timer().

+

Referenced by setup_drop_timer().

Here is the call graph for this function:
@@ -3384,9 +3384,9 @@

Definition at line 1129 of file event_set.cpp.

-

References flow::net_flow::Event_set::clear_ev_type_to_socks_map(), flow::util::Linked_hash_set< Key, Hash, Pred >::empty(), flow::net_flow::Event_set::ev_type_to_socks_map_entry_is_empty(), flow::net_flow::Event_set::ev_type_to_socks_map_sizes_to_str(), FLOW_LOG_TRACE, flow::util::Linked_hash_set< Key, Hash, Pred >::insert(), flow::util::key_exists(), flow::net_flow::Event_set::S_WAITING, flow::util::Linked_hash_set< Key, Hash, Pred >::size(), and flow::net_flow::Event_set::sock_as_any_to_str().

+

References flow::net_flow::Event_set::clear_ev_type_to_socks_map(), flow::util::Linked_hash_set< Key, Hash, Pred >::empty(), flow::net_flow::Event_set::ev_type_to_socks_map_entry_is_empty(), flow::net_flow::Event_set::ev_type_to_socks_map_sizes_to_str(), FLOW_LOG_TRACE, flow::util::Linked_hash_set< Key, Hash, Pred >::insert(), flow::util::key_exists(), flow::net_flow::Event_set::S_WAITING, flow::util::Linked_hash_set< Key, Hash, Pred >::size(), and flow::net_flow::Event_set::sock_as_any_to_str().

-

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_syn_ack_ack_to_syn_rcvd(), perform_accumulated_on_recv_tasks(), and send_worker().

+

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_syn_ack_ack_to_syn_rcvd(), perform_accumulated_on_recv_tasks(), and send_worker().

Here is the call graph for this function:
@@ -3850,9 +3850,9 @@

Definition at line 6479 of file peer_socket.cpp.

+

Definition at line 6485 of file peer_socket.cpp.

-

References advance_seq_num().

+

References advance_seq_num().

Here is the call graph for this function:
@@ -3907,9 +3907,9 @@

Definition at line 2061 of file peer_socket.cpp.

+

Definition at line 2067 of file peer_socket.cpp.

-

References FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_sent_cwnd_bytes, flow::net_flow::Peer_socket::rexmit_on(), flow::net_flow::Peer_socket::S_ESTABLISHED, and flow::util::setup_auto_cleanup().

+

References FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_order_num, flow::net_flow::Peer_socket::Sent_packet::Sent_when::m_sent_cwnd_bytes, flow::net_flow::Peer_socket::rexmit_on(), flow::net_flow::Peer_socket::S_ESTABLISHED, and flow::util::setup_auto_cleanup().

Referenced by perform_accumulated_on_recv_tasks().

@@ -3972,7 +3972,7 @@

Definition at line 1638 of file peer_socket.cpp.

+

Definition at line 1644 of file peer_socket.cpp.

References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_ESTABLISHED, and flow::net_flow::error::S_INTERNAL_ERROR_SYSTEM_ERROR_ASIO_TIMER.

@@ -4030,7 +4030,7 @@

Definition at line 1990 of file peer_socket.cpp.

+

Definition at line 1996 of file peer_socket.cpp.

References FLOW_LOG_TRACE.

@@ -4087,9 +4087,9 @@

Definition at line 4402 of file peer_socket.cpp.

+

Definition at line 4408 of file peer_socket.cpp.

-

References async_sock_low_lvl_packet_send_or_close_immediately(), create_syn(), create_syn_ack(), FLOW_LOG_INFO, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, setup_connection_timers(), sock_rcv_wnd(), and socket_id().

+

References async_sock_low_lvl_packet_send_or_close_immediately(), create_syn(), create_syn_ack(), FLOW_LOG_INFO, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, setup_connection_timers(), sock_rcv_wnd(), and socket_id().

Here is the call graph for this function:
@@ -4160,7 +4160,7 @@

Definition at line 560 of file peer_socket.cpp.

-

References flow::util::buffers_dump_string(), flow::net_flow::Peer_socket_receive_stats_accumulator::error_data_packet(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_to_send_ack_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::late_or_dupe_data_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::late_or_dupe_to_send_ack_packet(), flow::net_flow::Peer_socket::rexmit_on(), and flow::net_flow::Peer_socket_receive_stats_accumulator::total_data_packet().

+

References flow::util::buffers_dump_string(), flow::net_flow::Peer_socket_receive_stats_accumulator::error_data_packet(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_to_send_ack_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::late_or_dupe_data_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::late_or_dupe_to_send_ack_packet(), flow::net_flow::Peer_socket::rexmit_on(), and flow::net_flow::Peer_socket_receive_stats_accumulator::total_data_packet().

Referenced by handle_incoming(), and handle_syn_ack_ack_to_syn_rcvd().

@@ -4282,7 +4282,7 @@

Definition at line 426 of file node.cpp.

-

References async_no_sock_low_lvl_rst_send(), async_sock_low_lvl_rst_send(), close_connection_immediately(), flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), handle_ack_to_established(), handle_data_to_established(), handle_data_to_syn_rcvd(), handle_syn_ack_ack_to_syn_rcvd(), handle_syn_ack_to_established(), handle_syn_ack_to_syn_sent(), handle_syn_to_listening_server(), flow::net_flow::Node_options::m_dyn_guarantee_one_low_lvl_in_buf_per_socket, m_opts, m_servs, m_socks, max_block_size(), opt(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_CONN_REFUSED, flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::error::S_CONN_RESET_BY_OTHER_SIDE, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Server_socket::S_LISTENING, flow::net_flow::S_PORT_ANY, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, and socket_id().

+

References async_no_sock_low_lvl_rst_send(), async_sock_low_lvl_rst_send(), close_connection_immediately(), flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), handle_ack_to_established(), handle_data_to_established(), handle_data_to_syn_rcvd(), handle_syn_ack_ack_to_syn_rcvd(), handle_syn_ack_to_established(), handle_syn_ack_to_syn_sent(), handle_syn_to_listening_server(), flow::net_flow::Node_options::m_dyn_guarantee_one_low_lvl_in_buf_per_socket, m_opts, m_servs, m_socks, max_block_size(), opt(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_CONN_REFUSED, flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::error::S_CONN_RESET_BY_OTHER_SIDE, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Server_socket::S_LISTENING, flow::net_flow::S_PORT_ANY, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, and socket_id().

Referenced by async_wait_latency_then_handle_incoming(), and handle_incoming_with_simulation().

@@ -4425,7 +4425,7 @@

Definition at line 583 of file server_socket.cpp.

-

References cancel_timers(), event_set_all_check_delta(), FLOW_LOG_DATA_WITHOUT_CHECKING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_TRACE_WITHOUT_CHECKING, FLOW_LOG_WARNING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), handle_data_to_established(), m_sock_events, rst_and_close_connection_immediately(), flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::Peer_socket::S_CONNECTED, flow::log::S_DATA, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Event_set::S_SERVER_SOCKET_ACCEPTABLE, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::log::S_TRACE, serv_peer_socket_acceptable(), setup_drop_timer(), sock_set_int_state(), sock_set_state(), and socket_id().

+

References cancel_timers(), event_set_all_check_delta(), FLOW_LOG_DATA_WITHOUT_CHECKING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_TRACE_WITHOUT_CHECKING, FLOW_LOG_WARNING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), handle_data_to_established(), m_sock_events, rst_and_close_connection_immediately(), flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::Peer_socket::S_CONNECTED, flow::log::S_DATA, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Event_set::S_SERVER_SOCKET_ACCEPTABLE, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::log::S_TRACE, serv_peer_socket_acceptable(), setup_drop_timer(), sock_set_int_state(), sock_set_state(), and socket_id().

Referenced by handle_incoming().

@@ -4620,7 +4620,7 @@

Definition at line 433 of file server_socket.cpp.

-

References async_no_sock_low_lvl_rst_send(), async_sock_low_lvl_packet_send_paced(), cancel_timers(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::const_ptr_cast(), flow::net_flow::Congestion_control_selector::create_strategy(), create_syn_ack(), FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::net_flow::Sequence_number::Generator::generate_init_seq_num(), flow::log::Log_context::get_logger(), flow::util::key_exists(), flow::net_flow::Node_options::m_dyn_sock_opts, m_opts, m_opts_mutex, m_rnd_security_tokens, m_seq_num_generator, m_socks, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Peer_socket::S_SYN_RCVD, serv_peer_socket_init(), flow::net_flow::Sequence_number::set_metadata(), setup_connection_timers(), sock_create(), sock_rcv_wnd(), sock_set_int_state(), sock_set_state(), and socket_id().

+

References async_no_sock_low_lvl_rst_send(), async_sock_low_lvl_packet_send_paced(), cancel_timers(), flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::const_ptr_cast(), flow::net_flow::Congestion_control_selector::create_strategy(), create_syn_ack(), FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::net_flow::Sequence_number::Generator::generate_init_seq_num(), flow::log::Log_context::get_logger(), flow::util::key_exists(), flow::net_flow::Node_options::m_dyn_sock_opts, m_opts, m_opts_mutex, m_rnd_security_tokens, m_seq_num_generator, m_socks, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_OPEN, flow::net_flow::Peer_socket::S_SYN_RCVD, serv_peer_socket_init(), flow::net_flow::Sequence_number::set_metadata(), setup_connection_timers(), sock_create(), sock_rcv_wnd(), sock_set_int_state(), sock_set_state(), and socket_id().

Referenced by handle_incoming().

@@ -4895,7 +4895,7 @@

Definition at line 218 of file server_socket.cpp.

-

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::util::key_exists(), m_ports, m_servs, flow::net_flow::Port_space::reserve_port(), flow::net_flow::Port_space::return_port(), flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::Server_socket::S_LISTENING, flow::net_flow::S_PORT_ANY, serv_create(), serv_set_state(), and sock_validate_options().

+

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::util::key_exists(), m_ports, m_servs, flow::net_flow::Port_space::reserve_port(), flow::net_flow::Port_space::return_port(), flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::Server_socket::S_LISTENING, flow::net_flow::S_PORT_ANY, serv_create(), serv_set_state(), and sock_validate_options().

Referenced by listen().

@@ -4971,7 +4971,7 @@

Definition at line 3266 of file peer_socket.cpp.

+

Definition at line 3272 of file peer_socket.cpp.

References FLOW_LOG_DATA_WITHOUT_CHECKING, FLOW_LOG_TRACE, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::log::S_DATA, and flow::net_flow::Peer_socket::S_ESTABLISHED.

@@ -5027,11 +5027,11 @@

Definition at line 1904 of file peer_socket.cpp.

+

Definition at line 1910 of file peer_socket.cpp.

-

References FLOW_LOG_TRACE, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::util::ostream_op_to_string(), flow::log::S_DATA, and flow::log::S_INFO.

+

References FLOW_LOG_TRACE, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::util::ostream_op_to_string(), flow::log::S_DATA, and flow::log::S_INFO.

-

Referenced by sock_log_detail().

+

Referenced by sock_log_detail().

Here is the call graph for this function:
@@ -5091,11 +5091,11 @@

Definition at line 3635 of file peer_socket.cpp.

+

Definition at line 3641 of file peer_socket.cpp.

-

References FLOW_LOG_TRACE, FLOW_LOG_WITH_CHECKING, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::util::ostream_op_to_string(), flow::net_flow::Peer_socket::rexmit_on(), flow::log::S_DATA, flow::log::S_INFO, and flow::log::S_TRACE.

+

References FLOW_LOG_TRACE, FLOW_LOG_WITH_CHECKING, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::util::ostream_op_to_string(), flow::net_flow::Peer_socket::rexmit_on(), flow::log::S_DATA, flow::log::S_INFO, and flow::log::S_TRACE.

-

Referenced by sock_log_detail().

+

Referenced by sock_log_detail().

Here is the call graph for this function:
@@ -5295,7 +5295,7 @@

Definition at line 422 of file low_lvl_io.cpp.

-

References FLOW_LOG_TRACE_WITHOUT_CHECKING, FLOW_LOG_WARNING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

+

References FLOW_LOG_TRACE_WITHOUT_CHECKING, FLOW_LOG_WARNING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

Referenced by async_low_lvl_packet_send_impl().

@@ -5505,7 +5505,7 @@

References m_opts_mutex.

-

Referenced by async_low_lvl_packet_send_impl(), handle_incoming(), low_lvl_recv_and_handle(), max_block_size(), options(), sock_load_info_struct(), sock_pacing_new_time_slice(), sync_sock_low_lvl_rst_send(), and worker_run().

+

Referenced by async_low_lvl_packet_send_impl(), handle_incoming(), low_lvl_recv_and_handle(), max_block_size(), options(), sock_load_info_struct(), sock_pacing_new_time_slice(), sync_sock_low_lvl_rst_send(), and worker_run().

Here is the caller graph for this function:
@@ -5582,7 +5582,7 @@

Definition at line 375 of file node.cpp.

-

References event_set_all_check_delta(), handle_accumulated_acks(), handle_accumulated_pending_acks(), m_socks_with_accumulated_acks, m_socks_with_accumulated_pending_acks, and socket_id().

+

References event_set_all_check_delta(), handle_accumulated_acks(), handle_accumulated_pending_acks(), m_socks_with_accumulated_acks, m_socks_with_accumulated_pending_acks, and socket_id().

Referenced by async_wait_latency_then_handle_incoming(), and low_lvl_recv_and_handle().

@@ -5635,7 +5635,7 @@

Definition at line 1117 of file node.cpp.

-

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_socks, m_task_engine, perform_regular_infrequent_tasks(), S_REGULAR_INFREQUENT_TASKS_PERIOD, flow::util::schedule_task_from_now(), and sock_log_detail().

+

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), m_socks, m_task_engine, perform_regular_infrequent_tasks(), S_REGULAR_INFREQUENT_TASKS_PERIOD, flow::util::schedule_task_from_now(), and sock_log_detail().

Referenced by perform_regular_infrequent_tasks(), and worker_run().

@@ -5689,9 +5689,9 @@

Returns
See above.
-

Definition at line 6097 of file peer_socket.cpp.

+

Definition at line 6103 of file peer_socket.cpp.

-

Referenced by sock_is_readable().

+

Referenced by sock_is_readable().

Here is the caller graph for this function:
@@ -5814,9 +5814,9 @@

Returns
See Peer_socket::receive().
-

Definition at line 5083 of file peer_socket.cpp.

+

Definition at line 5089 of file peer_socket.cpp.

-

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, m_task_engine, receive_emptied_rcv_buf_while_disconnecting(), receive_wnd_updated(), running(), flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::error::S_NODE_NOT_RUNNING, and flow::net_flow::Peer_socket::S_OPEN.

+

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, m_task_engine, receive_emptied_rcv_buf_while_disconnecting(), receive_wnd_updated(), running(), flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::error::S_NODE_NOT_RUNNING, and flow::net_flow::Peer_socket::S_OPEN.

Referenced by flow::net_flow::Peer_socket::node_receive(), and flow::net_flow::Peer_socket::node_sync_receive().

@@ -5867,11 +5867,11 @@

Definition at line 5551 of file peer_socket.cpp.

+

Definition at line 5557 of file peer_socket.cpp.

-

References close_connection_immediately(), FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, and socket_id().

+

References close_connection_immediately(), FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, and socket_id().

-

Referenced by receive().

+

Referenced by receive().

Here is the call graph for this function:
@@ -5920,7 +5920,7 @@

Definition at line 5485 of file peer_socket.cpp.

+

Definition at line 5491 of file peer_socket.cpp.

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), and flow::util::scheduled_task_cancel().

@@ -5965,11 +5965,11 @@

Definition at line 5263 of file peer_socket.cpp.

+

Definition at line 5269 of file peer_socket.cpp.

-

References async_rcv_wnd_recovery(), FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_ESTABLISHED, and sock_rcv_wnd().

+

References async_rcv_wnd_recovery(), FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_ESTABLISHED, and sock_rcv_wnd().

-

Referenced by receive().

+

Referenced by receive().

Here is the call graph for this function:
@@ -6042,11 +6042,11 @@

Definition at line 5803 of file peer_socket.cpp.

+

Definition at line 5809 of file peer_socket.cpp.

-

References async_sock_low_lvl_rst_send(), close_connection_immediately(), and socket_id().

+

References async_sock_low_lvl_rst_send(), close_connection_immediately(), and socket_id().

-

Referenced by close_abruptly(), handle_syn_ack_ack_to_syn_rcvd(), setup_drop_timer(), and sock_pacing_time_slice_end().

+

Referenced by close_abruptly(), handle_syn_ack_ack_to_syn_rcvd(), setup_drop_timer(), and sock_pacing_time_slice_end().

Here is the call graph for this function:
@@ -6084,7 +6084,7 @@

References m_task_engine.

-

Referenced by close_abruptly(), listen(), receive(), send(), set_options(), sock_info(), sock_set_options(), and sync_op().

+

Referenced by close_abruptly(), listen(), receive(), send(), set_options(), sock_info(), sock_set_options(), and sync_op().

Here is the caller graph for this function:
@@ -6154,9 +6154,9 @@

Returns
See Peer_socket::send().
-

Definition at line 4520 of file peer_socket.cpp.

+

Definition at line 4526 of file peer_socket.cpp.

-

References FLOW_ERROR_EMIT_ERROR, FLOW_ERROR_EMIT_ERROR_LOG_INFO, m_task_engine, running(), flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Peer_socket::S_OPEN, send_worker_check_state(), and snd_deqable().

+

References FLOW_ERROR_EMIT_ERROR, FLOW_ERROR_EMIT_ERROR_LOG_INFO, m_task_engine, running(), flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_CONNECTING, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Peer_socket::S_OPEN, send_worker_check_state(), and snd_deqable().

Referenced by flow::net_flow::Peer_socket::node_send(), and flow::net_flow::Peer_socket::node_sync_send().

@@ -6220,11 +6220,11 @@

Definition at line 4792 of file peer_socket.cpp.

+

Definition at line 4798 of file peer_socket.cpp.

-

References advance_seq_num(), async_sock_low_lvl_packet_send_or_close_immediately(), can_send(), flow::net_flow::Socket_buffer::consume_buf_move(), flow::net_flow::Socket_buffer::data_size(), event_set_all_check_delta(), FLOW_LOG_DATA, FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_sock_events, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, snd_buf_enqable(), snd_deqable(), snd_flying_pkts_push_one(), snd_past_last_flying_datum_seq_num(), and sock_get_new_snd_order_num().

+

References advance_seq_num(), async_sock_low_lvl_packet_send_or_close_immediately(), can_send(), flow::net_flow::Socket_buffer::consume_buf_move(), flow::net_flow::Socket_buffer::data_size(), event_set_all_check_delta(), FLOW_LOG_DATA, FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_sock_events, flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast(), flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, snd_buf_enqable(), snd_deqable(), snd_flying_pkts_push_one(), snd_past_last_flying_datum_seq_num(), and sock_get_new_snd_order_num().

-

Referenced by send_worker_check_state().

+

Referenced by send_worker_check_state().

Here is the call graph for this function:
@@ -6274,11 +6274,11 @@

Definition at line 4747 of file peer_socket.cpp.

+

Definition at line 4753 of file peer_socket.cpp.

-

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, and send_worker().

+

References FLOW_LOG_INFO, FLOW_LOG_WARNING, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_ESTABLISHED, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, and send_worker().

-

Referenced by send().

+

Referenced by send().

Here is the call graph for this function:
@@ -6608,7 +6608,7 @@

Definition at line 786 of file server_socket.cpp.

-

Referenced by close_connection_immediately().

+

Referenced by close_connection_immediately().

Here is the caller graph for this function:
@@ -6841,11 +6841,11 @@

Definition at line 4323 of file peer_socket.cpp.

+

Definition at line 4329 of file peer_socket.cpp.

References FLOW_LOG_INFO, flow::log::Log_context::get_logger(), flow::net_flow::error::S_CONN_TIMEOUT, flow::net_flow::Peer_socket::S_SYN_RCVD, flow::net_flow::Peer_socket::S_SYN_SENT, flow::util::schedule_task_from_now(), flow::util::scheduled_task_fired(), and flow::util::scheduled_task_fires_from_now_or_canceled().

-

Referenced by handle_connection_rexmit_timer_event(), and handle_syn_to_listening_server().

+

Referenced by handle_connection_rexmit_timer_event(), and handle_syn_to_listening_server().

Here is the call graph for this function:
@@ -6905,9 +6905,9 @@

Definition at line 4498 of file peer_socket.cpp.

+

Definition at line 4504 of file peer_socket.cpp.

-

References flow::net_flow::Drop_timer::create_drop_timer(), drop_timer_action(), flow::log::Log_context::get_logger(), m_task_engine, rst_and_close_connection_immediately(), and socket_id().

+

References flow::net_flow::Drop_timer::create_drop_timer(), drop_timer_action(), flow::log::Log_context::get_logger(), m_task_engine, rst_and_close_connection_immediately(), and socket_id().

Referenced by handle_syn_ack_ack_to_syn_rcvd().

@@ -6961,9 +6961,9 @@

Returns
See above.
-

Definition at line 6080 of file peer_socket.cpp.

+

Definition at line 6086 of file peer_socket.cpp.

-

Referenced by send_worker(), and sock_is_writable().

+

Referenced by send_worker(), and sock_is_writable().

Here is the caller graph for this function:
@@ -7007,9 +7007,9 @@

Returns
See above.
-

Definition at line 6074 of file peer_socket.cpp.

+

Definition at line 6080 of file peer_socket.cpp.

-

Referenced by send(), and send_worker().

+

Referenced by send(), and send_worker().

Here is the caller graph for this function:
@@ -7063,9 +7063,9 @@

Definition at line 3781 of file peer_socket.cpp.

+

Definition at line 3787 of file peer_socket.cpp.

-

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_packet, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

+

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket::Sent_packet::m_packet, flow::net_flow::Peer_socket::Sent_packet::m_sent_when, and flow::log::S_TRACE.

Here is the call graph for this function:
@@ -7126,11 +7126,11 @@

Definition at line 3818 of file peer_socket.cpp.

+

Definition at line 3824 of file peer_socket.cpp.

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), and flow::log::S_TRACE.

-

Referenced by send_worker().

+

Referenced by send_worker().

Here is the call graph for this function:
@@ -7205,7 +7205,7 @@

Definition at line 3884 of file peer_socket.cpp.

+

Definition at line 3890 of file peer_socket.cpp.

References FLOW_LOG_TRACE.

@@ -7246,9 +7246,9 @@

Returns
See above.
-

Definition at line 3760 of file peer_socket.cpp.

+

Definition at line 3766 of file peer_socket.cpp.

-

Referenced by send_worker().

+

Referenced by send_worker().

Here is the caller graph for this function:
@@ -7329,7 +7329,7 @@

Definition at line 825 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket_receive_stats_accumulator::error_data_packet(), FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::net_flow::Peer_socket::m_rcv_init_seq_num, flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, and flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION.

+

References flow::net_flow::Peer_socket_receive_stats_accumulator::error_data_packet(), FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::net_flow::Peer_socket::m_rcv_init_seq_num, flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, and flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION.

Here is the call graph for this function:
@@ -7374,7 +7374,7 @@

flow::net_flow::asio::Node.

-

Definition at line 6500 of file peer_socket.cpp.

+

Definition at line 6506 of file peer_socket.cpp.

Referenced by handle_syn_to_listening_server().

@@ -7546,7 +7546,7 @@

Definition at line 1320 of file peer_socket.cpp.

-

References FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_accepted_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_dropped_reassembly_q_overflow_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_first_qd_packet(), and flow::util::subtract_with_floor().

+

References FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_accepted_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_dropped_reassembly_q_overflow_packet(), flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_first_qd_packet(), and flow::util::subtract_with_floor().

Here is the call graph for this function:
@@ -7589,11 +7589,11 @@

Definition at line 6155 of file peer_socket.cpp.

+

Definition at line 6161 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, sock_free_memory(), and sock_set_state().

+

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, sock_free_memory(), and sock_set_state().

-

Referenced by close_connection_immediately().

+

Referenced by close_connection_immediately().

Here is the call graph for this function:
@@ -7664,11 +7664,11 @@

Definition at line 6134 of file peer_socket.cpp.

+

Definition at line 6140 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, sock_free_memory(), and sock_set_state().

+

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_DISCONNECTING, flow::net_flow::Peer_socket::S_OPEN, sock_free_memory(), and sock_set_state().

-

Referenced by close_connection_immediately().

+

Referenced by close_connection_immediately().

Here is the call graph for this function:
@@ -7717,9 +7717,9 @@

Definition at line 6168 of file peer_socket.cpp.

+

Definition at line 6174 of file peer_socket.cpp.

-

Referenced by sock_disconnect_completed(), and sock_disconnect_detected().

+

Referenced by sock_disconnect_completed(), and sock_disconnect_detected().

Here is the caller graph for this function:
@@ -7764,9 +7764,9 @@

Returns
See above.
-

Definition at line 6494 of file peer_socket.cpp.

+

Definition at line 6500 of file peer_socket.cpp.

-

Referenced by send_worker().

+

Referenced by send_worker().

Here is the caller graph for this function:
@@ -7817,9 +7817,9 @@

Returns
See Peer_socket::info().
-

Definition at line 6338 of file peer_socket.cpp.

+

Definition at line 6344 of file peer_socket.cpp.

-

References flow::async::asio_exec_ctx_post(), flow::log::Log_context::get_logger(), m_task_engine, running(), and sock_load_info_struct().

+

References flow::async::asio_exec_ctx_post(), flow::log::Log_context::get_logger(), m_task_engine, running(), and sock_load_info_struct().

Referenced by flow::net_flow::Peer_socket::info().

@@ -7871,9 +7871,9 @@

Returns
See above.
-

Definition at line 5233 of file peer_socket.cpp.

+

Definition at line 5239 of file peer_socket.cpp.

-

References rcv_buf_deqable(), and flow::net_flow::Peer_socket::S_CLOSED.

+

References rcv_buf_deqable(), and flow::net_flow::Peer_socket::S_CLOSED.

Here is the call graph for this function:
@@ -7917,9 +7917,9 @@

Returns
See above.
-

Definition at line 4713 of file peer_socket.cpp.

+

Definition at line 4719 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_DISCONNECTING, and snd_buf_enqable().

+

References flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::Peer_socket::S_CONNECTED, flow::net_flow::Peer_socket::S_DISCONNECTING, and snd_buf_enqable().

Here is the call graph for this function:
@@ -7974,11 +7974,11 @@

Definition at line 6382 of file peer_socket.cpp.

+

Definition at line 6388 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket_info::m_disconnect_cause, flow::net_flow::Peer_socket_info::m_int_state_str, flow::net_flow::Peer_socket_info::m_is_active_connect, flow::net_flow::Peer_socket_info::m_low_lvl_max_buf_size, m_low_lvl_max_buf_size, flow::net_flow::Peer_socket_info::m_node_opts, m_opts, flow::net_flow::Peer_socket_info::m_rcv, flow::net_flow::Peer_socket_info::m_rcv_buf_size, flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps, flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size, flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size, flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_q_size, flow::net_flow::Peer_socket_info::m_rcv_wnd, flow::net_flow::Peer_socket_info::m_rcv_wnd_last_advertised, flow::net_flow::Peer_socket_info::m_snd, flow::net_flow::Peer_socket_info::m_snd_buf_size, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_in_flight_bytes, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_in_flight_count, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_wnd_bytes, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_wnd_count_approx, flow::net_flow::Peer_socket_info::m_snd_drop_timeout, flow::net_flow::Peer_socket_info::m_snd_est_bandwidth_mbit_per_sec, flow::net_flow::Peer_socket_info::m_snd_pacing_bytes_allowed_this_slice, flow::net_flow::Peer_socket_info::m_snd_pacing_packet_q_size, flow::net_flow::Peer_socket_info::m_snd_pacing_slice_period, flow::net_flow::Peer_socket_info::m_snd_pacing_slice_start, flow::net_flow::Peer_socket_info::m_snd_rcv_wnd, flow::net_flow::Peer_socket_info::m_snd_round_trip_time_variance, flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time, flow::net_flow::Peer_socket_info::m_sock_opts, opt(), and sock_rcv_wnd().

+

References flow::net_flow::Peer_socket_info::m_disconnect_cause, flow::net_flow::Peer_socket_info::m_int_state_str, flow::net_flow::Peer_socket_info::m_is_active_connect, flow::net_flow::Peer_socket_info::m_low_lvl_max_buf_size, m_low_lvl_max_buf_size, flow::net_flow::Peer_socket_info::m_node_opts, m_opts, flow::net_flow::Peer_socket_info::m_rcv, flow::net_flow::Peer_socket_info::m_rcv_buf_size, flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps, flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size, flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size, flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_q_size, flow::net_flow::Peer_socket_info::m_rcv_wnd, flow::net_flow::Peer_socket_info::m_rcv_wnd_last_advertised, flow::net_flow::Peer_socket_info::m_snd, flow::net_flow::Peer_socket_info::m_snd_buf_size, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_in_flight_bytes, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_in_flight_count, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_wnd_bytes, flow::net_flow::Peer_socket_info::m_snd_cong_ctl_wnd_count_approx, flow::net_flow::Peer_socket_info::m_snd_drop_timeout, flow::net_flow::Peer_socket_info::m_snd_est_bandwidth_mbit_per_sec, flow::net_flow::Peer_socket_info::m_snd_pacing_bytes_allowed_this_slice, flow::net_flow::Peer_socket_info::m_snd_pacing_packet_q_size, flow::net_flow::Peer_socket_info::m_snd_pacing_slice_period, flow::net_flow::Peer_socket_info::m_snd_pacing_slice_start, flow::net_flow::Peer_socket_info::m_snd_rcv_wnd, flow::net_flow::Peer_socket_info::m_snd_round_trip_time_variance, flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time, flow::net_flow::Peer_socket_info::m_sock_opts, opt(), and sock_rcv_wnd().

-

Referenced by close_connection_immediately(), sock_info(), and sock_log_detail().

+

Referenced by close_connection_immediately(), sock_info(), and sock_log_detail().

Here is the call graph for this function:
@@ -8027,11 +8027,11 @@

Definition at line 6435 of file peer_socket.cpp.

+

Definition at line 6441 of file peer_socket.cpp.

-

References FLOW_LOG_INFO, log_rcv_window(), log_snd_window(), and sock_load_info_struct().

+

References FLOW_LOG_INFO, log_rcv_window(), log_snd_window(), and sock_load_info_struct().

-

Referenced by close_connection_immediately(), and perform_regular_infrequent_tasks().

+

Referenced by close_connection_immediately(), and perform_regular_infrequent_tasks().

Here is the call graph for this function:
@@ -8347,7 +8347,7 @@

Definition at line 969 of file low_lvl_io.cpp.

-

References FLOW_LOG_TRACE, rst_and_close_connection_immediately(), flow::net_flow::Peer_socket::S_CLOSED, sock_pacing_new_time_slice(), sock_pacing_process_q(), and socket_id().

+

References FLOW_LOG_TRACE, rst_and_close_connection_immediately(), flow::net_flow::Peer_socket::S_CLOSED, sock_pacing_new_time_slice(), sock_pacing_process_q(), and socket_id().

Referenced by sock_pacing_process_q().

@@ -8448,9 +8448,9 @@

Returns
See above.
-

Definition at line 5518 of file peer_socket.cpp.

+

Definition at line 5524 of file peer_socket.cpp.

-

Referenced by async_low_lvl_ack_send(), async_low_lvl_syn_ack_ack_send_or_close_immediately(), async_rcv_wnd_recovery(), handle_connection_rexmit_timer_event(), handle_syn_to_listening_server(), receive_wnd_updated(), and sock_load_info_struct().

+

Referenced by async_low_lvl_ack_send(), async_low_lvl_syn_ack_ack_send_or_close_immediately(), async_rcv_wnd_recovery(), handle_connection_rexmit_timer_event(), handle_syn_to_listening_server(), receive_wnd_updated(), and sock_load_info_struct().

Here is the caller graph for this function:
@@ -8504,11 +8504,11 @@

Definition at line 6103 of file peer_socket.cpp.

+

Definition at line 6109 of file peer_socket.cpp.

References FLOW_LOG_TRACE.

-

Referenced by close_connection_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and handle_syn_to_listening_server().

+

Referenced by close_connection_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and handle_syn_to_listening_server().

Here is the caller graph for this function:
@@ -8571,9 +8571,9 @@

Returns
See Peer_socket::set_options().
-

Definition at line 6191 of file peer_socket.cpp.

+

Definition at line 6197 of file peer_socket.cpp.

-

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, running(), flow::net_flow::error::S_NODE_NOT_RUNNING, and sock_validate_options().

+

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, running(), flow::net_flow::error::S_NODE_NOT_RUNNING, and sock_validate_options().

Referenced by flow::net_flow::Peer_socket::set_options().

@@ -8643,11 +8643,11 @@

Definition at line 6112 of file peer_socket.cpp.

+

Definition at line 6118 of file peer_socket.cpp.

References flow::net_flow::Peer_socket::S_OPEN.

-

Referenced by handle_syn_ack_ack_to_syn_rcvd(), handle_syn_to_listening_server(), sock_disconnect_completed(), and sock_disconnect_detected().

+

Referenced by handle_syn_ack_ack_to_syn_rcvd(), handle_syn_to_listening_server(), sock_disconnect_completed(), and sock_disconnect_detected().

Here is the caller graph for this function:
@@ -8711,7 +8711,7 @@

Definition at line 1471 of file peer_socket.cpp.

-

References flow::net_flow::Peer_socket_receive_stats_accumulator::buffer_fed(), FLOW_LOG_TRACE, flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_delivered_packet(), flow::net_flow::Peer_socket::Received_packet::m_data, and flow::net_flow::Peer_socket::Received_packet::m_size.

+

References flow::net_flow::Peer_socket_receive_stats_accumulator::buffer_fed(), FLOW_LOG_TRACE, flow::net_flow::Peer_socket_receive_stats_accumulator::good_data_delivered_packet(), flow::net_flow::Peer_socket::Received_packet::m_data, and flow::net_flow::Peer_socket::Received_packet::m_size.

Here is the call graph for this function:
@@ -8851,11 +8851,11 @@

Returns
true on success, false on validation error.
-

Definition at line 6239 of file peer_socket.cpp.

+

Definition at line 6245 of file peer_socket.cpp.

-

References flow::util::in_closed_range(), flow::util::in_open_closed_range(), flow::net_flow::Peer_socket_options::m_dyn_drop_timeout_backoff_factor, flow::net_flow::Peer_socket_options::m_dyn_drop_timeout_ceiling, flow::net_flow::Peer_socket_options::m_dyn_rcv_wnd_recovery_timer_period, flow::net_flow::Peer_socket_options::m_st_cong_ctl_classic_wnd_decay_percent, flow::net_flow::Peer_socket_options::m_st_cong_ctl_cong_avoidance_increment_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_init_cong_wnd_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_max_cong_wnd_blocks, flow::net_flow::Peer_socket_options::m_st_connect_retransmit_period, flow::net_flow::Peer_socket_options::m_st_connect_retransmit_timeout, flow::net_flow::Peer_socket_options::m_st_delayed_ack_timer_period, flow::net_flow::Peer_socket_options::m_st_init_drop_timeout, flow::net_flow::Peer_socket_options::m_st_max_block_size, flow::net_flow::Peer_socket_options::m_st_max_full_blocks_before_ack_send, flow::net_flow::Peer_socket_options::m_st_max_rexmissions_per_packet, flow::net_flow::Peer_socket_options::m_st_rcv_buf_max_size, flow::net_flow::Peer_socket_options::m_st_rcv_buf_max_size_to_advertise_percent, flow::net_flow::Peer_socket_options::m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent, flow::net_flow::Peer_socket_options::m_st_snd_bandwidth_est_sample_period_floor, and flow::net_flow::Peer_socket_options::m_st_snd_buf_max_size.

+

References flow::util::in_closed_range(), flow::util::in_open_closed_range(), flow::net_flow::Peer_socket_options::m_dyn_drop_timeout_backoff_factor, flow::net_flow::Peer_socket_options::m_dyn_drop_timeout_ceiling, flow::net_flow::Peer_socket_options::m_dyn_rcv_wnd_recovery_timer_period, flow::net_flow::Peer_socket_options::m_st_cong_ctl_classic_wnd_decay_percent, flow::net_flow::Peer_socket_options::m_st_cong_ctl_cong_avoidance_increment_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_init_cong_wnd_blocks, flow::net_flow::Peer_socket_options::m_st_cong_ctl_max_cong_wnd_blocks, flow::net_flow::Peer_socket_options::m_st_connect_retransmit_period, flow::net_flow::Peer_socket_options::m_st_connect_retransmit_timeout, flow::net_flow::Peer_socket_options::m_st_delayed_ack_timer_period, flow::net_flow::Peer_socket_options::m_st_init_drop_timeout, flow::net_flow::Peer_socket_options::m_st_max_block_size, flow::net_flow::Peer_socket_options::m_st_max_full_blocks_before_ack_send, flow::net_flow::Peer_socket_options::m_st_max_rexmissions_per_packet, flow::net_flow::Peer_socket_options::m_st_rcv_buf_max_size, flow::net_flow::Peer_socket_options::m_st_rcv_buf_max_size_to_advertise_percent, flow::net_flow::Peer_socket_options::m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent, flow::net_flow::Peer_socket_options::m_st_snd_bandwidth_est_sample_period_floor, and flow::net_flow::Peer_socket_options::m_st_snd_buf_max_size.

-

Referenced by listen_worker(), sock_set_options(), and validate_options().

+

Referenced by listen_worker(), sock_set_options(), and validate_options().

Here is the call graph for this function:
@@ -9111,11 +9111,11 @@

Returns
See sync_connect().
-

Definition at line 4206 of file peer_socket.cpp.

+

Definition at line 4212 of file peer_socket.cpp.

-

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_EVENT_SET_CLOSED, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, flow::net_flow::error::S_WAIT_INTERRUPTED, flow::net_flow::error::S_WAIT_USER_TIMEOUT, flow::util::setup_auto_cleanup(), and sync_connect_impl().

+

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, flow::net_flow::Peer_socket::S_CLOSED, flow::net_flow::error::S_EVENT_SET_CLOSED, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, flow::net_flow::error::S_WAIT_INTERRUPTED, flow::net_flow::error::S_WAIT_USER_TIMEOUT, flow::util::setup_auto_cleanup(), and sync_connect_impl().

-

Referenced by sync_connect_impl(), and sync_connect_with_metadata().

+

Referenced by sync_connect_impl(), and sync_connect_with_metadata().

Here is the call graph for this function:
@@ -9181,7 +9181,7 @@

Returns
See sync_connect().
-

Definition at line 4199 of file peer_socket.cpp.

+

Definition at line 4205 of file peer_socket.cpp.

@@ -9246,7 +9246,7 @@

Definition at line 3956 of file node.hpp.

-

References flow::util::chrono_duration_to_fine_duration(), and sync_connect_impl().

+

References flow::util::chrono_duration_to_fine_duration(), and sync_connect_impl().

Referenced by sync_connect().

@@ -9356,7 +9356,7 @@

Definition at line 3977 of file node.hpp.

-

References event_set_create(), FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, running(), flow::net_flow::error::S_NODE_NOT_RUNNING, and flow::util::setup_auto_cleanup().

+

References event_set_create(), FLOW_ERROR_EMIT_ERROR, FLOW_LOG_TRACE, running(), flow::net_flow::error::S_NODE_NOT_RUNNING, and flow::util::setup_auto_cleanup().

Referenced by flow::net_flow::Peer_socket::node_sync_receive(), flow::net_flow::Peer_socket::node_sync_send(), and flow::net_flow::Server_socket::sync_accept_impl().

@@ -9474,7 +9474,7 @@

Definition at line 113 of file node.cpp.

-

References flow::log::beautify_chrono_logger_this_thread(), flow::log::Log_context::get_logger(), and flow::util::ostream_op_to_string().

+

References flow::log::beautify_chrono_logger_this_thread(), flow::log::Log_context::get_logger(), and flow::util::ostream_op_to_string().

Referenced by worker_run().

@@ -9605,7 +9605,7 @@

Definition at line 980 of file node.cpp.

-

References FLOW_UTIL_WHERE_AM_I_STR, flow::net_flow::Node_options::m_dyn_low_lvl_max_packet_size, flow::net_flow::Node_options::m_dyn_sock_opts, flow::net_flow::Node_options::m_st_low_lvl_max_buf_size, flow::net_flow::Node_options::m_st_timer_min_period, sock_validate_options(), and validate_options().

+

References FLOW_UTIL_WHERE_AM_I_STR, flow::net_flow::Node_options::m_dyn_low_lvl_max_packet_size, flow::net_flow::Node_options::m_dyn_sock_opts, flow::net_flow::Node_options::m_st_low_lvl_max_buf_size, flow::net_flow::Node_options::m_st_timer_min_period, sock_validate_options(), and validate_options().

Referenced by set_options(), and validate_options().

@@ -9736,7 +9736,7 @@

Definition at line 151 of file node.cpp.

-

References async_low_lvl_recv(), close_connection_immediately(), close_empty_server_immediately(), event_set_close_worker(), FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), interrupt_all_waits_internal_sig_handler(), m_event_loop_ready, m_event_sets, m_low_lvl_endpoint, m_low_lvl_max_buf_size, m_low_lvl_sock, m_opts, m_servs, m_signal_set, m_socks, flow::net_flow::Node_options::m_st_capture_interrupt_signals_internally, flow::net_flow::Node_options::m_st_low_lvl_max_buf_size, m_task_engine, opt(), perform_regular_infrequent_tasks(), flow::net_flow::error::S_NODE_SHUTTING_DOWN, S_REGULAR_INFREQUENT_TASKS_PERIOD, flow::util::schedule_task_from_now(), sync_sock_low_lvl_rst_send(), and this_thread_init_logger_setup().

+

References async_low_lvl_recv(), close_connection_immediately(), close_empty_server_immediately(), event_set_close_worker(), FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::log::Log_context::get_logger(), interrupt_all_waits_internal_sig_handler(), m_event_loop_ready, m_event_sets, m_low_lvl_endpoint, m_low_lvl_max_buf_size, m_low_lvl_sock, m_opts, m_servs, m_signal_set, m_socks, flow::net_flow::Node_options::m_st_capture_interrupt_signals_internally, flow::net_flow::Node_options::m_st_low_lvl_max_buf_size, m_task_engine, opt(), perform_regular_infrequent_tasks(), flow::net_flow::error::S_NODE_SHUTTING_DOWN, S_REGULAR_INFREQUENT_TASKS_PERIOD, flow::util::schedule_task_from_now(), sync_sock_low_lvl_rst_send(), and this_thread_init_logger_setup().

Here is the call graph for this function:
@@ -10080,7 +10080,7 @@

Definition at line 3771 of file node.hpp.

-

Referenced by sock_load_info_struct(), and worker_run().

+

Referenced by sock_load_info_struct(), and worker_run().

@@ -10170,7 +10170,7 @@

Definition at line 3704 of file node.hpp.

-

Referenced by async_low_lvl_packet_send_impl(), handle_incoming(), handle_syn_to_listening_server(), low_lvl_recv_and_handle(), max_block_size(), options(), set_options(), sock_load_info_struct(), sock_pacing_new_time_slice(), sync_sock_low_lvl_rst_send(), and worker_run().

+

Referenced by async_low_lvl_packet_send_impl(), handle_incoming(), handle_syn_to_listening_server(), low_lvl_recv_and_handle(), max_block_size(), options(), set_options(), sock_load_info_struct(), sock_pacing_new_time_slice(), sync_sock_low_lvl_rst_send(), and worker_run().

@@ -10254,7 +10254,7 @@

Definition at line 3777 of file node.hpp.

-

Referenced by close_connection_immediately(), close_empty_server_immediately(), and listen_worker().

+

Referenced by close_connection_immediately(), close_empty_server_immediately(), and listen_worker().

@@ -10340,7 +10340,7 @@

Definition at line 3798 of file node.hpp.

-

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_incoming(), listen_worker(), and worker_run().

+

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_incoming(), listen_worker(), and worker_run().

@@ -10401,7 +10401,7 @@

Definition at line 3830 of file node.hpp.

-

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and send_worker().

+

Referenced by close_connection_immediately(), close_empty_server_immediately(), handle_syn_ack_ack_to_syn_rcvd(), and send_worker().

@@ -10430,7 +10430,7 @@

Definition at line 3792 of file node.hpp.

-

Referenced by close_connection_immediately(), handle_incoming(), handle_syn_to_listening_server(), perform_regular_infrequent_tasks(), and worker_run().

+

Referenced by close_connection_immediately(), handle_incoming(), handle_syn_to_listening_server(), perform_regular_infrequent_tasks(), and worker_run().

@@ -10527,7 +10527,7 @@

Definition at line 3739 of file node.hpp.

-

Referenced by async_rcv_wnd_recovery(), async_wait_latency_then_handle_incoming(), close_abruptly(), listen(), perform_regular_infrequent_tasks(), receive(), running(), send(), setup_drop_timer(), sock_create_forward_plus_ctor_args(), sock_info(), worker_run(), and ~Node().

+

Referenced by async_rcv_wnd_recovery(), async_wait_latency_then_handle_incoming(), close_abruptly(), listen(), perform_regular_infrequent_tasks(), receive(), running(), send(), setup_drop_timer(), sock_create_forward_plus_ctor_args(), sock_info(), worker_run(), and ~Node().

@@ -10785,7 +10785,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket-members.html index 82d13e341..3bb66ad1b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket-members.html @@ -215,7 +215,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket.html index d251cf98e..6a86db431 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket.html @@ -637,7 +637,7 @@

Implementation notes

Todo:
Rename State and Open_sub_state to Phase and Open_sub_phase respectively; and Int_state to State. Explain difference between phases (application-layer, user-visible and used close to application layer) and states (transport layer, internal).
Todo:
Look into a way to defeat the need for boiler-plate trickery – with low but non-zero perf cost – involving *_socket-vs-Node circular references in method templates, such as the way Peer_socket::send() and Peer_socket::receive() internally make Function<>s before forwarding to the core in Node. Can this be done with .inl files? Look into how Boost internally uses .inl files; this could inspire a solution... or not.
-

Definition at line 215 of file peer_socket.hpp.

+

Definition at line 216 of file peer_socket.hpp.

Member Typedef Documentation

◆ Drop_timer_ptr

@@ -661,7 +661,7 @@

Drop_timer (can't use Drop_timer::Ptr due to C++ and circular reference).

-

Definition at line 856 of file peer_socket.hpp.

+

Definition at line 857 of file peer_socket.hpp.

@@ -687,7 +687,7 @@

Mutex.

-

Definition at line 899 of file peer_socket.hpp.

+

Definition at line 900 of file peer_socket.hpp.

@@ -715,7 +715,7 @@

Todo:
This doc header for Peer_socket::Mutex should specify what specific behavior requires mutex reentrance, so that for example one could reevaluate whether there's a sleeker code pattern that would avoid it.
-

Definition at line 896 of file peer_socket.hpp.

+

Definition at line 897 of file peer_socket.hpp.

@@ -741,7 +741,7 @@

Options_mutex.

-

Definition at line 888 of file peer_socket.hpp.

+

Definition at line 889 of file peer_socket.hpp.

@@ -769,7 +769,7 @@

m_opts may be modified via set_options(). To avoid thread contention when no one is writing (which is usual), we could use that 2-level type of mutex and apply the appropriate (shared or unique) lock depending on the situation. So why not? Answer: While a shared/exclusive mutex sounds lovely in theory – and perhaps if its implementation were closer to the hardware it would be lovely indeed – in practice it seems its implementation just causes performance problems rather than solving them. Apparently that's why it was rejected by C++11 standards people w/r/t inclusion in that standard. The people involved explained their decision here: http://permalink.gmane.org/gmane.comp.lib.boost.devel/211180. So until that is improved, just do this. I'm not even adding a to-do for fixing this, as that seems unlikely anytime soon. Update: C++17 added std::shared_mutex, and C++14 added a similar thing named something else. Seems like a good time to revisit this – if not to materially improve Options_mutex performance then to gain up-to-date knowledge on the topic, specifically whether shared_mutex is fast now. Update: Apparently as of Boost-1.80 the Boost.thread impl of shared_mutex is lacking in perf, and there is a ticket filed for many years for this. Perhaps gcc std::shared_mutex is fine. However research suggests it's less about this nitty-gritty of various impls and more the following bottom line: A simple mutex is very fast to lock/unlock, and perf problems occur only if one must wait for a lock. Experts say that it is possible but quite rare that there is enough lock contention to make it "worth it": a shared mutex is much slower to lock/unlock sans contention. Only when the read critical sections are long and very frequently accessed does it become "worth it."

-

Definition at line 885 of file peer_socket.hpp.

+

Definition at line 886 of file peer_socket.hpp.

@@ -795,7 +795,7 @@

Drop_timer::packet_id_t.

-

Definition at line 905 of file peer_socket.hpp.

+

Definition at line 906 of file peer_socket.hpp.

@@ -822,7 +822,7 @@

m_rcv_syn_rcvd_data_q.

Using vector because we only need push_back() and iteration at the moment. Using pointer to non-const instead of const because when we actually handle the packet as received we will need to be able to modify the packet for performance (see Node::handle_data_to_established(), when it transfers data to Receive buffer).

-

Definition at line 981 of file peer_socket.hpp.

+

Definition at line 982 of file peer_socket.hpp.

@@ -848,7 +848,7 @@

m_rcv_packets_with_gaps const iterator type.

-

Definition at line 968 of file peer_socket.hpp.

+

Definition at line 969 of file peer_socket.hpp.

@@ -874,7 +874,7 @@

m_rcv_packets_with_gaps iterator type.

-

Definition at line 971 of file peer_socket.hpp.

+

Definition at line 972 of file peer_socket.hpp.

@@ -901,7 +901,7 @@

m_rcv_packets_with_gaps type; see that data member.

structs are stored via shared pointers instead of as direct objects to minimize copying of potentially heavy-weight data. They are stored as shared pointers instead of as raw pointers to avoid having to worry about delete.

-

Definition at line 965 of file peer_socket.hpp.

+

Definition at line 966 of file peer_socket.hpp.

@@ -927,7 +927,7 @@

m_security_token.

-

Definition at line 902 of file peer_socket.hpp.

+

Definition at line 903 of file peer_socket.hpp.

@@ -953,7 +953,7 @@

m_snd_flying_pkts_by_sent_when type; see that data member.

-

Definition at line 940 of file peer_socket.hpp.

+

Definition at line 941 of file peer_socket.hpp.

@@ -979,7 +979,7 @@

m_snd_flying_pkts_by_seq_num type; see that data member.

-

Definition at line 949 of file peer_socket.hpp.

+

Definition at line 950 of file peer_socket.hpp.

@@ -1005,7 +1005,7 @@

m_snd_flying_pkts_by_seq_num const iterator type.

-

Definition at line 952 of file peer_socket.hpp.

+

Definition at line 953 of file peer_socket.hpp.

@@ -1031,7 +1031,7 @@

m_snd_flying_pkts_by_seq_num iterator type.

-

Definition at line 955 of file peer_socket.hpp.

+

Definition at line 956 of file peer_socket.hpp.

@@ -1057,7 +1057,7 @@

m_snd_flying_pkts_by_sent_when const iterator type.

-

Definition at line 943 of file peer_socket.hpp.

+

Definition at line 944 of file peer_socket.hpp.

@@ -1083,7 +1083,7 @@

m_snd_flying_pkts_by_sent_when iterator type.

-

Definition at line 946 of file peer_socket.hpp.

+

Definition at line 947 of file peer_socket.hpp.

@@ -1121,7 +1121,7 @@

Definition at line 913 of file peer_socket.hpp.

+

Definition at line 914 of file peer_socket.hpp.

@@ -1159,7 +1159,7 @@

Definition at line 237 of file peer_socket.hpp.

+

Definition at line 238 of file peer_socket.hpp.

@@ -1191,7 +1191,7 @@

Definition at line 228 of file peer_socket.hpp.

+

Definition at line 229 of file peer_socket.hpp.

@@ -1376,7 +1376,7 @@

Definition at line 269 of file peer_socket.cpp.

-

References close_abruptly(), flow::net_flow::Node::close_abruptly(), flow::net_flow::Node::ensure_sock_open(), flow::error::exec_void_and_throw_on_error(), FLOW_UTIL_WHERE_AM_I_STR, m_mutex, and m_node.

+

References close_abruptly(), flow::net_flow::Node::close_abruptly(), flow::net_flow::Node::ensure_sock_open(), flow::error::exec_void_and_throw_on_error(), FLOW_UTIL_WHERE_AM_I_STR, m_mutex, and m_node.

Referenced by close_abruptly().

@@ -1415,7 +1415,7 @@

Definition at line 101 of file peer_socket.cpp.

-

References m_disconnect_cause, and m_mutex.

+

References m_disconnect_cause, and m_mutex.

Referenced by flow::net_flow::asio::Peer_socket::node_or_post_error().

@@ -1523,7 +1523,7 @@

Definition at line 390 of file peer_socket.cpp.

-

References ensure_open(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, get_connect_metadata(), m_mutex, and m_serialized_metadata.

+

References ensure_open(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, get_connect_metadata(), m_mutex, and m_serialized_metadata.

Referenced by get_connect_metadata().

@@ -1563,7 +1563,7 @@

Definition at line 323 of file peer_socket.cpp.

-

References flow::net_flow::Node::ensure_sock_open(), m_info_on_close, m_mutex, m_node, and flow::net_flow::Node::sock_info().

+

References flow::net_flow::Node::ensure_sock_open(), m_info_on_close, m_mutex, m_node, and flow::net_flow::Node::sock_info().

Here is the call graph for this function:
@@ -1594,9 +1594,9 @@

Definition at line 384 of file peer_socket.cpp.

-

References m_local_port.

+

References m_local_port.

-

Referenced by operator<<().

+

Referenced by operator<<().

Here is the caller graph for this function:
@@ -1627,9 +1627,9 @@

Definition at line 352 of file peer_socket.cpp.

-

References m_opts, flow::net_flow::Peer_socket_options::m_st_max_block_size, and opt().

+

References m_opts, flow::net_flow::Peer_socket_options::m_st_max_block_size, and opt().

-

Referenced by bytes_blocks_str(), flow::net_flow::Node::connect_with_metadata(), and max_block_size_multiple().

+

Referenced by bytes_blocks_str(), flow::net_flow::Node::connect_with_metadata(), and max_block_size_multiple().

Here is the call graph for this function:
@@ -1692,7 +1692,7 @@

Definition at line 357 of file peer_socket.cpp.

-

References flow::util::ceil_div(), m_opts, m_opts_mutex, flow::net_flow::Peer_socket_options::m_st_max_block_size, and max_block_size().

+

References flow::util::ceil_div(), m_opts, m_opts_mutex, flow::net_flow::Peer_socket_options::m_st_max_block_size, and max_block_size().

Here is the call graph for this function:
@@ -1722,7 +1722,7 @@

Definition at line 95 of file peer_socket.cpp.

-

References m_mutex, and m_node.

+

References m_mutex, and m_node.

Referenced by flow::net_flow::asio::Peer_socket::node_or_post_error().

@@ -1781,9 +1781,9 @@

Definition at line 219 of file peer_socket.cpp.

-

References flow::net_flow::Node::ensure_sock_open(), m_node, and flow::net_flow::Node::receive().

+

References flow::net_flow::Node::ensure_sock_open(), m_node, and flow::net_flow::Node::receive().

-

Referenced by receive().

+

Referenced by receive().

Here is the call graph for this function:
@@ -1846,9 +1846,9 @@

Definition at line 134 of file peer_socket.cpp.

-

References flow::net_flow::Node::ensure_sock_open(), m_node, and flow::net_flow::Node::send().

+

References flow::net_flow::Node::ensure_sock_open(), m_node, and flow::net_flow::Node::send().

-

Referenced by send().

+

Referenced by send().

Here is the call graph for this function:
@@ -1917,9 +1917,9 @@

Definition at line 234 of file peer_socket.cpp.

-

References flow::net_flow::Node::ensure_sock_open(), m_mutex, m_node, Peer_socket(), flow::net_flow::Node::receive(), flow::net_flow::Event_set::S_PEER_SOCKET_READABLE, and flow::net_flow::Node::sync_op().

+

References flow::net_flow::Node::ensure_sock_open(), m_mutex, m_node, Peer_socket(), flow::net_flow::Node::receive(), flow::net_flow::Event_set::S_PEER_SOCKET_READABLE, and flow::net_flow::Node::sync_op().

-

Referenced by sync_receive_impl(), and sync_receive_reactor_pattern_impl().

+

Referenced by sync_receive_impl(), and sync_receive_reactor_pattern_impl().

Here is the call graph for this function:
@@ -1988,9 +1988,9 @@

Definition at line 149 of file peer_socket.cpp.

-

References flow::net_flow::Node::ensure_sock_open(), m_mutex, m_node, Peer_socket(), flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, flow::net_flow::Node::send(), and flow::net_flow::Node::sync_op().

+

References flow::net_flow::Node::ensure_sock_open(), m_mutex, m_node, Peer_socket(), flow::net_flow::Event_set::S_PEER_SOCKET_WRITABLE, flow::net_flow::Node::send(), and flow::net_flow::Node::sync_op().

-

Referenced by sync_send_impl(), and sync_send_reactor_pattern_impl().

+

Referenced by sync_send_impl(), and sync_send_reactor_pattern_impl().

Here is the call graph for this function:
@@ -2049,9 +2049,9 @@

Returns
A copy of the value at the given reference.
-

Definition at line 2644 of file peer_socket.hpp.

+

Definition at line 2639 of file peer_socket.hpp.

-

References m_opts_mutex.

+

References m_opts_mutex.

Referenced by max_block_size(), options(), and rexmit_on().

@@ -2085,7 +2085,7 @@

Definition at line 318 of file peer_socket.cpp.

-

References m_opts, and opt().

+

References m_opts, and opt().

Referenced by Peer_socket().

@@ -2160,9 +2160,9 @@

Reliability and ordering guarantees

Returns
The number of bytes consumed (placed into target). Always 0 if bool(*err_code) == true when receive() returns.
-

Definition at line 2552 of file peer_socket.hpp.

+

Definition at line 2547 of file peer_socket.hpp.

-

References flow::net_flow::Socket_buffer::consume_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_rcv_buf, and node_receive().

+

References flow::net_flow::Socket_buffer::consume_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_rcv_buf, and node_receive().

Here is the call graph for this function:
@@ -2193,9 +2193,9 @@

Definition at line 378 of file peer_socket.cpp.

-

References m_remote_endpoint.

+

References m_remote_endpoint.

-

Referenced by operator<<().

+

Referenced by operator<<().

Here is the caller graph for this function:
@@ -2234,9 +2234,9 @@

Definition at line 373 of file peer_socket.cpp.

-

References m_opts, flow::net_flow::Peer_socket_options::m_st_rexmit_on, and opt().

+

References m_opts, flow::net_flow::Peer_socket_options::m_st_rexmit_on, and opt().

-

Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::drop_pkts_on_acks(), flow::net_flow::Node::drop_timer_action(), flow::net_flow::Node::handle_accumulated_acks(), flow::net_flow::Node::handle_data_to_established(), and flow::net_flow::Node::log_snd_window().

+

Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::drop_pkts_on_acks(), flow::net_flow::Node::drop_timer_action(), flow::net_flow::Node::handle_accumulated_acks(), flow::net_flow::Node::handle_data_to_established(), and flow::net_flow::Node::log_snd_window().

Here is the call graph for this function:
@@ -2312,9 +2312,9 @@

Reliability and ordering guarantees: if the socket option rexmit-on is NOT e
Returns
Number of bytes (possibly zero) added to buffer. Always 0 if bool(*err_code) == true when send() returns.
-

Definition at line 2448 of file peer_socket.hpp.

+

Definition at line 2443 of file peer_socket.hpp.

-

References flow::net_flow::Socket_buffer::feed_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_snd_buf, and node_send().

+

References flow::net_flow::Socket_buffer::feed_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_snd_buf, and node_send().

Here is the call graph for this function:
@@ -2473,7 +2473,7 @@

Error handling

Returns
true if there are 1+ bytes ready to read; false if either a timeout has occurred (no bytes ready), or another error has occurred.
-

Definition at line 2601 of file peer_socket.hpp.

+

Definition at line 2596 of file peer_socket.hpp.

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_receive_reactor_pattern_impl().

@@ -2523,7 +2523,7 @@

Definition at line 192 of file peer_socket.cpp.

-

References sync_receive().

+

References sync_receive().

Here is the call graph for this function:
@@ -2597,9 +2597,9 @@

Error handling

Returns
Number of bytes (possibly zero) added to target. Always 0 if bool(*err_code) == true when sync_receive() returns.
-

Definition at line 2591 of file peer_socket.hpp.

+

Definition at line 2586 of file peer_socket.hpp.

-

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_receive_impl().

+

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_receive_impl().

Referenced by sync_receive().

@@ -2661,9 +2661,9 @@

Returns
See other sync_receive().
-

Definition at line 2585 of file peer_socket.hpp.

+

Definition at line 2580 of file peer_socket.hpp.

-

References sync_receive_impl().

+

References sync_receive_impl().

Here is the call graph for this function:
@@ -2732,11 +2732,11 @@

Returns
See sync_receive().
-

Definition at line 2610 of file peer_socket.hpp.

+

Definition at line 2605 of file peer_socket.hpp.

-

References flow::net_flow::Socket_buffer::consume_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_rcv_buf, and node_sync_receive().

+

References flow::net_flow::Socket_buffer::consume_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_rcv_buf, and node_sync_receive().

-

Referenced by sync_receive().

+

Referenced by sync_receive().

Here is the call graph for this function:
@@ -2798,9 +2798,9 @@

Definition at line 197 of file peer_socket.cpp.

-

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, node_sync_receive(), and sync_receive_reactor_pattern_impl().

+

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, node_sync_receive(), and sync_receive_reactor_pattern_impl().

-

Referenced by sync_receive(), and sync_receive_reactor_pattern_impl().

+

Referenced by sync_receive(), and sync_receive_reactor_pattern_impl().

Here is the call graph for this function:
@@ -2876,7 +2876,7 @@

Error handling

Returns
true if 1+ bytes are possible to add to Send buffer; false if either a timeout has occurred (bytes not writable), or another error has occurred.
-

Definition at line 2508 of file peer_socket.hpp.

+

Definition at line 2503 of file peer_socket.hpp.

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_send_reactor_pattern_impl().

@@ -2926,7 +2926,7 @@

Definition at line 107 of file peer_socket.cpp.

-

References sync_send().

+

References sync_send().

Here is the call graph for this function:
@@ -3000,9 +3000,9 @@

Error handling

Returns
Number of bytes (possibly zero) added to Send buffer. Always 0 if bool(*err_code) == true when sync_send() returns.
-

Definition at line 2497 of file peer_socket.hpp.

+

Definition at line 2492 of file peer_socket.hpp.

-

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_send_impl().

+

References flow::util::chrono_duration_from_now_to_fine_time_pt(), and sync_send_impl().

Referenced by sync_send().

@@ -3064,9 +3064,9 @@

Returns
See other sync_send().
-

Definition at line 2491 of file peer_socket.hpp.

+

Definition at line 2486 of file peer_socket.hpp.

-

References sync_send_impl().

+

References sync_send_impl().

Here is the call graph for this function:
@@ -3135,11 +3135,11 @@

Returns
See sync_send().
-

Definition at line 2518 of file peer_socket.hpp.

+

Definition at line 2513 of file peer_socket.hpp.

-

References flow::net_flow::Socket_buffer::feed_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_snd_buf, and node_sync_send().

+

References flow::net_flow::Socket_buffer::feed_bufs_copy(), FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, m_snd_buf, and node_sync_send().

-

Referenced by sync_send().

+

Referenced by sync_send().

Here is the call graph for this function:
@@ -3201,9 +3201,9 @@

Definition at line 112 of file peer_socket.cpp.

-

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, node_sync_send(), and sync_send_reactor_pattern_impl().

+

References FLOW_ERROR_EXEC_AND_THROW_ON_ERROR, m_mutex, node_sync_send(), and sync_send_reactor_pattern_impl().

-

Referenced by sync_send(), and sync_send_reactor_pattern_impl().

+

Referenced by sync_send(), and sync_send_reactor_pattern_impl().

Here is the call graph for this function:
@@ -3243,7 +3243,7 @@

See also
Congestion_control_classic.
-

Definition at line 846 of file peer_socket.hpp.

+

Definition at line 847 of file peer_socket.hpp.

@@ -3270,7 +3270,7 @@

See also
Congestion_control_classic_data.
-

Definition at line 841 of file peer_socket.hpp.

+

Definition at line 842 of file peer_socket.hpp.

@@ -3297,7 +3297,7 @@

See also
Congestion_control_classic_with_bandwidth_est.
-

Definition at line 851 of file peer_socket.hpp.

+

Definition at line 852 of file peer_socket.hpp.

@@ -3324,7 +3324,7 @@

Sent_packet types, at least.

(Drop_timer has no actual Peer_socket instance to mess with.)

-

Definition at line 831 of file peer_socket.hpp.

+

Definition at line 832 of file peer_socket.hpp.

@@ -3351,7 +3351,7 @@

Node in class Peer_socket documentation header.

See also
Node.
-

Definition at line 821 of file peer_socket.hpp.

+

Definition at line 822 of file peer_socket.hpp.

@@ -3401,7 +3401,7 @@

Returns
os.
-

Definition at line 6508 of file peer_socket.cpp.

+

Definition at line 6514 of file peer_socket.cpp.

References local_port(), and remote_endpoint().

@@ -3457,7 +3457,7 @@

Returns
os.
-

Definition at line 6531 of file peer_socket.cpp.

+

Definition at line 6537 of file peer_socket.cpp.

@@ -3484,9 +3484,9 @@

See also
Send_bandwidth_estimator.
-

Definition at line 836 of file peer_socket.hpp.

+

Definition at line 837 of file peer_socket.hpp.

-

Referenced by flow::net_flow::Node::connect_worker().

+

Referenced by flow::net_flow::Node::connect_worker().

@@ -3513,7 +3513,7 @@

Server_socket in class Peer_socket documentation header.

See also
Server_socket.
-

Definition at line 826 of file peer_socket.hpp.

+

Definition at line 827 of file peer_socket.hpp.

@@ -3540,7 +3540,7 @@

Definition at line 1184 of file peer_socket.hpp.

+

Definition at line 1185 of file peer_socket.hpp.

@@ -3569,7 +3569,7 @@

See also
m_init_rexmit_scheduled_task which keeps track of individual attempts timing out, as opposed to the entire process.
-

Definition at line 2158 of file peer_socket.hpp.

+

Definition at line 2159 of file peer_socket.hpp.

@@ -3603,7 +3603,7 @@

receive() and send(), while thread W may set it having detected disconnection, this must be protected by a mutex.

-

Definition at line 1312 of file peer_socket.hpp.

+

Definition at line 1313 of file peer_socket.hpp.

Referenced by disconnect_cause().

@@ -3632,7 +3632,7 @@

m_state.

If it has not yet moved to that state, this is not applicable (but equals Peer_socket_info()). It's used by info() to get at the final set of stats, before the source info is purged by the resource cleanup in sock_free_memory().

-

Definition at line 2166 of file peer_socket.hpp.

+

Definition at line 2167 of file peer_socket.hpp.

Referenced by info().

@@ -3662,7 +3662,7 @@

Definition at line 2144 of file peer_socket.hpp.

+

Definition at line 2145 of file peer_socket.hpp.

@@ -3692,7 +3692,7 @@

See also
m_connection_timeout_scheduled_task which keeps track of the entire process timing out, as opposed to the individual attempts.
-

Definition at line 2133 of file peer_socket.hpp.

+

Definition at line 2134 of file peer_socket.hpp.

@@ -3720,7 +3720,7 @@

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1356 of file peer_socket.hpp.

+

Definition at line 1357 of file peer_socket.hpp.

@@ -3746,7 +3746,7 @@

local_port(). Should be set before user gets access to *this and not changed afterwards.

-

Definition at line 1347 of file peer_socket.hpp.

+

Definition at line 1348 of file peer_socket.hpp.

Referenced by local_port().

@@ -3776,9 +3776,9 @@

m_state, m_open_sub_state, m_disconnect_cause, m_node, m_rcv_buf, m_snd_buf, m_serialized_metadata.

Generally speaking, if 2 or more of the protected variables must be changed in the same non-blocking "operation" (for some reasonable definition of "operation"), they should probably be changed within the same m_mutex-locking critical section. For example, if closing the socket in thread W due to an incoming RST, one should lock m_mutex, clear both buffers, set m_disconnect_cause, change m_state = State::S_CLOSED, and then unlock m_mutex. Then thread U != W will observe all this state changed at the "same time," which is desirable.

-

Definition at line 1341 of file peer_socket.hpp.

+

Definition at line 1342 of file peer_socket.hpp.

-

Referenced by close_abruptly(), disconnect_cause(), get_connect_metadata(), info(), node(), node_sync_receive(), node_sync_send(), receive(), send(), set_options(), state(), sync_receive_impl(), sync_receive_reactor_pattern_impl(), sync_send_impl(), and sync_send_reactor_pattern_impl().

+

Referenced by close_abruptly(), disconnect_cause(), get_connect_metadata(), info(), node(), node_sync_receive(), node_sync_send(), receive(), send(), set_options(), state(), sync_receive_impl(), sync_receive_reactor_pattern_impl(), sync_send_impl(), and sync_send_reactor_pattern_impl().

@@ -3808,7 +3808,7 @@

node() and others). Must be protected by mutex.

Todo:
boost::weak_ptr<Node> would be ideal for this, but of course then Node would have to (only?) be available via shared_ptr<>.
-

Definition at line 1217 of file peer_socket.hpp.

+

Definition at line 1218 of file peer_socket.hpp.

Referenced by close_abruptly(), info(), node(), node_receive(), node_send(), node_sync_receive(), node_sync_send(), and set_options().

@@ -3838,7 +3838,7 @@

state() and others). Must be protected by mutex.

-

Definition at line 1201 of file peer_socket.hpp.

+

Definition at line 1202 of file peer_socket.hpp.

Referenced by state().

@@ -3868,9 +3868,9 @@

set_options(), although only the dynamic members of this may be modified.

Accessed from thread W and user thread U != W. Protected by m_opts_mutex. When reading, do NOT access without locking (which is encapsulated in opt()).

-

Definition at line 1178 of file peer_socket.hpp.

+

Definition at line 1179 of file peer_socket.hpp.

-

Referenced by flow::net_flow::Node::connect_worker(), max_block_size(), max_block_size_multiple(), options(), and rexmit_on().

+

Referenced by flow::net_flow::Node::connect_worker(), max_block_size(), max_block_size_multiple(), options(), and rexmit_on().

@@ -3896,9 +3896,9 @@

m_opts.

-

Definition at line 1181 of file peer_socket.hpp.

+

Definition at line 1182 of file peer_socket.hpp.

-

Referenced by flow::net_flow::Node::connect_worker(), max_block_size_multiple(), and opt().

+

Referenced by flow::net_flow::Node::connect_worker(), max_block_size_multiple(), and opt().

@@ -3928,7 +3928,7 @@

Thread safety

This can be write-accessed simultaneously by thread W (e.g., when closing a socket before it is accepted) and a user thread U != W (in Server_socket::accept()). It is thus protected by a mutex – but it's Server_socket::m_mutex, not Peer_socket::m_mutex. I know it's weird, but it makes sense. Basically Server_socket::m_unaccepted_socks and Server_socket::m_originating_serv – for each element of m_unaccepted_socks – are modified together in a synchronized way.

See also
Server_socket::m_connecting_socks and Server_socket::m_unaccepted_socks for the closely related inverse.
-

Definition at line 1241 of file peer_socket.hpp.

+

Definition at line 1242 of file peer_socket.hpp.

@@ -3958,7 +3958,7 @@

Node::low_lvl_recv_and_handle()/etc. and loses meaning after either method exits. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1604 of file peer_socket.hpp.

+

Definition at line 1605 of file peer_socket.hpp.

@@ -3989,9 +3989,9 @@

Node) and a user thread U != W (in receive(), etc.). It is thus protected by a mutex.

-

Definition at line 1260 of file peer_socket.hpp.

+

Definition at line 1261 of file peer_socket.hpp.

-

Referenced by receive(), and sync_receive_impl().

+

Referenced by receive(), and sync_receive_impl().

@@ -4021,7 +4021,7 @@

util::schedule_task_from_now() (etc.) facility (which internally uses a Timer but hides its various annoyances and caveats). Why not here? Answer: This timer is scheduled and fires often (could be on the order of every 1-500 milliseconds) and throughout a given socket's existence; hence the potential performance effects aren't worth the risk (or at least mental energy spent on evaluating that risk, originally and over time). The conservative thing to do is reuse a single Timer repeatedly, as we do here.

-

Definition at line 1674 of file peer_socket.hpp.

+

Definition at line 1675 of file peer_socket.hpp.

@@ -4048,7 +4048,7 @@

Definition at line 1636 of file peer_socket.hpp.

+

Definition at line 1637 of file peer_socket.hpp.

@@ -4075,7 +4075,7 @@

Syn_packet or Syn_ack_packet we received.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex. Useful at least in verifying the validity of duplicate SYNs and SYN_ACKs.

-

Definition at line 1386 of file peer_socket.hpp.

+

Definition at line 1387 of file peer_socket.hpp.

Referenced by flow::net_flow::Node::sock_categorize_data_to_established().

@@ -4105,7 +4105,7 @@

Definition at line 1626 of file peer_socket.hpp.

+

Definition at line 1627 of file peer_socket.hpp.

@@ -4134,7 +4134,7 @@

See also
m_rcv_packets_with_gaps.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1401 of file peer_socket.hpp.

+

Definition at line 1402 of file peer_socket.hpp.

@@ -4201,7 +4201,7 @@

Memory use

See also
m_rcv_reassembly_q_data_size.
Todo:
The memory use of this structure could be greatly optimized if, instead of storing each individual received packet's metadata separately, we always merged contiguous sequence number ranges. So for example if packet P1, P2, P3 (contiguous) all arrived in sequence, after missing packet P0, then we'd store P1's first sequence number and the total data size of P1+P2+P3, in a single struct instance. Since a typical pattern might include 1 lost packet followed by 100 received packets, we'd be able to cut down memory use by a factor of about 100 in that case (and thus worry much less about the limit). Of course the code would get more complex and potentially slower (but not necessarily significantly).
-

Definition at line 1536 of file peer_socket.hpp.

+

Definition at line 1537 of file peer_socket.hpp.

@@ -4231,7 +4231,7 @@

Definition at line 1566 of file peer_socket.hpp.

+

Definition at line 1567 of file peer_socket.hpp.

@@ -4259,7 +4259,7 @@

Node::low_lvl_recv_and_handle()/etc. and loses meaning after either method exits. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1580 of file peer_socket.hpp.

+

Definition at line 1581 of file peer_socket.hpp.

@@ -4287,7 +4287,7 @@

Definition at line 1545 of file peer_socket.hpp.

+

Definition at line 1546 of file peer_socket.hpp.

@@ -4313,7 +4313,7 @@

Definition at line 1677 of file peer_socket.hpp.

+

Definition at line 1678 of file peer_socket.hpp.

@@ -4340,7 +4340,7 @@

m_rcv_syn_rcvd_data_q.

Undefined when the latter is empty. Used to limit its size. This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1376 of file peer_socket.hpp.

+

Definition at line 1377 of file peer_socket.hpp.

@@ -4368,7 +4368,7 @@

Node::handle_data_to_syn_rcvd() for more detail.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1369 of file peer_socket.hpp.

+

Definition at line 1370 of file peer_socket.hpp.

@@ -4395,7 +4395,7 @@

m_rcv_in_rcv_wnd_recovery is true, this is the scheduled task to possibly send another unsolicited rcv_wnd-advertising ACK to the other side.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1654 of file peer_socket.hpp.

+

Definition at line 1655 of file peer_socket.hpp.

@@ -4423,7 +4423,7 @@

Definition at line 1645 of file peer_socket.hpp.

+

Definition at line 1646 of file peer_socket.hpp.

@@ -4449,7 +4449,7 @@

remote_endpoint(). Should be set before user gets access to *this and not changed afterwards.

-

Definition at line 1344 of file peer_socket.hpp.

+

Definition at line 1345 of file peer_socket.hpp.

Referenced by remote_endpoint().

@@ -4478,7 +4478,7 @@

m_snd_smoothed_round_trip_time calculation.

See also
m_snd_smoothed_round_trip_time.
-

Definition at line 2041 of file peer_socket.hpp.

+

Definition at line 2042 of file peer_socket.hpp.

@@ -4506,7 +4506,7 @@

m_security_token it received is equal to the original one it had sent in SYN_ACK. This first gains meaning upong sending SYN_ACK and it does not change afterwards. It is not used unless !m_active_connect. See m_active_connect.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 2117 of file peer_socket.hpp.

+

Definition at line 2118 of file peer_socket.hpp.

@@ -4535,7 +4535,7 @@

m_snd_buf and m_rcv_buf (protected by m_mutex). This would not be necessary, since this value is immutable once user gets access to *this, and threads other than W can access it, but sock_free_memory() does clear it while the user may be accessing it. Due to that caveat, we have to lock it.

-

Definition at line 1328 of file peer_socket.hpp.

+

Definition at line 1329 of file peer_socket.hpp.

Referenced by get_connect_metadata().

@@ -4569,7 +4569,7 @@

Visibility between Peer_socket. For example, it can read m_snd_smoothed_round_trip_time (the SRTT) and use it for computations if needed. Node and Peer_socket get only strict public API access to m_snd_bandwidth_estimator, which is a black box to it.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 2022 of file peer_socket.hpp.

+

Definition at line 2023 of file peer_socket.hpp.

@@ -4599,9 +4599,9 @@

m_rcv_buf.

-

Definition at line 1278 of file peer_socket.hpp.

+

Definition at line 1279 of file peer_socket.hpp.

-

Referenced by send(), and sync_send_impl().

+

Referenced by send(), and sync_send_impl().

@@ -4633,7 +4633,7 @@

Visibility between m_snd_cong_ctl gets read-only (const!) but otherwise complete private access (via friend) to the contents of *this Peer_socket. For example, it can read this->m_snd_smoothed_round_trip_time (the SRTT) and use it for computations if needed. Node and Peer_socket get only strict public API access to m_snd_cong_ctl, which is a black box to it.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1977 of file peer_socket.hpp.

+

Definition at line 1978 of file peer_socket.hpp.

@@ -4661,7 +4661,7 @@

m_snd_smoothed_round_trip_time is updated, and the Drop_timer itself may change it under certain circumstances.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 2061 of file peer_socket.hpp.

+

Definition at line 2062 of file peer_socket.hpp.

@@ -4689,7 +4689,7 @@

m_int_state is Int_state::S_ESTABLISHED.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 2051 of file peer_socket.hpp.

+

Definition at line 2052 of file peer_socket.hpp.

@@ -4719,7 +4719,7 @@

See also
m_snd_flying_pkts_by_sent_when, which must always be updated to be accurate w/r/t m_snd_flying_bytes. Use Node::snd_flying_pkts_updated() whenever m_snd_flying_pkts_by_sent_when is changed.
-

Definition at line 1898 of file peer_socket.hpp.

+

Definition at line 1899 of file peer_socket.hpp.

@@ -4765,7 +4765,7 @@

Thread safety

m_snd_flying_pkts_by_seq_num, which provides an ordering of the elements of m_snd_flying_pkts_by_sent_when by sequence number. Whereas the present structure is used to determine m_acks_after_me (since logically "after" means "sent after"), ..._by_seq_num is akin to the more classic TCP scoreboard, which is used to subdivide the sequence number space (closely related to m_snd_next_seq_num and such). With retransmission off, "after" would simply mean "having higher sequence number," so m_snd_flying_pkts_by_sent_when would already provide this ordering, but with retransmission on a retransmitted packet with a lower number could be sent after one with a higher number. To make the code simpler, we therefore rely on a separate structure in either situation.
-

Definition at line 1805 of file peer_socket.hpp.

+

Definition at line 1806 of file peer_socket.hpp.

@@ -4832,7 +4832,7 @@

Thread safety

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

See also
m_snd_flying_pkts_by_sent_when. There's a "see also" comment there that contrasts these two important structures.
-

Definition at line 1879 of file peer_socket.hpp.

+

Definition at line 1880 of file peer_socket.hpp.

@@ -4861,7 +4861,7 @@

See also
m_snd_flying_pkts_by_seq_num and m_snd_flying_pkts_by_sent_when.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1688 of file peer_socket.hpp.

+

Definition at line 1689 of file peer_socket.hpp.

@@ -4892,7 +4892,7 @@

m_snd_pacing_data. See pacing-relevant note on Sent_packet::m_sent_when which applies equally to this data member.

-

Definition at line 2103 of file peer_socket.hpp.

+

Definition at line 2104 of file peer_socket.hpp.

@@ -4921,7 +4921,7 @@

Definition at line 2087 of file peer_socket.hpp.

+

Definition at line 2088 of file peer_socket.hpp.

@@ -4950,7 +4950,7 @@

Definition at line 1929 of file peer_socket.hpp.

+

Definition at line 1930 of file peer_socket.hpp.

@@ -4980,7 +4980,7 @@

See also
m_snd_flying_pkts_by_seq_num and m_snd_flying_pkts_by_sent_when.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1702 of file peer_socket.hpp.

+

Definition at line 1703 of file peer_socket.hpp.

@@ -5008,7 +5008,7 @@

See also
struct Send_pacing_data doc header for much detail.
-

Definition at line 2070 of file peer_socket.hpp.

+

Definition at line 2071 of file peer_socket.hpp.

@@ -5036,7 +5036,7 @@

m_rcv_acked_packets. See Node::handle_ack_to_established() for details.

This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc. and loses meaning after either method exits. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1616 of file peer_socket.hpp.

+

Definition at line 1617 of file peer_socket.hpp.

@@ -5065,7 +5065,7 @@

m_snd_cong_ctl provides congestion control; this value provides flow control. The socket's state machine must be extremely careful whenever either this value or m_snd_cong_ctl->congestion_window_bytes() may increase, as when that occurs it should call Node::send_worker() in order to possibly send data over the network.

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 1994 of file peer_socket.hpp.

+

Definition at line 1995 of file peer_socket.hpp.

@@ -5095,7 +5095,7 @@

Definition at line 1946 of file peer_socket.hpp.

+

Definition at line 1947 of file peer_socket.hpp.

@@ -5121,7 +5121,7 @@

Definition at line 1949 of file peer_socket.hpp.

+

Definition at line 1950 of file peer_socket.hpp.

@@ -5150,7 +5150,7 @@

Fine_duration (the high fine-grainedness and large bit width corresponding to Fine_clock) to store this, and the algorithm we use to compute it avoids losing digits via unnecessary conversions between units (e.g., nanoseconds -> milliseconds).

This gains meaning only in thread W. This should NOT be accessed outside of thread W and is not protected by a mutex.

-

Definition at line 2038 of file peer_socket.hpp.

+

Definition at line 2039 of file peer_socket.hpp.

@@ -5176,7 +5176,7 @@

Definition at line 2106 of file peer_socket.hpp.

+

Definition at line 2107 of file peer_socket.hpp.

@@ -5204,7 +5204,7 @@

Definition at line 1915 of file peer_socket.hpp.

+

Definition at line 1916 of file peer_socket.hpp.

@@ -5232,7 +5232,7 @@

state() and others). Must be protected by mutex.

-

Definition at line 1192 of file peer_socket.hpp.

+

Definition at line 1193 of file peer_socket.hpp.

Referenced by state().

@@ -5246,7 +5246,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator-members.html index 12f941e5c..565370528 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator-members.html @@ -137,7 +137,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html index 0028a718b..4972ad94e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html @@ -1030,7 +1030,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html index 853fca660..e5fc22d4b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats.html index b6f521b4c..374bf240b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats.html @@ -863,7 +863,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator-members.html index 791ec35f0..11ff8c2b6 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator-members.html @@ -121,7 +121,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html index 888d5f1c9..6bda2b429 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html @@ -744,7 +744,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space-members.html index 43b333d34..443c88835 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space-members.html @@ -107,7 +107,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space.html index e5965133a..64d070578 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Port__space.html @@ -424,7 +424,7 @@

Definition at line 67 of file port_space.cpp.

-

References flow::util::in_closed_open_range(), S_FIRST_SERVICE_PORT, and S_NUM_SERVICE_PORTS.

+

References flow::util::in_closed_open_range(), S_FIRST_SERVICE_PORT, and S_NUM_SERVICE_PORTS.

Referenced by reserve_port(), and return_port().

@@ -580,9 +580,9 @@

Definition at line 175 of file port_space.cpp.

-

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::util::in_closed_open_range(), is_service_port(), m_ephemeral_and_recent_ephemeral_ports, m_ephemeral_ports, m_recent_ephemeral_ports, m_service_ports, S_FIRST_EPHEMERAL_PORT, S_FIRST_SERVICE_PORT, flow::net_flow::error::S_INTERNAL_ERROR_PORT_NOT_TAKEN, S_MAX_RECENT_EPHEMERAL_PORTS, and S_NUM_EPHEMERAL_PORTS.

+

References FLOW_ERROR_EMIT_ERROR, FLOW_LOG_INFO, FLOW_LOG_TRACE, flow::util::in_closed_open_range(), is_service_port(), m_ephemeral_and_recent_ephemeral_ports, m_ephemeral_ports, m_recent_ephemeral_ports, m_service_ports, S_FIRST_EPHEMERAL_PORT, S_FIRST_SERVICE_PORT, flow::net_flow::error::S_INTERNAL_ERROR_PORT_NOT_TAKEN, S_MAX_RECENT_EPHEMERAL_PORTS, and S_NUM_EPHEMERAL_PORTS.

-

Referenced by flow::net_flow::Node::close_connection_immediately(), flow::net_flow::Node::close_empty_server_immediately(), and flow::net_flow::Node::listen_worker().

+

Referenced by flow::net_flow::Node::close_connection_immediately(), flow::net_flow::Node::close_empty_server_immediately(), and flow::net_flow::Node::listen_worker().

Here is the call graph for this function:
@@ -920,7 +920,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator-members.html index f00e48596..af589efb1 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator-members.html @@ -101,7 +101,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator.html index 1c75a91ed..453363dee 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Send__bandwidth__estimator.html @@ -683,7 +683,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number-members.html index 9e42a2055..f4770a445 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number-members.html @@ -103,7 +103,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number.html index 82a35601c..b19b3d49c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number.html @@ -888,7 +888,7 @@

References m_multiple_size, m_num, m_num_line_id, and m_zero_point_num.

-

Referenced by flow::net_flow::Node::connect_worker(), flow::net_flow::Syn_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Syn_ack_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Data_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Ack_packet::deserialize_type_specific_data_from_raw_data_packet(), and flow::net_flow::Node::handle_syn_to_listening_server().

+

Referenced by flow::net_flow::Node::connect_worker(), flow::net_flow::Syn_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Syn_ack_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Data_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Ack_packet::deserialize_type_specific_data_from_raw_data_packet(), and flow::net_flow::Node::handle_syn_to_listening_server().

Here is the caller graph for this function:
@@ -1185,7 +1185,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator-members.html index d762f220f..71937f1e0 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator-members.html @@ -94,7 +94,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator.html index 34aaaf28b..fc609215c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Sequence__number_1_1Generator.html @@ -368,7 +368,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket-members.html index 2391c595b..a0a455f9e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket-members.html @@ -119,7 +119,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket.html index c058e817c..87ab5e8e3 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Server__socket.html @@ -1247,7 +1247,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer-members.html index a9d4b6549..4fa084b83 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer-members.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer.html index cf35f7ce4..c63ee7eab 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1Socket__buffer.html @@ -408,9 +408,9 @@

Definition at line 103 of file socket_buffer.cpp.

-

References flow::util::buffers_dump_string(), consume_bufs_copy(), FLOW_LOG_DATA, FLOW_LOG_TRACE, m_data_size, and m_q.

+

References flow::util::buffers_dump_string(), consume_bufs_copy(), FLOW_LOG_DATA, FLOW_LOG_TRACE, m_data_size, and m_q.

-

Referenced by flow::net_flow::Node::send_worker().

+

Referenced by flow::net_flow::Node::send_worker().

Here is the call graph for this function:
@@ -462,9 +462,9 @@

Definition at line 543 of file socket_buffer.hpp.

-

References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_TRACE, m_data_size, and m_q.

+

References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_TRACE, m_data_size, and m_q.

-

Referenced by consume_buf_move(), flow::net_flow::Peer_socket::receive(), and flow::net_flow::Peer_socket::sync_receive_impl().

+

Referenced by consume_buf_move(), flow::net_flow::Peer_socket::receive(), and flow::net_flow::Peer_socket::sync_receive_impl().

Here is the call graph for this function:
@@ -659,7 +659,7 @@

References m_data_size.

-

Referenced by flow::net_flow::Node::send_worker().

+

Referenced by flow::net_flow::Node::send_worker().

Here is the caller graph for this function:
@@ -733,7 +733,7 @@

Definition at line 39 of file socket_buffer.cpp.

-

References flow::util::buffers_dump_string(), feed_bufs_copy(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_block_size_hint, m_data_size, and m_q.

+

References flow::util::buffers_dump_string(), feed_bufs_copy(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_block_size_hint, m_data_size, and m_q.

Here is the call graph for this function:
@@ -791,9 +791,9 @@

Definition at line 391 of file socket_buffer.hpp.

-

References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_block_size_hint, m_data_size, and m_q.

+

References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_TRACE, flow::log::Log_context::get_logger(), m_block_size_hint, m_data_size, and m_q.

-

Referenced by feed_buf_move(), flow::net_flow::Peer_socket::send(), and flow::net_flow::Peer_socket::sync_send_impl().

+

Referenced by feed_buf_move(), flow::net_flow::Peer_socket::send(), and flow::net_flow::Peer_socket::sync_send_impl().

Here is the call graph for this function:
@@ -956,7 +956,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node-members.html index bdef2138d..4102add29 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node-members.html @@ -282,7 +282,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node.html index 7551f3fe6..7531c5a0a 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Node.html @@ -759,7 +759,7 @@

Definition at line 171 of file peer_socket.cpp.

-

References async_task_engine(), flow::net_flow::asio::Peer_socket::cast(), flow::net_flow::Node::connect_with_metadata(), FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_CLOSED, and flow::net_flow::error::S_WAIT_USER_TIMEOUT.

+

References async_task_engine(), flow::net_flow::asio::Peer_socket::cast(), flow::net_flow::Node::connect_with_metadata(), FLOW_LOG_TRACE, flow::net_flow::Peer_socket::S_CLOSED, and flow::net_flow::error::S_WAIT_USER_TIMEOUT.

Referenced by async_connect(), and async_connect_with_metadata().

@@ -1358,7 +1358,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html index 7e0d127c5..781055761 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html @@ -233,7 +233,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html index f1b58e0b1..58019f464 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html @@ -1703,7 +1703,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html index 2e733a31d..de460b065 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html @@ -133,7 +133,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket.html index d192ddfaf..8a3d64e1e 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1asio_1_1Server__socket.html @@ -1085,7 +1085,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category-members.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category-members.html index 4b64e7da7..837949531 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category-members.html @@ -80,7 +80,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category.html b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category.html index 6f0e9e58d..cf22c4335 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1net__flow_1_1error_1_1Category.html @@ -156,7 +156,7 @@

Definition at line 107 of file error.cpp.

-

References flow::util::ostream_op_to_string(), flow::net_flow::error::S_CANNOT_CONNECT_TO_IP_ANY, flow::net_flow::error::S_CONN_METADATA_TOO_LARGE, flow::net_flow::error::S_CONN_REFUSED, flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::error::S_CONN_RESET_BY_OTHER_SIDE, flow::net_flow::error::S_CONN_RESET_TOO_MANY_REXMITS, flow::net_flow::error::S_CONN_TIMEOUT, flow::net_flow::error::S_EVENT_SET_CLOSED, flow::net_flow::error::S_EVENT_SET_DOUBLE_WAIT_OR_POLL, flow::net_flow::error::S_EVENT_SET_EVENT_ALREADY_EXISTS, flow::net_flow::error::S_EVENT_SET_EVENT_DOES_NOT_EXIST, flow::net_flow::error::S_EVENT_SET_IMMUTABLE_WHEN_WAITING, flow::net_flow::error::S_EVENT_SET_NO_EVENTS, flow::net_flow::error::S_EVENT_SET_RESULT_CHECK_WHEN_WAITING, flow::net_flow::Port_space::S_FIRST_SERVICE_PORT, flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::error::S_INTERNAL_ERROR_PORT_NOT_TAKEN, flow::net_flow::error::S_INTERNAL_ERROR_SYSTEM_ERROR_ASIO_TIMER, flow::net_flow::error::S_INVALID_SERVICE_PORT_NUMBER, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::error::S_NODE_SHUTTING_DOWN, flow::net_flow::Port_space::S_NUM_SERVICE_PORTS, flow::net_flow::error::S_OPTION_CHECK_FAILED, flow::net_flow::error::S_OUT_OF_PORTS, flow::net_flow::error::S_PORT_TAKEN, flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION, flow::net_flow::error::S_STATIC_OPTION_CHANGED, flow::net_flow::error::S_USER_CLOSED_ABRUPTLY, flow::net_flow::error::S_WAIT_INTERRUPTED, and flow::net_flow::error::S_WAIT_USER_TIMEOUT.

+

References flow::util::ostream_op_to_string(), flow::net_flow::error::S_CANNOT_CONNECT_TO_IP_ANY, flow::net_flow::error::S_CONN_METADATA_TOO_LARGE, flow::net_flow::error::S_CONN_REFUSED, flow::net_flow::error::S_CONN_RESET_BAD_PEER_BEHAVIOR, flow::net_flow::error::S_CONN_RESET_BY_OTHER_SIDE, flow::net_flow::error::S_CONN_RESET_TOO_MANY_REXMITS, flow::net_flow::error::S_CONN_TIMEOUT, flow::net_flow::error::S_EVENT_SET_CLOSED, flow::net_flow::error::S_EVENT_SET_DOUBLE_WAIT_OR_POLL, flow::net_flow::error::S_EVENT_SET_EVENT_ALREADY_EXISTS, flow::net_flow::error::S_EVENT_SET_EVENT_DOES_NOT_EXIST, flow::net_flow::error::S_EVENT_SET_IMMUTABLE_WHEN_WAITING, flow::net_flow::error::S_EVENT_SET_NO_EVENTS, flow::net_flow::error::S_EVENT_SET_RESULT_CHECK_WHEN_WAITING, flow::net_flow::Port_space::S_FIRST_SERVICE_PORT, flow::net_flow::error::S_INTERNAL_ERROR_PORT_COLLISION, flow::net_flow::error::S_INTERNAL_ERROR_PORT_NOT_TAKEN, flow::net_flow::error::S_INTERNAL_ERROR_SYSTEM_ERROR_ASIO_TIMER, flow::net_flow::error::S_INVALID_SERVICE_PORT_NUMBER, flow::net_flow::error::S_NODE_NOT_RUNNING, flow::net_flow::error::S_NODE_SHUTTING_DOWN, flow::net_flow::Port_space::S_NUM_SERVICE_PORTS, flow::net_flow::error::S_OPTION_CHECK_FAILED, flow::net_flow::error::S_OUT_OF_PORTS, flow::net_flow::error::S_PORT_TAKEN, flow::net_flow::error::S_SEQ_NUM_ARITHMETIC_FAILURE, flow::net_flow::error::S_SEQ_NUM_IMPLIES_CONNECTION_COLLISION, flow::net_flow::error::S_STATIC_OPTION_CHANGED, flow::net_flow::error::S_USER_CLOSED_ABRUPTLY, flow::net_flow::error::S_WAIT_INTERRUPTED, and flow::net_flow::error::S_WAIT_USER_TIMEOUT.

Here is the call graph for this function:
@@ -231,7 +231,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer-members.html b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer-members.html index 47e839aa1..3978eb3e3 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer-members.html @@ -115,7 +115,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer.html b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer.html index 59a5095a3..333c462e5 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer.html @@ -438,7 +438,7 @@

Definition at line 29 of file checkpt_timer.cpp.

-

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), m_checkpoints, m_last_checkpoint_when, m_name, m_start_when, m_which_clocks, now(), flow::util::ostream_op_string(), flow::log::S_TRACE, and flow::log::Logger::should_log().

+

References FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), m_checkpoints, m_last_checkpoint_when, m_name, m_start_when, m_which_clocks, now(), flow::util::ostream_op_string(), flow::log::S_TRACE, and flow::log::Logger::should_log().

Referenced by flow::perf::Checkpointing_timer::Aggregator::create_aggregated_result().

@@ -1329,7 +1329,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html index 49670d1d4..6e4ec979c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html @@ -95,7 +95,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html index d56bfba6c..bef10761f 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html @@ -525,7 +525,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob-members.html index 343d70ded..f78706cc2 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob-members.html @@ -155,7 +155,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob.html index 1b10a9fca..8accb7128 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob.html @@ -1538,7 +1538,7 @@

Definition at line 2437 of file basic_blob.hpp.

-

References flow::util::in_closed_open_range().

+

References flow::util::in_closed_open_range().

Here is the call graph for this function:
@@ -2840,7 +2840,7 @@

Definition at line 2430 of file basic_blob.hpp.

-

References flow::util::in_closed_range().

+

References flow::util::in_closed_range().

Here is the call graph for this function:
@@ -3317,7 +3317,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw-members.html index fb749ad92..505c5c186 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw-members.html @@ -83,7 +83,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html index 90f6d8dbd..f68f5aaab 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html @@ -337,7 +337,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view-members.html index 623834944..199f96350 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view-members.html @@ -90,7 +90,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view.html index 28c823196..5295590e0 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Basic__string__view.html @@ -596,7 +596,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context-members.html index 77662854a..036211771 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context-members.html @@ -188,7 +188,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context.html index 9c71ef967..2540d3523 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Blob__with__log__context.html @@ -1620,7 +1620,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits-members.html index e216d7dcb..d74447163 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits.html index f0eb20b5e..889de6efb 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits.html @@ -239,7 +239,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html index 0a05d0ad3..90a84aa35 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html index 29379d8b5..babd1cce9 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html @@ -238,7 +238,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html index 80df0bce6..c3838adc8 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html index e46fba7ef..9bf57491d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html @@ -239,7 +239,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html index a428a925d..393689e97 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html index d09bf69c8..3c7e34c74 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html @@ -238,7 +238,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html index 997315389..c6f0a59c4 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html index 5b5814a73..dfe81f0b8 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html @@ -239,7 +239,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html index 793546bdf..16be1378f 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html index c557c75a4..1f4399294 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html @@ -240,7 +240,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified-members.html index 7b3723069..33d93776c 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified.html index 9f5fbe8d9..f636f8e76 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Duration__units__beautified.html @@ -349,7 +349,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map-members.html index 1eacaa04c..094ed56be 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map-members.html @@ -145,7 +145,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map.html index 4eb5e301d..8e07264ea 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__map.html @@ -1627,7 +1627,7 @@

Definition at line 761 of file linked_hash_map.hpp.

-

Referenced by flow::net_flow::Node::close_connection_immediately().

+

Referenced by flow::net_flow::Node::close_connection_immediately().

Here is the caller graph for this function:
@@ -2216,7 +2216,7 @@

Performance

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set-members.html index 6635c2870..99c7074c6 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set-members.html @@ -140,7 +140,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set.html index 09f973d5e..3b3efd6de 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Linked__hash__set.html @@ -2080,7 +2080,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface-members.html index 5a87bbfc2..c891d59fd 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface.html index ab9332387..980420220 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Null__interface.html @@ -134,7 +134,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html index f4c0f46a1..3789b65b8 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range.html index 0b2adc7ab..77efc7b48 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range.html @@ -327,7 +327,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html index 59fbcbfe8..8aa84cdf3 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html index 574fd7cde..17f92625a 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html @@ -120,7 +120,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html index fba4e2fcf..5f2f45dc3 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html @@ -83,7 +83,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html index 468b29218..c26e64512 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html @@ -190,7 +190,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter-members.html index 400b25139..f8e9563ce 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter-members.html @@ -84,7 +84,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter.html index 6d8de9970..53cef087b 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Scoped__setter.html @@ -134,7 +134,7 @@
} // Restored from 125 to 75.
...
} // Restored from (probably) 75 to (whatever).
-
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:120
+
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:145

The object is movable, not copyable (which is similar to unique_ptr) to prevent "double-restore." Related: one can easily return customized auto-setter/restorers:

thread_local Widget s_widget;
auto widget_setter_auto(Widget&& widget_moved)
@@ -158,7 +158,7 @@

Implementation

An alternative implementation, which could even be reduced to just an alias, would have used unique_ptr. However in this case I (ygoldfel) wanted maximum control for perf. The use case originally driving this was the thread-local verbosity override: log::Config::this_thread_verbosity_override_auto(). flow::log is fairly paranoid about performance, in general, although admittedly this particular call isn't necessarily ubiquitous.

-

Definition at line 119 of file util.hpp.

+

Definition at line 144 of file util.hpp.

Constructor & Destructor Documentation

◆ Scoped_setter() [1/2]

@@ -206,9 +206,9 @@

Definition at line 181 of file util.hpp.

+

Definition at line 206 of file util.hpp.

-

References flow::util::Scoped_setter< Value >::m_target_or_null.

+

References flow::util::Scoped_setter< Value >::m_target_or_null.

@@ -238,9 +238,9 @@

Definition at line 189 of file util.hpp.

+

Definition at line 214 of file util.hpp.

-

References flow::util::Scoped_setter< Value >::m_target_or_null.

+

References flow::util::Scoped_setter< Value >::m_target_or_null.

@@ -260,7 +260,7 @@

Definition at line 200 of file util.hpp.

+

Definition at line 225 of file util.hpp.

@@ -289,7 +289,7 @@

m_target_or_null is non-null, this saves *m_target_or_null. Otherwise meaningless.

-

Definition at line 173 of file util.hpp.

+

Definition at line 198 of file util.hpp.

@@ -317,9 +317,9 @@

Scoped_setter that intentionally no-ops.

-

Definition at line 170 of file util.hpp.

+

Definition at line 195 of file util.hpp.

-

Referenced by flow::util::Scoped_setter< Value >::Scoped_setter().

+

Referenced by flow::util::Scoped_setter< Value >::Scoped_setter().

@@ -329,7 +329,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html index e99025c11..f7a24819d 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder.html index be0733c8c..2f9cbd959 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Shared__ptr__alias__holder.html @@ -378,7 +378,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream-members.html index 016944265..3d60faddd 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream-members.html @@ -86,7 +86,7 @@ diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream.html index 4f0e74c43..f55758ecc 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1String__ostream.html @@ -228,7 +228,7 @@

References m_target_appender_ostream.

-

Referenced by flow::log::Thread_local_string_appender::appender_ostream(), flow::util::buffers_dump_string(), flow::util::ostream_op_to_string(), flow::log::Thread_local_string_appender::save_formatting_state_and_restore_prev(), and flow::cfg::Option_set_base::throw_on_invalid_func().

+

Referenced by flow::log::Thread_local_string_appender::appender_ostream(), flow::util::buffers_dump_string(), flow::util::ostream_op_to_string(), flow::log::Thread_local_string_appender::save_formatting_state_and_restore_prev(), and flow::cfg::Option_set_base::throw_on_invalid_func().

Here is the caller graph for this function:
@@ -447,7 +447,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder-members.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder-members.html index 53a52a3a5..56bab1705 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder-members.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder-members.html @@ -84,7 +84,7 @@

diff --git a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder.html b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder.html index dbf23852a..43121a131 100644 --- a/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder.html +++ b/doc/flow_doc/generated/html_full/classflow_1_1util_1_1Unique__id__holder.html @@ -447,7 +447,7 @@

Implementation subtleties

diff --git a/doc/flow_doc/generated/html_full/clock__type_8cpp.html b/doc/flow_doc/generated/html_full/clock__type_8cpp.html index cfb53561b..3ae7cd03c 100644 --- a/doc/flow_doc/generated/html_full/clock__type_8cpp.html +++ b/doc/flow_doc/generated/html_full/clock__type_8cpp.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_full/clock__type_8cpp_source.html b/doc/flow_doc/generated/html_full/clock__type_8cpp_source.html index 62b2d1a87..5e36b104b 100644 --- a/doc/flow_doc/generated/html_full/clock__type_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/clock__type_8cpp_source.html @@ -209,7 +209,7 @@
@ S_CPU_USER_LO_RES
Along with S_CPU_SYS_LO_RES, measures processor time (user-level) spent by the current process; this ...
Duration_set operator-(const Time_pt_set &to, const Time_pt_set &from)
Returns a Duration_set representing the time that passed since from to to (negative if to happened ea...
Definition: clock_type.cpp:26
Duration_set & operator/=(Duration_set &target, uint64_t div_scale)
Divides each Duration in the target Duration_set by the given numerical constant.
Definition: clock_type.cpp:68
-
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:342
+
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:367
Convenience wrapper around an array<Duration, N>, which stores a duration for each of the N possible ...
std::array< Duration, size_t(Clock_type::S_END_SENTINEL)> m_values
The underlying data, directly readable and writable by user. NOT ZERO-INITIALIZED ON CONSTRUCTION (or...
@@ -219,7 +219,7 @@ diff --git a/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp.html b/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp.html index d50edbffc..3e0870f9d 100644 --- a/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp.html @@ -157,7 +157,7 @@ diff --git a/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp_source.html index 66fce709d..e1132d01d 100644 --- a/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/clock__type__fwd_8hpp_source.html @@ -390,8 +390,8 @@
Duration_set operator-(const Time_pt_set &to, const Time_pt_set &from)
Returns a Duration_set representing the time that passed since from to to (negative if to happened ea...
Definition: clock_type.cpp:26
Duration_set & operator/=(Duration_set &target, uint64_t div_scale)
Divides each Duration in the target Duration_set by the given numerical constant.
Definition: clock_type.cpp:68
@ S_END_SENTINEL
CAUTION – see flow::Flow_log_component doc header for directions to find actual members of this enum ...
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
Convenience wrapper around an array<Duration, N>, which stores a duration for each of the N possible ...
std::array< Duration, size_t(Clock_type::S_END_SENTINEL)> m_values
The underlying data, directly readable and writable by user. NOT ZERO-INITIALIZED ON CONSTRUCTION (or...
Convenience wrapper around an array<Time_pt, N>, which stores a time point for each of the N possible...
@@ -399,7 +399,7 @@ diff --git a/doc/flow_doc/generated/html_full/common_8cpp.html b/doc/flow_doc/generated/html_full/common_8cpp.html index 085036a07..352320498 100644 --- a/doc/flow_doc/generated/html_full/common_8cpp.html +++ b/doc/flow_doc/generated/html_full/common_8cpp.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/common_8cpp_source.html b/doc/flow_doc/generated/html_full/common_8cpp_source.html index 589f37446..215984f4a 100644 --- a/doc/flow_doc/generated/html_full/common_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/common_8cpp_source.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/common_8hpp.html b/doc/flow_doc/generated/html_full/common_8hpp.html index 1ce363b38..a69a5bdba 100644 --- a/doc/flow_doc/generated/html_full/common_8hpp.html +++ b/doc/flow_doc/generated/html_full/common_8hpp.html @@ -156,7 +156,7 @@

Definition at line 84 of file common.hpp.

+

Definition at line 89 of file common.hpp.

@@ -174,7 +174,7 @@

Definition at line 87 of file common.hpp.

+

Definition at line 92 of file common.hpp.

@@ -192,14 +192,14 @@

Definition at line 90 of file common.hpp.

+

Definition at line 95 of file common.hpp.

diff --git a/doc/flow_doc/generated/html_full/common_8hpp_source.html b/doc/flow_doc/generated/html_full/common_8hpp_source.html index 50385e943..cf80e5bed 100644 --- a/doc/flow_doc/generated/html_full/common_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/common_8hpp_source.html @@ -138,622 +138,627 @@
70 *
71 * Note this isn't academic; as of this writing there's at least a C++14-requiring constexpr feature in use in one
72 * of the headers. So at least C++14 has been required for ages in actual practice. Later, notched it up to C++17
-
73 * by similar logic. */
-
74#if (!defined(__cplusplus)) || (__cplusplus < 201703L)
-
75// Would use static_assert(false), but... it's C++11 and later only. So.
-
76# error "To compile a translation unit that `#include`s any flow/ API headers, use C++17 compile mode or later."
-
77#endif
-
78
-
79// Macros. These (conceptually) belong to the `flow` namespace (hence the prefix for each macro).
-
80
-
81#ifdef FLOW_DOXYGEN_ONLY // Compiler ignores; Doxygen sees.
-
82
-
83/// Macro that is defined if and only if the compiling environment is Linux.
-
84# define FLOW_OS_LINUX
-
85
-
86/// Macro that is defined if and only if the compiling environment is Mac OS X or higher macOS (not iOS and such!).
-
87# define FLOW_OS_MAC
-
88
-
89/// Macro that is defined if and only if the compiling environment is Windows.
-
90# define FLOW_OS_WIN
-
91
-
92#else // if !defined(FLOW_DOXYGEN_ONLY)
-
93
-
94// Now the actual definitions compiler sees (Doxygen ignores).
-
95
-
96/* Used this delightful page for this logic:
-
97 * https://web.archive.org/web/20140625123925/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system */
-
98# ifdef __linux__
-
99# define FLOW_OS_LINUX
-
100# elif defined(__APPLE__) && (TARGET_OS_MAC == 1)
-
101# define FLOW_OS_MAC
-
102# elif defined(_WIN32) || defined(_WIN64)
-
103# define FLOW_OS_WIN
-
104# endif
-
105
-
106#endif // elif !defined(FLOW_DOXYGEN_ONLY)
-
107
-
108/**
-
109 * Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern
-
110 * C++17, originally by ygoldfel. (The very first version was in Boost-y C++03, back around 2010. Later, ~2019, it
-
111 * moved to C++14 in style and substance; and in 2022 to C++17 -- a relatively minor upgrade.)
-
112 * While the modules are orthogonal to each other in terms of functionality
-
113 * provided, they all share a common set of stylistic conventions and happen to use each other internally; hence
-
114 * they are distributed together as of this writing.
-
115 *
-
116 * From the user's perspective, one should view this namespace as the "root," meaning it consists of two parts:
-
117 * - Sub-namespaces (like flow::log, flow::util, flow::async, flow::net_flow),
-
118 * each of which represents a *Flow module* providing certain
-
119 * grouped functionality. Each module is self-contained from the point of view of the user, meaning:
-
120 * While the various modules may use each other internally (and hence cannot be easily distributed separately), from
-
121 * user's perspective each one can be directly `include`d/referenced without directly `include`ing/referring to the
-
122 * others. E.g., one can directly reference `namespace log` *and/or* `namespace util` *and/or* `namespace net_flow`
-
123 * *and/or* .... Further documentation can be found in the doc headers for each individual sub-namespace.
-
124 * - Symbols directly in `flow`: The absolute most basic, commonly used symbols (such as `uint32_t` or `Error_code`).
-
125 * There should be only a handful of these, and they are likely to be small.
-
126 * - In particular this includes `enum class Flow_log_component` which defines the set of possible
-
127 * flow::log::Component values logged from within all modules of Flow (again, including flow::util, flow::async,
-
128 * flow::net_flow, etc.). See end of common.hpp.
-
129 *
-
130 * Reiterating: Non-`namespace` symbols directly inside `namespace flow` are to be only extremely ubiquitous items
-
131 * such as the basic integer types and the log component `enum`. Anything beyond that should go into a sub-`namespace`
-
132 * of `flow`; if it is something miscellaneous then put it into flow::util.
-
133 *
-
134 * Here we summarize topics relevant to all of Flow. It is recommend one reads this before using any individual module,
-
135 * for topics like file organization and style conventions, topics arguably not of huge practical value right away.
-
136 * However, all the actual functionality is in the sub-modules, so once you're ready to actually do stuff, I reiterate:
-
137 * See the list of sub-namespaces of `flow` and start with the doc header of the one(s) of interest to you.
+
73 * by similar logic.
+
74 *
+
75 * Update: We continue to target C++17 (by default) in our build -- but now also support (and, outside
+
76 * the source code proper, test) C++20 mode build, albeit without using any C++20-only language or STL features. It is
+
77 * conceivable that at some point in the future we'll target C++20 by default (and drop support for C++17 and older).
+
78 * Naturally at that point we'd begin using C++20 language/STL features when convenient. */
+
79#if (!defined(__cplusplus)) || (__cplusplus < 201703L)
+
80// Would use static_assert(false), but... it's C++11 and later only. So.
+
81# error "To compile a translation unit that `#include`s any flow/ API headers, use C++17 compile mode or later."
+
82#endif
+
83
+
84// Macros. These (conceptually) belong to the `flow` namespace (hence the prefix for each macro).
+
85
+
86#ifdef FLOW_DOXYGEN_ONLY // Compiler ignores; Doxygen sees.
+
87
+
88/// Macro that is defined if and only if the compiling environment is Linux.
+
89# define FLOW_OS_LINUX
+
90
+
91/// Macro that is defined if and only if the compiling environment is Mac OS X or higher macOS (not iOS and such!).
+
92# define FLOW_OS_MAC
+
93
+
94/// Macro that is defined if and only if the compiling environment is Windows.
+
95# define FLOW_OS_WIN
+
96
+
97#else // if !defined(FLOW_DOXYGEN_ONLY)
+
98
+
99// Now the actual definitions compiler sees (Doxygen ignores).
+
100
+
101/* Used this delightful page for this logic:
+
102 * https://web.archive.org/web/20140625123925/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system */
+
103# ifdef __linux__
+
104# define FLOW_OS_LINUX
+
105# elif defined(__APPLE__) && (TARGET_OS_MAC == 1)
+
106# define FLOW_OS_MAC
+
107# elif defined(_WIN32) || defined(_WIN64)
+
108# define FLOW_OS_WIN
+
109# endif
+
110
+
111#endif // elif !defined(FLOW_DOXYGEN_ONLY)
+
112
+
113/**
+
114 * Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern
+
115 * C++17, originally by ygoldfel. (The very first version was in Boost-y C++03, back around 2010. Later, ~2019, it
+
116 * moved to C++14 in style and substance; and in 2022 to C++17 -- a relatively minor upgrade.)
+
117 * While the modules are orthogonal to each other in terms of functionality
+
118 * provided, they all share a common set of stylistic conventions and happen to use each other internally; hence
+
119 * they are distributed together as of this writing.
+
120 *
+
121 * From the user's perspective, one should view this namespace as the "root," meaning it consists of two parts:
+
122 * - Sub-namespaces (like flow::log, flow::util, flow::async, flow::net_flow),
+
123 * each of which represents a *Flow module* providing certain
+
124 * grouped functionality. Each module is self-contained from the point of view of the user, meaning:
+
125 * While the various modules may use each other internally (and hence cannot be easily distributed separately), from
+
126 * user's perspective each one can be directly `include`d/referenced without directly `include`ing/referring to the
+
127 * others. E.g., one can directly reference `namespace log` *and/or* `namespace util` *and/or* `namespace net_flow`
+
128 * *and/or* .... Further documentation can be found in the doc headers for each individual sub-namespace.
+
129 * - Symbols directly in `flow`: The absolute most basic, commonly used symbols (such as `uint32_t` or `Error_code`).
+
130 * There should be only a handful of these, and they are likely to be small.
+
131 * - In particular this includes `enum class Flow_log_component` which defines the set of possible
+
132 * flow::log::Component values logged from within all modules of Flow (again, including flow::util, flow::async,
+
133 * flow::net_flow, etc.). See end of common.hpp.
+
134 *
+
135 * Reiterating: Non-`namespace` symbols directly inside `namespace flow` are to be only extremely ubiquitous items
+
136 * such as the basic integer types and the log component `enum`. Anything beyond that should go into a sub-`namespace`
+
137 * of `flow`; if it is something miscellaneous then put it into flow::util.
138 *
-
139 * Documentation / Doxygen
-
140 * -----------------------
-
141 *
-
142 * All code in the project proper follows a high standard of documentation, almost solely via comments therein
-
143 * (as opposed to ancillary doc files/READMEs/etc.). Additionally, a subset of comments are Doxygen-targeted,
-
144 * meaning the comment starts with a special character sequence to cause the Doxygen utility to treat that comment
-
145 * as a doc header for a nearby symbol (class, method, etc.). (If you're not familiar with Doxygen: It's like Javadoc
-
146 * but better -- although mostly compatible with Javadoc-targeted comments as well -- not that we care about that.)
-
147 *
-
148 * From the same source code (the entire Flow tree) 2 (two) web docs are generated by Doxygen utility -- depending on
-
149 * which of the 2 Doxygen configuration files is chosen. You can determine which web docs you're reading currently
-
150 * (if indeed you are doing that, as opposed to reading raw code) via the wording of the title/header in every web page:
-
151 * - *Flow project: Full implementation reference*: This scans every header and translation unit file, including
-
152 * those in detail/ sub-directories at all levels; and all Doxygen-targeted comments (including this one)
-
153 * are fully scanned. Full browsable source code is included in the output also. As a result, it's basically
-
154 * an ultra-nice viewer of the entire source code (implementation included), with special emphasis on
-
155 * doc headers such as this one.
-
156 * - *Flow project: Public API*: Only headers are scanned; and all detail/ sub-directories at all levels are ignored.
-
157 * Additionally, any text following the (optional) `"@internal"` Doxygen command within each given Doxygen comment
-
158 * is ignored. Browsable source code is omitted. As a result, a clean public API documentation is generated with
-
159 * no "fat."
-
160 *
-
161 * While an important (achieved) goal is to keep the documentation of the library (internal and external, as noted)
-
162 * self-contained -- within the source code or auto-generated by taking that source code as input -- nevertheless some
-
163 * satellite documentation is likely to exist; for example to cover such things as the logistical state of the project,
-
164 * its test harness, perhaps the license, etc. Look outside the root src/flow directory.
+
139 * Here we summarize topics relevant to all of Flow. It is recommend one reads this before using any individual module,
+
140 * for topics like file organization and style conventions, topics arguably not of huge practical value right away.
+
141 * However, all the actual functionality is in the sub-modules, so once you're ready to actually do stuff, I reiterate:
+
142 * See the list of sub-namespaces of `flow` and start with the doc header of the one(s) of interest to you.
+
143 *
+
144 * Documentation / Doxygen
+
145 * -----------------------
+
146 *
+
147 * All code in the project proper follows a high standard of documentation, almost solely via comments therein
+
148 * (as opposed to ancillary doc files/READMEs/etc.). Additionally, a subset of comments are Doxygen-targeted,
+
149 * meaning the comment starts with a special character sequence to cause the Doxygen utility to treat that comment
+
150 * as a doc header for a nearby symbol (class, method, etc.). (If you're not familiar with Doxygen: It's like Javadoc
+
151 * but better -- although mostly compatible with Javadoc-targeted comments as well -- not that we care about that.)
+
152 *
+
153 * From the same source code (the entire Flow tree) 2 (two) web docs are generated by Doxygen utility -- depending on
+
154 * which of the 2 Doxygen configuration files is chosen. You can determine which web docs you're reading currently
+
155 * (if indeed you are doing that, as opposed to reading raw code) via the wording of the title/header in every web page:
+
156 * - *Flow project: Full implementation reference*: This scans every header and translation unit file, including
+
157 * those in detail/ sub-directories at all levels; and all Doxygen-targeted comments (including this one)
+
158 * are fully scanned. Full browsable source code is included in the output also. As a result, it's basically
+
159 * an ultra-nice viewer of the entire source code (implementation included), with special emphasis on
+
160 * doc headers such as this one.
+
161 * - *Flow project: Public API*: Only headers are scanned; and all detail/ sub-directories at all levels are ignored.
+
162 * Additionally, any text following the (optional) `"@internal"` Doxygen command within each given Doxygen comment
+
163 * is ignored. Browsable source code is omitted. As a result, a clean public API documentation is generated with
+
164 * no "fat."
165 *
-
166 * @todo As of this writing the *exact* nature of where the project will permanently reside (and who will maintain it
-
167 * vs. use it) is in flux. Therefore for now I have removed the section covering certain topics and replaced it with
-
168 * the to-do you're reading. This should be undone when things settle down (obviously ensuring the brought-back section
-
169 * is made accurate). The topics to cover: `"@author"` (including contact info); GitHub/other address indicating where
-
170 * to browse the project source; link(s) to the latest auto-generated web docs (if any); a section on the
-
171 * history of the project; and licensing info (if deemed needed) or pointer to it. (Reminder: Also update any
-
172 * similar sections of the historically significant net_flow::Node doc header.)
-
173 *
-
174 * @todo Since Flow gained its first users beyond the original author, some Flow-adjacent code has been written from
-
175 * which Flow can benefit, including a potential `io` module/namespace for general networking/local I/O.
-
176 * (Flow itself continued to be developed, but some features were added
-
177 * elsewhere for expediency; this is a reminder to factor them out into Flow for the benefit of
-
178 * all.) Some features to migrate here might be: boost.asio extensions to UDP receive APIs to obtain receipt time
-
179 * stamps and destination IP (`recvmsg()` with ancillary data extensions) and to receive multiple datagrams in one
-
180 * call (`recvmmsg()`); boost.asio-adjacent facility to add custom socket options similarly to how boost.asio does it
-
181 * internally; boost.asio support for (local) transmission of native socket handles and security data over stream
-
182 * sockets (`SCM_RIGHTS`, etc.).
-
183 *
-
184 * Using Flow modules
-
185 * ------------------
-
186 *
-
187 * This section discusses usability topics that apply to all Flow modules including hopefully any future ones but
-
188 * definitely all existing ones as of this writing.
-
189 *
-
190 * ### Error reporting ###
-
191 * Similarly to boost.asio, all public methods that may return errors can either do so via an
-
192 * error code or an exception encapsulating that same error code. If user passes in non-null pointer to a
-
193 * flow::Error_code variable, the latter is set to success (falsy) or a specific failure (truthy `enum` value). If
-
194 * user passes in null pointer, an exception `exc` is thrown only in case of error and will encapsulate that error code
-
195 * (accessible via `exc.code()`).
-
196 *
-
197 * For details about error reporting, see doc headers for flow::Error_code (spoiler alert: a mere alias to
-
198 * `boost::system::error_code`) and `namespace` flow::error.
-
199 *
-
200 * ### Logging ###
-
201 * The flow::log namespace (see especially log::Logger and the various `FLOW_LOG_...*()` macros in
-
202 * log/log.hpp) provides a logging facility -- used by Flow modules' often-extensive logging, and equally available
-
203 * to the Flow user. Ultimately, you may tweak the log level and then observe the given Flow module's internal behavior
-
204 * to whatever level of detail you desire. Similarly, as the user, you may use this system for your own logging,
-
205 * even if you use no Flow module other than flow::log itself. Either way, you can hook up flow::log to log via your
-
206 * own log output device in arbitrary fashion (e.g., save the log messages in a database, if that's what you want).
-
207 *
-
208 * For details about logging, see doc header for `namespace` flow::log.
-
209 *
-
210 * @internal
-
211 *
-
212 * Implementation notes
-
213 * --------------------
+
166 * While an important (achieved) goal is to keep the documentation of the library (internal and external, as noted)
+
167 * self-contained -- within the source code or auto-generated by taking that source code as input -- nevertheless some
+
168 * satellite documentation is likely to exist; for example to cover such things as the logistical state of the project,
+
169 * its test harness, perhaps the license, etc. Look outside the root src/flow directory.
+
170 *
+
171 * @todo As of this writing the *exact* nature of where the project will permanently reside (and who will maintain it
+
172 * vs. use it) is in flux. Therefore for now I have removed the section covering certain topics and replaced it with
+
173 * the to-do you're reading. This should be undone when things settle down (obviously ensuring the brought-back section
+
174 * is made accurate). The topics to cover: `"@author"` (including contact info); GitHub/other address indicating where
+
175 * to browse the project source; link(s) to the latest auto-generated web docs (if any); a section on the
+
176 * history of the project; and licensing info (if deemed needed) or pointer to it. (Reminder: Also update any
+
177 * similar sections of the historically significant net_flow::Node doc header.)
+
178 *
+
179 * @todo Since Flow gained its first users beyond the original author, some Flow-adjacent code has been written from
+
180 * which Flow can benefit, including a potential `io` module/namespace for general networking/local I/O.
+
181 * (Flow itself continued to be developed, but some features were added
+
182 * elsewhere for expediency; this is a reminder to factor them out into Flow for the benefit of
+
183 * all.) Some features to migrate here might be: boost.asio extensions to UDP receive APIs to obtain receipt time
+
184 * stamps and destination IP (`recvmsg()` with ancillary data extensions) and to receive multiple datagrams in one
+
185 * call (`recvmmsg()`); boost.asio-adjacent facility to add custom socket options similarly to how boost.asio does it
+
186 * internally; boost.asio support for (local) transmission of native socket handles and security data over stream
+
187 * sockets (`SCM_RIGHTS`, etc.).
+
188 *
+
189 * Using Flow modules
+
190 * ------------------
+
191 *
+
192 * This section discusses usability topics that apply to all Flow modules including hopefully any future ones but
+
193 * definitely all existing ones as of this writing.
+
194 *
+
195 * ### Error reporting ###
+
196 * Similarly to boost.asio, all public methods that may return errors can either do so via an
+
197 * error code or an exception encapsulating that same error code. If user passes in non-null pointer to a
+
198 * flow::Error_code variable, the latter is set to success (falsy) or a specific failure (truthy `enum` value). If
+
199 * user passes in null pointer, an exception `exc` is thrown only in case of error and will encapsulate that error code
+
200 * (accessible via `exc.code()`).
+
201 *
+
202 * For details about error reporting, see doc headers for flow::Error_code (spoiler alert: a mere alias to
+
203 * `boost::system::error_code`) and `namespace` flow::error.
+
204 *
+
205 * ### Logging ###
+
206 * The flow::log namespace (see especially log::Logger and the various `FLOW_LOG_...*()` macros in
+
207 * log/log.hpp) provides a logging facility -- used by Flow modules' often-extensive logging, and equally available
+
208 * to the Flow user. Ultimately, you may tweak the log level and then observe the given Flow module's internal behavior
+
209 * to whatever level of detail you desire. Similarly, as the user, you may use this system for your own logging,
+
210 * even if you use no Flow module other than flow::log itself. Either way, you can hook up flow::log to log via your
+
211 * own log output device in arbitrary fashion (e.g., save the log messages in a database, if that's what you want).
+
212 *
+
213 * For details about logging, see doc header for `namespace` flow::log.
214 *
-
215 * There is a high standard of consistency and style, as well as documentation, in Flow. Before making changes to
-
216 * the code, you must read doc-coding_style.cpp.
-
217 *
-
218 * ### Source file tree organization ###
-
219 * See doc-coding_style.cpp which covers this topic.
-
220 *
-
221 * ### Libraries used; Boost ###
-
222 * We use STL and several Boost libraries (notably boost.asio) extensively.
-
223 * See doc-coding_style.cpp which covers this topic.
-
224 *
-
225 * ### Exceptions ###
-
226 * For reasons of speed (hearsay or reputational though they may be) we avoid exception-throwing
-
227 * boost.asio routines inside the modules' implementations, even though using them would make the code a bit simpler
-
228 * in many areas. Similarly, we avoid throwing our own exceptions only to catch them higher in the back-trace.
-
229 * In both cases, we typically use error codes/return values. These are not absolute/hard rules, as exceptions may be
-
230 * used where minuscule speed improvements are immaterial (like the initialization and shutdown of a long-lived object
-
231 * such as net_flow::Node).
-
232 *
-
233 * After a recent look at performance implications of exceptions, the following is the basic conclusion: Exceptions have
-
234 * no processor cycle cost, unless actually thrown, in which case the perf cost can be non-trivial. Since we consider
-
235 * internal performance of paramount importance, we generally avoid throwing exceptions -- only to catch them
-
236 * internally -- as noted in the preceding paragraph. Arguably such situations are rare anyway, so using an exception
-
237 * internally wouldn't actually slow anything down, but we haven't performed a code audit to verify that stipulation;
-
238 * and in the meantime the consistent avoidance of using internally caught exceptions has proved to be a very reasonable
-
239 * policy. (For some modules this may be arguably mostly moot: Consider flow::net_flow specifically: Since --
-
240 * internally -- mostly boost.asio `async_*()` methods are used, and those
-
241 * by definition report errors as codes passed into async handler functions; whether to use an exception or not is
-
242 * an ill-formed question in all such situations.) We recommend this practice continue, until there's a specific reason
-
243 * to reconsider.
-
244 *
-
245 * See doc-coding_style.cpp for more discussion of error handling and exceptions.
-
246 *
-
247 * Code style guidelines
-
248 * ---------------------
+
215 * @internal
+
216 *
+
217 * Implementation notes
+
218 * --------------------
+
219 *
+
220 * There is a high standard of consistency and style, as well as documentation, in Flow. Before making changes to
+
221 * the code, you must read doc-coding_style.cpp.
+
222 *
+
223 * ### Source file tree organization ###
+
224 * See doc-coding_style.cpp which covers this topic.
+
225 *
+
226 * ### Libraries used; Boost ###
+
227 * We use STL and several Boost libraries (notably boost.asio) extensively.
+
228 * See doc-coding_style.cpp which covers this topic.
+
229 *
+
230 * ### Exceptions ###
+
231 * For reasons of speed (hearsay or reputational though they may be) we avoid exception-throwing
+
232 * boost.asio routines inside the modules' implementations, even though using them would make the code a bit simpler
+
233 * in many areas. Similarly, we avoid throwing our own exceptions only to catch them higher in the back-trace.
+
234 * In both cases, we typically use error codes/return values. These are not absolute/hard rules, as exceptions may be
+
235 * used where minuscule speed improvements are immaterial (like the initialization and shutdown of a long-lived object
+
236 * such as net_flow::Node).
+
237 *
+
238 * After a recent look at performance implications of exceptions, the following is the basic conclusion: Exceptions have
+
239 * no processor cycle cost, unless actually thrown, in which case the perf cost can be non-trivial. Since we consider
+
240 * internal performance of paramount importance, we generally avoid throwing exceptions -- only to catch them
+
241 * internally -- as noted in the preceding paragraph. Arguably such situations are rare anyway, so using an exception
+
242 * internally wouldn't actually slow anything down, but we haven't performed a code audit to verify that stipulation;
+
243 * and in the meantime the consistent avoidance of using internally caught exceptions has proved to be a very reasonable
+
244 * policy. (For some modules this may be arguably mostly moot: Consider flow::net_flow specifically: Since --
+
245 * internally -- mostly boost.asio `async_*()` methods are used, and those
+
246 * by definition report errors as codes passed into async handler functions; whether to use an exception or not is
+
247 * an ill-formed question in all such situations.) We recommend this practice continue, until there's a specific reason
+
248 * to reconsider.
249 *
-
250 * ### General coding style requirements ###
-
251 * The formal guidelines are in doc-coding_style.cpp; read that file please.
-
252 *
-
253 * ### Documentation guidelines ###
-
254 * The standard for documentation of Flow modules is that someone reading the source code, and nothing else, would
-
255 * be able to understand that code (modulo having the intellectual sophistication/experience w/r/t the subject
-
256 * matter, of course). Simple but quite a task given how much code there is and the complexity. We also
-
257 * produce Doxygen output (2 web pages, as of this writing) by running the code through Doxygen.
-
258 *
-
259 * @see More on the technicalities of how we run Doxygen, and the philosophy behind all of that, can be found
-
260 * in a `doc/` or similar directory outside src/flow. It's rare something pertinent to the source code
-
261 * is not IN the source code (i.e., right here somewhere), but the README explains why that rare choice is
-
262 * made (among many more practical/interesting things). This is worth reading if you'll be contributing to the
-
263 * code.
-
264 *
-
265 * The actual guidelines are, as above, in doc-coding_style.cpp; read that file please.
-
266 *
-
267 * @todo Possibly document exceptions thrown explicitly via the Doxygen keyword meant for this purpose: `"@throws"`.
-
268 * Currently when we document explicitly throwing an exception, it is ALWAYS a flow::error::Runtime_error
-
269 * encapsulating a flow::Error_code (which is an `int`-like error code). This is very explicitly documented,
-
270 * but technically Doxygen has a keyword which will generate a special little readout for the exception
-
271 * (similarly as for each parameter, etc.). We don't use that keyword. We probably should, though this
-
272 * isn't totally cut-and-dried. Consider that we already document the exception on the `err_code` parameter
-
273 * in every case; so no information would really be gained (only arguably nicer formatting). On the other hand,
-
274 * the code would be somewhat more verbose (and boiler-platey, since each already boiler-platey `err_code`
-
275 * comment snippet would essentially grow in size). Furthermore, if we document this explicit exception, one might
-
276 * say it behooves us to now document all the other possible sources of exceptions such as `std::bad_alloc` when
-
277 * running out of heap memory. Perhaps then we have to talk about constructor-throwing-exception behavior and
-
278 * other C++ technicalities to do with exceptions. Do we really want to enter that land? I think maybe not;
-
279 * consider just leaving it alone. Though, maybe I'm over-dramatizing the impact of adding a `"@throws"`
-
280 * section on our various flow::error::Runtime_error-throwing methods. Well, it's a to-do; decide later.
-
281 *
-
282 * To-dos and future features
-
283 * --------------------------
-
284 *
-
285 * @todo The comments (as of this writing, all written by me, ygoldfel) in this library could use an edit to make
-
286 * them briefer. (I've found even a self-edit by me, with that express purpose, often does wonders.) Background:
-
287 * I write very extensive comments. I am quite convinced this is superior (far superior even) to next-to-no comments;
-
288 * and to the average amount of comments one tends to see in production code. *That said*, the top code review
-
289 * feedback I receive (not here specifically but in general) is that my comments tend to be too "discursive" (consisting
-
290 * of discourse) and/or at times unnecessarily in-depth. Discursive = as if I am talking to the reader (many prefer
-
291 * a terser, more formal style). Too in-depth = tends to go into history, related issues, future work, etc.
-
292 * (these elements can remain but can be cut down significant without losing much substance).
-
293 * In other words, there should be a happy middle in terms of comment volume, and this can
-
294 * be achieved by a comment edit run by Yuri or someone else (if reviewed by Yuri). To be clear, I believe this middle
-
295 * ground is to be closer to the status quo than to the average amount of comments in other projects.
-
296 *
-
297 * @todo Be more specific (cite date) when writing "as of this writing."
-
298 * I use a rhetorical trick when commenting the state of something that may not continue to be the case.
-
299 * Though I do avoid writing such things, often it is necessary; in that case I usually write "as of this writing" or
-
300 * something very similarly worded. That's fine and essentially the best one can do. It means technically the
-
301 * statement won't become false, even if the "sub-statement" (the thing that was true when written) does become false.
-
302 * However, obviously, to the reader of the comment at that later time, that's little consolation: they're still reading
-
303 * a possibly false statement and will want to know what the situation is THEN, or "as of the reading," to to speak.
-
304 * In order to at least try to be helpful, in those cases a date (numeric month/year -- like 4/2017 -- should be
-
305 * sufficient in most cases) should be supplied. The to-do is to convert all "as of this writing" instances -- and
-
306 * to always add a date when writing new instances of "as of this writing." The to-do can be removed once the
-
307 * conversion is completed. Example: this to-do has not been completed as of this writing (11/2017).
-
308 * (Side note: possibly goes without saying, but one is free to explain to an arbitrary degree of detail why something
-
309 * is true as of that writing, and how/why/when it might change. This to-do covers those cases where no such
-
310 * explanation is written. It would be impractically verbose to get into speculative detail for every
-
311 * as-of-this-writing instance; so at least a date should thus be inserted.)
-
312 *
-
313 * @todo There are some boost.thread "interruption points" throughout the code, so we should
-
314 * investigate whether we must catch `boost::thread_interrupted` in those spots, or what...?
-
315 *
-
316 * @todo Inline things: Or just use `gcc -O3` (and non-`gcc` equivalents) for prettier/faster-to-compile
-
317 * code? The latter is definitely tempting if it works sufficiently well. So far we've been using
-
318 * `gcc -O3` and equivalents, and it seems to be working well (turning off inlining results in huge
-
319 * performance losses). Still, I am not sure if it would be better to explicitly `inline` functions
-
320 * instead. Not having to do so definitely simplifies the code, so it is my great hope that the answer is
-
321 * no, and we can keep using `gcc -O3` and equivalents. In that case delete this paragraph.
-
322 * (To be clear: `gcc -O3` means that it ignores `inline` keyword and anything similar, including inlined
-
323 * method bodies inside `class {}` and `struct {}`. Instead it determines what to inline based on its own
-
324 * ideas on what will generate the fastest code (with reasonable code size). `gcc -O2`, on the other
-
325 * hand, will mostly inline things explicitly declared as such in code (again, via `inline` or inlining inside
-
326 * class bodies or other techniques).) Update: Now using clang (not gcc) with maximum auto-inlining AND FLTO
-
327 * (link-time optimization will allow inlining across object file boundaries) in at least some platforms.
-
328 * This should be close to as good as possible. Update: gcc auto-inlining+FLTO also works.
-
329 *
-
330 * @todo One space after period, not two:
-
331 * For some reason in this project I've been following the convention -- in comments and (I think) log
-
332 * messages -- of two spaces after a sentence-ending punctuator (usually period) before the next sentence's
-
333 * first character. I now regret trying this annoying convention. Go back to one space. (For the record,
-
334 * it does look sort of nice, but that's a matter of opinion, and single space looks fine too... AND doesn't
-
335 * confuse various editors' auto-formatting facilityies, among other problem.)
-
336 *
-
337 * @todo We use `0` instead of `NULL` or `nullptr` when needing a null pointer; perhaps we should use the latter.
-
338 * `NULL` is an anachronism from C, so we shouldn't use it. `nullptr` is at least no worse than `0`,
-
339 * however, other than being less concise. However, the main reason it exists --
-
340 * to avoid ambiguities in function overloading (e.g., when something could
-
341 * take either an `int` or a `char*`, `nullptr` would resolve to the latter, while `0` probably unintentionally
-
342 * to the former) -- is not a situation our style ever invokes, to my knowledge, so using `nullptr` would not
-
343 * solve any actual problems. However, it could be argued that using it more readily calls attention to the use
-
344 * of a pointer, as opposed to an integer, in the particular context at play. So it's something to consider
-
345 * (but, no doubt, the conversion process would be laborious, as there's no simple search-replace that would
-
346 * work).
-
347 *
-
348 * @todo `= default` for copy constructors and copy operators is now used in a few places; consider spreading
-
349 * this C++11 feature everywhere it's being done implicitly due to C++03 rules (good documentation practices suggest
-
350 * declaring them explicitly but of course leave the implementation to the compiler default, gaining best of both
-
351 * worlds -- proper class API docs yet maintenance-friendly default body).
+
250 * See doc-coding_style.cpp for more discussion of error handling and exceptions.
+
251 *
+
252 * Code style guidelines
+
253 * ---------------------
+
254 *
+
255 * ### General coding style requirements ###
+
256 * The formal guidelines are in doc-coding_style.cpp; read that file please.
+
257 *
+
258 * ### Documentation guidelines ###
+
259 * The standard for documentation of Flow modules is that someone reading the source code, and nothing else, would
+
260 * be able to understand that code (modulo having the intellectual sophistication/experience w/r/t the subject
+
261 * matter, of course). Simple but quite a task given how much code there is and the complexity. We also
+
262 * produce Doxygen output (2 web pages, as of this writing) by running the code through Doxygen.
+
263 *
+
264 * @see More on the technicalities of how we run Doxygen, and the philosophy behind all of that, can be found
+
265 * in a `doc/` or similar directory outside src/flow. It's rare something pertinent to the source code
+
266 * is not IN the source code (i.e., right here somewhere), but the README explains why that rare choice is
+
267 * made (among many more practical/interesting things). This is worth reading if you'll be contributing to the
+
268 * code.
+
269 *
+
270 * The actual guidelines are, as above, in doc-coding_style.cpp; read that file please.
+
271 *
+
272 * @todo Possibly document exceptions thrown explicitly via the Doxygen keyword meant for this purpose: `"@throws"`.
+
273 * Currently when we document explicitly throwing an exception, it is ALWAYS a flow::error::Runtime_error
+
274 * encapsulating a flow::Error_code (which is an `int`-like error code). This is very explicitly documented,
+
275 * but technically Doxygen has a keyword which will generate a special little readout for the exception
+
276 * (similarly as for each parameter, etc.). We don't use that keyword. We probably should, though this
+
277 * isn't totally cut-and-dried. Consider that we already document the exception on the `err_code` parameter
+
278 * in every case; so no information would really be gained (only arguably nicer formatting). On the other hand,
+
279 * the code would be somewhat more verbose (and boiler-platey, since each already boiler-platey `err_code`
+
280 * comment snippet would essentially grow in size). Furthermore, if we document this explicit exception, one might
+
281 * say it behooves us to now document all the other possible sources of exceptions such as `std::bad_alloc` when
+
282 * running out of heap memory. Perhaps then we have to talk about constructor-throwing-exception behavior and
+
283 * other C++ technicalities to do with exceptions. Do we really want to enter that land? I think maybe not;
+
284 * consider just leaving it alone. Though, maybe I'm over-dramatizing the impact of adding a `"@throws"`
+
285 * section on our various flow::error::Runtime_error-throwing methods. Well, it's a to-do; decide later.
+
286 *
+
287 * To-dos and future features
+
288 * --------------------------
+
289 *
+
290 * @todo The comments (as of this writing, all written by me, ygoldfel) in this library could use an edit to make
+
291 * them briefer. (I've found even a self-edit by me, with that express purpose, often does wonders.) Background:
+
292 * I write very extensive comments. I am quite convinced this is superior (far superior even) to next-to-no comments;
+
293 * and to the average amount of comments one tends to see in production code. *That said*, the top code review
+
294 * feedback I receive (not here specifically but in general) is that my comments tend to be too "discursive" (consisting
+
295 * of discourse) and/or at times unnecessarily in-depth. Discursive = as if I am talking to the reader (many prefer
+
296 * a terser, more formal style). Too in-depth = tends to go into history, related issues, future work, etc.
+
297 * (these elements can remain but can be cut down significant without losing much substance).
+
298 * In other words, there should be a happy middle in terms of comment volume, and this can
+
299 * be achieved by a comment edit run by Yuri or someone else (if reviewed by Yuri). To be clear, I believe this middle
+
300 * ground is to be closer to the status quo than to the average amount of comments in other projects.
+
301 *
+
302 * @todo Be more specific (cite date) when writing "as of this writing."
+
303 * I use a rhetorical trick when commenting the state of something that may not continue to be the case.
+
304 * Though I do avoid writing such things, often it is necessary; in that case I usually write "as of this writing" or
+
305 * something very similarly worded. That's fine and essentially the best one can do. It means technically the
+
306 * statement won't become false, even if the "sub-statement" (the thing that was true when written) does become false.
+
307 * However, obviously, to the reader of the comment at that later time, that's little consolation: they're still reading
+
308 * a possibly false statement and will want to know what the situation is THEN, or "as of the reading," to to speak.
+
309 * In order to at least try to be helpful, in those cases a date (numeric month/year -- like 4/2017 -- should be
+
310 * sufficient in most cases) should be supplied. The to-do is to convert all "as of this writing" instances -- and
+
311 * to always add a date when writing new instances of "as of this writing." The to-do can be removed once the
+
312 * conversion is completed. Example: this to-do has not been completed as of this writing (11/2017).
+
313 * (Side note: possibly goes without saying, but one is free to explain to an arbitrary degree of detail why something
+
314 * is true as of that writing, and how/why/when it might change. This to-do covers those cases where no such
+
315 * explanation is written. It would be impractically verbose to get into speculative detail for every
+
316 * as-of-this-writing instance; so at least a date should thus be inserted.)
+
317 *
+
318 * @todo There are some boost.thread "interruption points" throughout the code, so we should
+
319 * investigate whether we must catch `boost::thread_interrupted` in those spots, or what...?
+
320 *
+
321 * @todo Inline things: Or just use `gcc -O3` (and non-`gcc` equivalents) for prettier/faster-to-compile
+
322 * code? The latter is definitely tempting if it works sufficiently well. So far we've been using
+
323 * `gcc -O3` and equivalents, and it seems to be working well (turning off inlining results in huge
+
324 * performance losses). Still, I am not sure if it would be better to explicitly `inline` functions
+
325 * instead. Not having to do so definitely simplifies the code, so it is my great hope that the answer is
+
326 * no, and we can keep using `gcc -O3` and equivalents. In that case delete this paragraph.
+
327 * (To be clear: `gcc -O3` means that it ignores `inline` keyword and anything similar, including inlined
+
328 * method bodies inside `class {}` and `struct {}`. Instead it determines what to inline based on its own
+
329 * ideas on what will generate the fastest code (with reasonable code size). `gcc -O2`, on the other
+
330 * hand, will mostly inline things explicitly declared as such in code (again, via `inline` or inlining inside
+
331 * class bodies or other techniques).) Update: Now using clang (not gcc) with maximum auto-inlining AND FLTO
+
332 * (link-time optimization will allow inlining across object file boundaries) in at least some platforms.
+
333 * This should be close to as good as possible. Update: gcc auto-inlining+FLTO also works.
+
334 *
+
335 * @todo One space after period, not two:
+
336 * For some reason in this project I've been following the convention -- in comments and (I think) log
+
337 * messages -- of two spaces after a sentence-ending punctuator (usually period) before the next sentence's
+
338 * first character. I now regret trying this annoying convention. Go back to one space. (For the record,
+
339 * it does look sort of nice, but that's a matter of opinion, and single space looks fine too... AND doesn't
+
340 * confuse various editors' auto-formatting facilityies, among other problem.)
+
341 *
+
342 * @todo We use `0` instead of `NULL` or `nullptr` when needing a null pointer; perhaps we should use the latter.
+
343 * `NULL` is an anachronism from C, so we shouldn't use it. `nullptr` is at least no worse than `0`,
+
344 * however, other than being less concise. However, the main reason it exists --
+
345 * to avoid ambiguities in function overloading (e.g., when something could
+
346 * take either an `int` or a `char*`, `nullptr` would resolve to the latter, while `0` probably unintentionally
+
347 * to the former) -- is not a situation our style ever invokes, to my knowledge, so using `nullptr` would not
+
348 * solve any actual problems. However, it could be argued that using it more readily calls attention to the use
+
349 * of a pointer, as opposed to an integer, in the particular context at play. So it's something to consider
+
350 * (but, no doubt, the conversion process would be laborious, as there's no simple search-replace that would
+
351 * work).
352 *
-
353 * @todo Consider PIMPL and related topics. Recommend scouring Boost docs, particularly for the smart pointer library,
-
354 * which discuss how to potentially use smart pointers for easy PIMPLing. In general, research the state of the art
-
355 * on the topic of library interface vs. implementation/hiding.
-
356 *
-
357 * @todo `std::string_view` is a way to pass things around similarly to `const std::string&` without requiring
-
358 * that a `string` be created just for that purpose; it has a highly similar API but can be constructed from any
-
359 * character sequence in memory and internally stores nothing more than a pointer and length; we should use it wherever
-
360 * possible (within reason) instead of `const std::string&`. Much code now uses `String_view`; the remaining to-do
-
361 * is: scour the rest of the code for possible `const string&`s to convert and indeed convert those to
-
362 * util::String_view.
-
363 *
-
364 * @todo Return-by-copy binary operators of the form `T operatorBLAH(const T& x1, const Some_type& x2)` should be
-
365 * written as free functions instead of `T` members. I don't recall at this point why, but this tends to be recommended
-
366 * and done in STL and Boost. Maybe check the Meyer Effective C++ book on the theory; and if it makes sense find all
-
367 * such operators written as members and change them to be free functions. Should this be avoided if it requires
-
368 * `friend` though? Lastly, for Doxygen, use the `relatesalso T` command to link the free function to the class `T`
-
369 * in the documentation.
-
370 *
-
371 * @todo In many (most) cases we pass `shared_ptr`s (and their aliases) by value when it would be more performant to
-
372 * do so by `const` reference; at times possibly better to pass by raw pointer. Scott Meyer/Herb Sutter have opined
-
373 * on this to basically indicate that (1) it is often best to use a raw pointer, unless actual copying/ownership status
-
374 * is expected; but failing that (2) it is often best to use a `const&` when safe; and failing that passing by
-
375 * value is fine. This need not be a dogmatic change, but we should be more mindful than simply always passing by
-
376 * value. When searching for instances to potentially change, check for `shared_ptr`, `Ptr`, and `_ptr` tokens.
-
377 */
-
378namespace flow
-
379{
-
380
-
381// Types. They're outside of `namespace ::flow::util` for brevity due to their frequent use.
-
382
-
383// Integer short-hands and specific-bit-width types.
-
384
-
385/// Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
-
386using uint8_t = unsigned char;
-
387/// Signed byte. Prefer to use `uint8_t` when representing binary data. This is 8 bits on all modern systems.
-
388using int8_t = signed char;
-
389
-
390// Time-related short-hands.
-
391
-
392/**
-
393 * Clock used for delicate time measurements, such that the `now()` method gets the current time
-
394 * relative to some unknown but constant epoch (reference point). Used to measure durations of
-
395 * things. It has the following properties:
-
396 *
-
397 * - Steady: time cannot go backwards (e.g., via user time change, NTP); time values increment at
-
398 * a rate proportional to real time (no leap seconds for example).
-
399 * - High-resolution: the increments of time at which the clock runs are as small as supported
-
400 * by the OS+hardware. This should be at most a handful of microseconds in practice.
+
353 * @todo `= default` for copy constructors and copy operators is now used in a few places; consider spreading
+
354 * this C++11 feature everywhere it's being done implicitly due to C++03 rules (good documentation practices suggest
+
355 * declaring them explicitly but of course leave the implementation to the compiler default, gaining best of both
+
356 * worlds -- proper class API docs yet maintenance-friendly default body).
+
357 *
+
358 * @todo Consider PIMPL and related topics. Recommend scouring Boost docs, particularly for the smart pointer library,
+
359 * which discuss how to potentially use smart pointers for easy PIMPLing. In general, research the state of the art
+
360 * on the topic of library interface vs. implementation/hiding.
+
361 *
+
362 * @todo `std::string_view` is a way to pass things around similarly to `const std::string&` without requiring
+
363 * that a `string` be created just for that purpose; it has a highly similar API but can be constructed from any
+
364 * character sequence in memory and internally stores nothing more than a pointer and length; we should use it wherever
+
365 * possible (within reason) instead of `const std::string&`. Much code now uses `String_view`; the remaining to-do
+
366 * is: scour the rest of the code for possible `const string&`s to convert and indeed convert those to
+
367 * util::String_view.
+
368 *
+
369 * @todo Return-by-copy binary operators of the form `T operatorBLAH(const T& x1, const Some_type& x2)` should be
+
370 * written as free functions instead of `T` members. I don't recall at this point why, but this tends to be recommended
+
371 * and done in STL and Boost. Maybe check the Meyer Effective C++ book on the theory; and if it makes sense find all
+
372 * such operators written as members and change them to be free functions. Should this be avoided if it requires
+
373 * `friend` though? Lastly, for Doxygen, use the `relatesalso T` command to link the free function to the class `T`
+
374 * in the documentation.
+
375 *
+
376 * @todo In many (most) cases we pass `shared_ptr`s (and their aliases) by value when it would be more performant to
+
377 * do so by `const` reference; at times possibly better to pass by raw pointer. Scott Meyer/Herb Sutter have opined
+
378 * on this to basically indicate that (1) it is often best to use a raw pointer, unless actual copying/ownership status
+
379 * is expected; but failing that (2) it is often best to use a `const&` when safe; and failing that passing by
+
380 * value is fine. This need not be a dogmatic change, but we should be more mindful than simply always passing by
+
381 * value. When searching for instances to potentially change, check for `shared_ptr`, `Ptr`, and `_ptr` tokens.
+
382 */
+
383namespace flow
+
384{
+
385
+
386// Types. They're outside of `namespace ::flow::util` for brevity due to their frequent use.
+
387
+
388// Integer short-hands and specific-bit-width types.
+
389
+
390/// Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
+
391using uint8_t = unsigned char;
+
392/// Signed byte. Prefer to use `uint8_t` when representing binary data. This is 8 bits on all modern systems.
+
393using int8_t = signed char;
+
394
+
395// Time-related short-hands.
+
396
+
397/**
+
398 * Clock used for delicate time measurements, such that the `now()` method gets the current time
+
399 * relative to some unknown but constant epoch (reference point). Used to measure durations of
+
400 * things. It has the following properties:
401 *
-
402 * So basically it's a precise clock with no surprises (which is more than can be said for stuff people
-
403 * tend to be forced to use, like `gettimeofday()`).
-
404 */
-
405using Fine_clock = boost::chrono::high_resolution_clock;
-
406
-
407/// A high-res time point as returned by `Fine_clock::now()` and suitable for precise time math in general.
-
408using Fine_time_pt = Fine_clock::time_point;
-
409
-
410/// A high-res time duration as computed from two `Fine_time_pt`s.
-
411using Fine_duration = Fine_clock::duration;
-
412
-
413/**
-
414 * Short-hand for a boost.system error code (which basically encapsulates an integer/`enum` error
-
415 * code and a pointer through which to obtain a statically stored message string); this is how Flow modules
-
416 * report errors to the user; and we humbly recommended all C++ code use the same techniques.
-
417 *
-
418 * @note It is not inside flow::error namespace due to its (`Error_code`'s) ubiquity.
-
419 * Very few other symbols should follow suit. We may decide to move it there after all.
-
420 *
-
421 * ### Basic error-emitting API semantics ###
+
402 * - Steady: time cannot go backwards (e.g., via user time change, NTP); time values increment at
+
403 * a rate proportional to real time (no leap seconds for example).
+
404 * - High-resolution: the increments of time at which the clock runs are as small as supported
+
405 * by the OS+hardware. This should be at most a handful of microseconds in practice.
+
406 *
+
407 * So basically it's a precise clock with no surprises (which is more than can be said for stuff people
+
408 * tend to be forced to use, like `gettimeofday()`).
+
409 */
+
410using Fine_clock = boost::chrono::high_resolution_clock;
+
411
+
412/// A high-res time point as returned by `Fine_clock::now()` and suitable for precise time math in general.
+
413using Fine_time_pt = Fine_clock::time_point;
+
414
+
415/// A high-res time duration as computed from two `Fine_time_pt`s.
+
416using Fine_duration = Fine_clock::duration;
+
417
+
418/**
+
419 * Short-hand for a boost.system error code (which basically encapsulates an integer/`enum` error
+
420 * code and a pointer through which to obtain a statically stored message string); this is how Flow modules
+
421 * report errors to the user; and we humbly recommended all C++ code use the same techniques.
422 *
-
423 * All error-reporting Flow APIs follow the following pattern of error reporting semantics.
-
424 * Each API looks something like:
+
423 * @note It is not inside flow::error namespace due to its (`Error_code`'s) ubiquity.
+
424 * Very few other symbols should follow suit. We may decide to move it there after all.
425 *
-
426 * ~~~
-
427 * return_type Some_class::some_op(..., flow::Error_code* err_code)
-
428 * ~~~
-
429 *
-
430 * Then, there are two possibilities. If you pass in non-null `err_code`, then after return `*err_code` is
-
431 * success (falsy) or a truthy `enum`-like value, representing a specific error. If, instead, you pass in null,
-
432 * then a flow::error::Runtime_error() `exc` is thrown if and only if `*err_code` would have been set to truthy value
-
433 * `e_c` had a non-null `err_code` been passed in. If such an exception is thrown, `Error_code e_c` is
-
434 * encapsulated in exception object `exc`. If and only if no exception is thrown, there was no error (`*err_code` would
-
435 * have been falsy).
-
436 *
-
437 * Thus, you get the best of both worlds: you can get the simplicity and performance
-
438 * of an error code; or the various features of an exception (including access to the error code via
-
439 * `exc.code()` if desired), with the same API signature. (boost.asio
-
440 * follows a similar concept, though it requires two API signatures for each operation, one without
-
441 * an `Error_code` argument, and one with non-`const` `Error_code&` out-arg. The above convention is more compact;
-
442 * plus we provide certain tools to reduce boiler-plate in connection with this.)
-
443 *
-
444 * ### Intro to `Error_code`, a/k/a boost.system `error_code` ###
-
445 * (I am restating boost.system documentation here, but that particular set of docs is notoriously
-
446 * formal-but-reader-unfriendly.)
-
447 *
-
448 * A truthy `Error_code` is a very lightweight -- `errno`-like in that regard -- value indicating
-
449 * the error that occurred. It stores an `int` code and a "category" pointer (basically, thing specifying to what code
-
450 * set this belongs). The `int` is to be converted from the error code set of choice, whereas the category pointer is
-
451 * internally magically determined based on the type of the error code value being converted to `Error_code`.
+
426 * ### Basic error-emitting API semantics ###
+
427 *
+
428 * All error-reporting Flow APIs follow the following pattern of error reporting semantics.
+
429 * Each API looks something like:
+
430 *
+
431 * ~~~
+
432 * return_type Some_class::some_op(..., flow::Error_code* err_code)
+
433 * ~~~
+
434 *
+
435 * Then, there are two possibilities. If you pass in non-null `err_code`, then after return `*err_code` is
+
436 * success (falsy) or a truthy `enum`-like value, representing a specific error. If, instead, you pass in null,
+
437 * then a flow::error::Runtime_error() `exc` is thrown if and only if `*err_code` would have been set to truthy value
+
438 * `e_c` had a non-null `err_code` been passed in. If such an exception is thrown, `Error_code e_c` is
+
439 * encapsulated in exception object `exc`. If and only if no exception is thrown, there was no error (`*err_code` would
+
440 * have been falsy).
+
441 *
+
442 * Thus, you get the best of both worlds: you can get the simplicity and performance
+
443 * of an error code; or the various features of an exception (including access to the error code via
+
444 * `exc.code()` if desired), with the same API signature. (boost.asio
+
445 * follows a similar concept, though it requires two API signatures for each operation, one without
+
446 * an `Error_code` argument, and one with non-`const` `Error_code&` out-arg. The above convention is more compact;
+
447 * plus we provide certain tools to reduce boiler-plate in connection with this.)
+
448 *
+
449 * ### Intro to `Error_code`, a/k/a boost.system `error_code` ###
+
450 * (I am restating boost.system documentation here, but that particular set of docs is notoriously
+
451 * formal-but-reader-unfriendly.)
452 *
-
453 * An `Error_code` itself can be serialized into `ostream`s (and thus `string`s via `lexical_cast`, etc.) easily for
-
454 * logging purposes/etc. You can access both the numeric code and a human explanation of the error.
-
455 * Any and all error code sets are supported by this boost.system type. POSIX `errno`s are one possible set of codes;
-
456 * boost.asio has its own code set; and other modules in `flow` may introduce their own code sets. All are compatible
-
457 * for equality/assignment/etc. with this general `Error_code` type.
-
458 *
-
459 * As stated, all error-emitting Flow public APIs (regardless of module) use the above-described error-reporting
-
460 * conventions. In addition, we humbly recommend Flow *user* code adopt the same battle-tested conventions. However
-
461 * that is absolutely not required and is entirely independent of the fact that Flow modules use them. Do note this
-
462 * convention is battle-tested in boost.asio as well; though Flow's version is more compact; by using a pointer (which
-
463 * can be null) instead of a reference it cuts the number of error-emitting API functions in half.
-
464 *
-
465 * For each function (including each publicly exported error-reporting function within Flow) that indeed agrees to
-
466 * use the above convention, follow these instructions:
-
467 *
-
468 * To reduce boiler-plate, within reason, it is incumbent on each error-reporting method to use the following
-
469 * technique:
-
470 *
-
471 * - The method signature should be similar to the above (including naming it `err_code`) and use the above semantics.
-
472 * - Use FLOW_ERROR_EXEC_AND_THROW_ON_ERROR() (and/or nearby similar utilities in flow/error/error.hpp) for minimal
-
473 * boiler-plate that implements these semantics. See doc header for that macro for details.
-
474 * - You may or may not indicate the lack or presence of an error condition via some additional non-exception technique
-
475 * such as a `bool` return value.
-
476 * - The error behavior documentation should be *confined entirely* to the documentation of `err_code` parameter, so
-
477 * that the above semantics need not be repetitively restated a million times.
-
478 * The text of the parameter's doc should usually be as follows (you may copy/paste to start). In this example
-
479 * the function returns codes from the `net_flow::error::Code` code set `enum`; but please substitute your code set of
-
480 * choice (again; `errno` and boost.asio error codes are 2 possible other examples of code sets). Here we go:
-
481 *
-
482 * ~~~
-
483 * // param err_code
-
484 * // See flow::Error_code docs for error reporting semantics. net_flow::error::Code generated:
-
485 * // net_flow::error::Code::S_(...) (optional comment), ...more... , net_flow::error::Code::S_(...)
-
486 * // (optional comment).
+
453 * A truthy `Error_code` is a very lightweight -- `errno`-like in that regard -- value indicating
+
454 * the error that occurred. It stores an `int` code and a "category" pointer (basically, thing specifying to what code
+
455 * set this belongs). The `int` is to be converted from the error code set of choice, whereas the category pointer is
+
456 * internally magically determined based on the type of the error code value being converted to `Error_code`.
+
457 *
+
458 * An `Error_code` itself can be serialized into `ostream`s (and thus `string`s via `lexical_cast`, etc.) easily for
+
459 * logging purposes/etc. You can access both the numeric code and a human explanation of the error.
+
460 * Any and all error code sets are supported by this boost.system type. POSIX `errno`s are one possible set of codes;
+
461 * boost.asio has its own code set; and other modules in `flow` may introduce their own code sets. All are compatible
+
462 * for equality/assignment/etc. with this general `Error_code` type.
+
463 *
+
464 * As stated, all error-emitting Flow public APIs (regardless of module) use the above-described error-reporting
+
465 * conventions. In addition, we humbly recommend Flow *user* code adopt the same battle-tested conventions. However
+
466 * that is absolutely not required and is entirely independent of the fact that Flow modules use them. Do note this
+
467 * convention is battle-tested in boost.asio as well; though Flow's version is more compact; by using a pointer (which
+
468 * can be null) instead of a reference it cuts the number of error-emitting API functions in half.
+
469 *
+
470 * For each function (including each publicly exported error-reporting function within Flow) that indeed agrees to
+
471 * use the above convention, follow these instructions:
+
472 *
+
473 * To reduce boiler-plate, within reason, it is incumbent on each error-reporting method to use the following
+
474 * technique:
+
475 *
+
476 * - The method signature should be similar to the above (including naming it `err_code`) and use the above semantics.
+
477 * - Use FLOW_ERROR_EXEC_AND_THROW_ON_ERROR() (and/or nearby similar utilities in flow/error/error.hpp) for minimal
+
478 * boiler-plate that implements these semantics. See doc header for that macro for details.
+
479 * - You may or may not indicate the lack or presence of an error condition via some additional non-exception technique
+
480 * such as a `bool` return value.
+
481 * - The error behavior documentation should be *confined entirely* to the documentation of `err_code` parameter, so
+
482 * that the above semantics need not be repetitively restated a million times.
+
483 * The text of the parameter's doc should usually be as follows (you may copy/paste to start). In this example
+
484 * the function returns codes from the `net_flow::error::Code` code set `enum`; but please substitute your code set of
+
485 * choice (again; `errno` and boost.asio error codes are 2 possible other examples of code sets). Here we go:
+
486 *
487 * ~~~
-
488 *
-
489 * @see The doc header (and code inside) `namespace` flow::net_flow::error is a good primer showing how to create
-
490 * an `Error_code`-compatible set of error codes. This is easier to understand than boost.asio's counterpart
-
491 * for example.
-
492 *
-
493 * @note boost.system at some point -- I (ygoldfel) am fairly sure after I designed the above ages ago -- introduced
-
494 * an alternate idiom for passing an #Error_code out-arg that is to be ignored in favor of throwing an exception
-
495 * if omitted. We use the idiom: `Error_code*` out-arg, throw if null. They, instead propose:
-
496 * `Error_code&` out-arg, throw if it equals `boost::system::throws()`. That's great, too, but actually our
-
497 * idiom hews to another bit of the Flow coding style/guide, wherein out-args should be pointers, not
-
498 * non-`const` references -- and is otherwise very similar. So it's fine. Note that their idiom vs. ours =
-
499 * orthogonal to the main difficulty which is the boiler-plate associated with actually throwing vs. non-throwing;
-
500 * this would be required regardless of the API idiom chosen. The above (involving
-
501 * FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(), etc.) is really the main crux of it.
-
502 */
-
503using Error_code = boost::system::error_code;
-
504
-
505// See just below.
-
506template<typename Signature>
- -
508
-
509/**
-
510 * Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used
-
511 * instead of `std::function` or `boost::function`. Due to ubiquitous use of such function-object wrappers,
-
512 * this is one of the very few direct non-`namespace` members of the outer namespace `::flow`.
-
513 *
-
514 * In reality it *is* `std::function`, with a couple of added APIs (no data) to make it more similar to
-
515 * `boost::function` API-wise.
-
516 *
-
517 * ### Rationale ###
-
518 * By far the main reason this exists is: I (ygoldfel) conducted an investigation in 2022, with a not-too-old gcc
-
519 * in Linux, in C++17 mode, with Boost 1.78 (but built seemingly in C++03-supporting config) about the
-
520 * performance behavior of lambdas objects and `boost::function<>` and `std::function<>` wrappers thereof.
-
521 * I noticed these things:
-
522 * - Say one constructs a `boost::function` from a lambda that has 1 or more by-value captures `[x = std::move(x)]`,
-
523 * with those captures' types having move ctors different and faster than copy ctors. I found that this not only
-
524 * *copies* each of those captures (invokes their copy ctors), but it even does so several times!
-
525 * - However, constructing an `std::function` identically never invokes copy ctors -- only move ctors --
-
526 * and fewer times at that.
+
488 * // param err_code
+
489 * // See flow::Error_code docs for error reporting semantics. net_flow::error::Code generated:
+
490 * // net_flow::error::Code::S_(...) (optional comment), ...more... , net_flow::error::Code::S_(...)
+
491 * // (optional comment).
+
492 * ~~~
+
493 *
+
494 * @see The doc header (and code inside) `namespace` flow::net_flow::error is a good primer showing how to create
+
495 * an `Error_code`-compatible set of error codes. This is easier to understand than boost.asio's counterpart
+
496 * for example.
+
497 *
+
498 * @note boost.system at some point -- I (ygoldfel) am fairly sure after I designed the above ages ago -- introduced
+
499 * an alternate idiom for passing an #Error_code out-arg that is to be ignored in favor of throwing an exception
+
500 * if omitted. We use the idiom: `Error_code*` out-arg, throw if null. They, instead propose:
+
501 * `Error_code&` out-arg, throw if it equals `boost::system::throws()`. That's great, too, but actually our
+
502 * idiom hews to another bit of the Flow coding style/guide, wherein out-args should be pointers, not
+
503 * non-`const` references -- and is otherwise very similar. So it's fine. Note that their idiom vs. ours =
+
504 * orthogonal to the main difficulty which is the boiler-plate associated with actually throwing vs. non-throwing;
+
505 * this would be required regardless of the API idiom chosen. The above (involving
+
506 * FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(), etc.) is really the main crux of it.
+
507 */
+
508using Error_code = boost::system::error_code;
+
509
+
510// See just below.
+
511template<typename Signature>
+ +
513
+
514/**
+
515 * Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used
+
516 * instead of `std::function` or `boost::function`. Due to ubiquitous use of such function-object wrappers,
+
517 * this is one of the very few direct non-`namespace` members of the outer namespace `::flow`.
+
518 *
+
519 * In reality it *is* `std::function`, with a couple of added APIs (no data) to make it more similar to
+
520 * `boost::function` API-wise.
+
521 *
+
522 * ### Rationale ###
+
523 * By far the main reason this exists is: I (ygoldfel) conducted an investigation in 2022, with a not-too-old gcc
+
524 * in Linux, in C++17 mode, with Boost 1.78 (but built seemingly in C++03-supporting config) about the
+
525 * performance behavior of lambdas objects and `boost::function<>` and `std::function<>` wrappers thereof.
+
526 * I noticed these things:
527 * - Say one constructs a `boost::function` from a lambda that has 1 or more by-value captures `[x = std::move(x)]`,
-
528 * with those captures' types having move ctors but `= delete`d copy ctors. I.e., say at least 1 capture is
-
529 * movable but not copyable; `unique_ptr` being a classic and practical example. Well: This does not compile;
-
530 * gcc complains `boost::function` needs `unique_ptr` to have a copy ctor, but it is `delete`d.
-
531 * In the case of `unique_ptr`, one can do `[x = shared_ptr(std::move(x))]` to get it work, though it's a bit
-
532 * more code, reduces perf by adding ref-counting, and reduces smart-ptr safety inside the lambda body.
-
533 * - However, constructing an `std::function` identically compiles and works fine.
-
534 *
-
535 * So, long story short, at least in that environment, `std::function` is just plain faster than `boost::function`,
-
536 * avoiding copying of captures; and it's easier to use with movable-not-copyable capture types.
-
537 *
-
538 * So we could have just done circa `using Function = std::function;`. Why the subclass? Answer: `std::function`
-
539 * lacks a couple of commonly used `boost::function` APIs that code tends to rely on (in the past we used
-
540 * `boost::function`). These are empty() and clear() as of this writing. See their doc headers (nothing amazing).
-
541 *
-
542 * Lastly: In the aforementioned environment, possibly because of having to support C++03 (which lacked
-
543 * param packs) -- unlike `std::function` which was introduced in C++11 to begin with (and
-
544 * probably conceptually based on `boost::function`) -- `boost::function`
-
545 * supports up to 10 args and does not compile when used with 11+ args. `std::function`, and therefore Function,
-
546 * lacks this limitation. It can be used with any number of args.
-
547 *
-
548 * @tparam Result
-
549 * See `std::function`.
-
550 * @tparam Args
-
551 * See `std::function`.
-
552 */
-
553template<typename Result, typename... Args>
-
554class Function<Result (Args...)> :
-
555 public std::function<Result (Args...)>
-
556{
-
557public:
-
558 // Types.
-
559
-
560 /// Short-hand for the base. We add no data of our own in this subclass, just a handful of APIs.
-
561 using Function_base = std::function<Result (Args...)>;
-
562
-
563 // Ctors/destructor.
+
528 * with those captures' types having move ctors different and faster than copy ctors. I found that this not only
+
529 * *copies* each of those captures (invokes their copy ctors), but it even does so several times!
+
530 * - However, constructing an `std::function` identically never invokes copy ctors -- only move ctors --
+
531 * and fewer times at that.
+
532 * - Say one constructs a `boost::function` from a lambda that has 1 or more by-value captures `[x = std::move(x)]`,
+
533 * with those captures' types having move ctors but `= delete`d copy ctors. I.e., say at least 1 capture is
+
534 * movable but not copyable; `unique_ptr` being a classic and practical example. Well: This does not compile;
+
535 * gcc complains `boost::function` needs `unique_ptr` to have a copy ctor, but it is `delete`d.
+
536 * In the case of `unique_ptr`, one can do `[x = shared_ptr(std::move(x))]` to get it work, though it's a bit
+
537 * more code, reduces perf by adding ref-counting, and reduces smart-ptr safety inside the lambda body.
+
538 * - However, constructing an `std::function` identically compiles and works fine.
+
539 *
+
540 * So, long story short, at least in that environment, `std::function` is just plain faster than `boost::function`,
+
541 * avoiding copying of captures; and it's easier to use with movable-not-copyable capture types.
+
542 *
+
543 * So we could have just done circa `using Function = std::function;`. Why the subclass? Answer: `std::function`
+
544 * lacks a couple of commonly used `boost::function` APIs that code tends to rely on (in the past we used
+
545 * `boost::function`). These are empty() and clear() as of this writing. See their doc headers (nothing amazing).
+
546 *
+
547 * Lastly: In the aforementioned environment, possibly because of having to support C++03 (which lacked
+
548 * param packs) -- unlike `std::function` which was introduced in C++11 to begin with (and
+
549 * probably conceptually based on `boost::function`) -- `boost::function`
+
550 * supports up to 10 args and does not compile when used with 11+ args. `std::function`, and therefore Function,
+
551 * lacks this limitation. It can be used with any number of args.
+
552 *
+
553 * @tparam Result
+
554 * See `std::function`.
+
555 * @tparam Args
+
556 * See `std::function`.
+
557 */
+
558template<typename Result, typename... Args>
+
559class Function<Result (Args...)> :
+
560 public std::function<Result (Args...)>
+
561{
+
562public:
+
563 // Types.
564
-
565 /// Inherit all the constructors from #Function_base. Add none of our own.
-
566 using Function_base::Function_base;
+
565 /// Short-hand for the base. We add no data of our own in this subclass, just a handful of APIs.
+
566 using Function_base = std::function<Result (Args...)>;
567
-
568 // Methods.
+
568 // Ctors/destructor.
569
-
570 /**
-
571 * Returns `!bool(*this)`; i.e., `true` if and only if `*this` has no target.
-
572 *
-
573 * ### Rationale ###
-
574 * Provided due to ubuiquity of code that uses `boost::function::empty()` which `std::function` lacks.
-
575 *
-
576 * @return See above.
-
577 */
-
578 bool empty() const noexcept;
-
579
-
580 /**
-
581 * Makes `*this` lack any target; i.e., makes it equal to a default-constructed object of this type, so that
-
582 * `empty() == true` is a post-condition.
-
583 *
-
584 * ### Rationale ###
-
585 * Provided due to ubuiquity of code that uses `boost::function::clear()` which `std::function` lacks.
-
586 */
-
587 void clear() noexcept;
-
588}; // class Function<Result (Args...)>
-
589
-
590#ifdef FLOW_DOXYGEN_ONLY // Actual compilation will ignore the below; but Doxygen will scan it and generate docs.
-
591
-
592/**
-
593 * The flow::log::Component payload enumeration comprising various log components used by Flow's own internal logging.
-
594 * Internal Flow code specifies members thereof when indicating the log component for each particular piece of
-
595 * logging code. Flow user specifies it, albeit very rarely, when configuring their program's logging
-
596 * such as via flow::log::Config::init_component_to_union_idx_mapping() and flow::log::Config::init_component_names().
-
597 *
-
598 * If you are reading this in Doxygen-generated output (likely a web page), be aware that the individual
-
599 * `enum` values are not documented right here, because flow::log auto-generates those via certain macro
-
600 * magic, and Doxygen cannot understand what is happening. However, you will find the same information
-
601 * directly in the source file `log_component_enum_declare.macros.hpp` (if the latter is clickable, click to see
-
602 * the source).
-
603 *
-
604 * ### Details regarding overall log system init in user program ###
-
605 *
-
606 * The following is a less formal reiteration of flow::log::Config documentation and is presented here -- even
-
607 * though technically in the present context Flow itself is nothing more than yet another module that uses
-
608 * flow::log for its own logging -- for your convenience. Flow's own logging can be seen as the canonical/model
-
609 * use of flow::log, so other flow::log users can read this to learn the basics of how to configure loggingg.
-
610 * That's why we re-explain this info here, in brief form:
-
611 *
-
612 * Your program -- that uses the present library -- can register this `enum` in order for these components
-
613 * (and particularly the log messages that specify them via flow::log::Log_context or
-
614 * FLOW_LOG_SET_CONTEXT()) to be logged properly in that program, co-existing correctly with other code bases
-
615 * that use flow::log for logging. Typically one constructs a `flow::log::Config C` and then at some point
-
616 * before logging begins:
-
617 * - For each `enum class X_log_component` (note that `Flow_log_component` is only one such `enum class`):
-
618 * -# `C.init_component_to_union_idx_mapping<X_log_component>(K)`, where `K` is a distinct numeric offset,
-
619 * maybe multiple of 1000.
-
620 * -# `C.init_component_names<X_log_component>(S_X_LOG_COMPONENT_NAME_MAP, ..., "X-")`.
-
621 * - Note the "X-" prefix, allowing one to prepend a namespace-like string prefix to avoid any output and config
-
622 * clashing.
-
623 * -# `C.configure_default_verbosity(Sev::S)`, where `S` is some default max severity.
-
624 * -# For each component `M` for which one desires a different max severity `S`:
-
625 * - `C.configure_component_verbosity<X_log_component>(Sev::S, X_log_component::M)`. OR:
-
626 * - `C.configure_component_verbosity_by_name(Sev::S, "X-M")`.
-
627 * - Apply `C` to the flow::log::Logger or `Logger`s you want to affect.
-
628 * - Pass the `Logger` or `Logger`s to appropriate APIs that want to log.
-
629 *
-
630 * One could make changes after logging has begun, but that's a separate topic.
-
631 */
- -
633{
-
634 /**
-
635 * CAUTION -- see flow::Flow_log_component doc header for directions to find actual members of this
-
636 * `enum class`. This entry is a placeholder for Doxygen purposes only, because of the macro magic involved
-
637 * in generating the actual `enum class`.
-
638 */
- -
640};
-
641
-
642/**
-
643 * The map generated by flow::log macro magic that maps each enumerated value in flow::Flow_log_component to its
-
644 * string representation as used in log output and verbosity config. Flow user specifies, albeit very rarely,
-
645 * when configuring their program's logging via flow::log::Config::init_component_names().
-
646 *
-
647 * As a Flow user, you can informally assume that if the component `enum` member is called `S_SOME_NAME`, then
-
648 * its string counterpart in this map will be auto-computed to be `"SOME_NAME"` (optionally prepended with a
-
649 * prefix as supplied to flow::log::Config::init_component_names()). This is achieved via flow::log macro magic.
-
650 *
-
651 * @see flow::Flow_log_component first.
-
652 */
-
653extern const boost::unordered_multimap<Flow_log_component, std::string> S_FLOW_LOG_COMPONENT_NAME_MAP;
-
654
-
655#endif // FLOW_DOXYGEN_ONLY
-
656
-
657// Template implementations.
-
658
-
659template<typename Result, typename... Args>
-
660bool Function<Result (Args...)>::empty() const noexcept
-
661{
-
662 return !*this;
-
663}
-
664
-
665template<typename Result, typename... Args>
-
666void Function<Result (Args...)>::clear() noexcept
-
667{
-
668 *this = {};
-
669}
-
670
-
671} // namespace flow
-
std::function< Result(Args...)> Function_base
Short-hand for the base. We add no data of our own in this subclass, just a handful of APIs.
Definition: common.hpp:561
- +
570 /// Inherit all the constructors from #Function_base. Add none of our own.
+
571 using Function_base::Function_base;
+
572
+
573 // Methods.
+
574
+
575 /**
+
576 * Returns `!bool(*this)`; i.e., `true` if and only if `*this` has no target.
+
577 *
+
578 * ### Rationale ###
+
579 * Provided due to ubuiquity of code that uses `boost::function::empty()` which `std::function` lacks.
+
580 *
+
581 * @return See above.
+
582 */
+
583 bool empty() const noexcept;
+
584
+
585 /**
+
586 * Makes `*this` lack any target; i.e., makes it equal to a default-constructed object of this type, so that
+
587 * `empty() == true` is a post-condition.
+
588 *
+
589 * ### Rationale ###
+
590 * Provided due to ubuiquity of code that uses `boost::function::clear()` which `std::function` lacks.
+
591 */
+
592 void clear() noexcept;
+
593}; // class Function<Result (Args...)>
+
594
+
595#ifdef FLOW_DOXYGEN_ONLY // Actual compilation will ignore the below; but Doxygen will scan it and generate docs.
+
596
+
597/**
+
598 * The flow::log::Component payload enumeration comprising various log components used by Flow's own internal logging.
+
599 * Internal Flow code specifies members thereof when indicating the log component for each particular piece of
+
600 * logging code. Flow user specifies it, albeit very rarely, when configuring their program's logging
+
601 * such as via flow::log::Config::init_component_to_union_idx_mapping() and flow::log::Config::init_component_names().
+
602 *
+
603 * If you are reading this in Doxygen-generated output (likely a web page), be aware that the individual
+
604 * `enum` values are not documented right here, because flow::log auto-generates those via certain macro
+
605 * magic, and Doxygen cannot understand what is happening. However, you will find the same information
+
606 * directly in the source file `log_component_enum_declare.macros.hpp` (if the latter is clickable, click to see
+
607 * the source).
+
608 *
+
609 * ### Details regarding overall log system init in user program ###
+
610 *
+
611 * The following is a less formal reiteration of flow::log::Config documentation and is presented here -- even
+
612 * though technically in the present context Flow itself is nothing more than yet another module that uses
+
613 * flow::log for its own logging -- for your convenience. Flow's own logging can be seen as the canonical/model
+
614 * use of flow::log, so other flow::log users can read this to learn the basics of how to configure loggingg.
+
615 * That's why we re-explain this info here, in brief form:
+
616 *
+
617 * Your program -- that uses the present library -- can register this `enum` in order for these components
+
618 * (and particularly the log messages that specify them via flow::log::Log_context or
+
619 * FLOW_LOG_SET_CONTEXT()) to be logged properly in that program, co-existing correctly with other code bases
+
620 * that use flow::log for logging. Typically one constructs a `flow::log::Config C` and then at some point
+
621 * before logging begins:
+
622 * - For each `enum class X_log_component` (note that `Flow_log_component` is only one such `enum class`):
+
623 * -# `C.init_component_to_union_idx_mapping<X_log_component>(K)`, where `K` is a distinct numeric offset,
+
624 * maybe multiple of 1000.
+
625 * -# `C.init_component_names<X_log_component>(S_X_LOG_COMPONENT_NAME_MAP, ..., "X-")`.
+
626 * - Note the "X-" prefix, allowing one to prepend a namespace-like string prefix to avoid any output and config
+
627 * clashing.
+
628 * -# `C.configure_default_verbosity(Sev::S)`, where `S` is some default max severity.
+
629 * -# For each component `M` for which one desires a different max severity `S`:
+
630 * - `C.configure_component_verbosity<X_log_component>(Sev::S, X_log_component::M)`. OR:
+
631 * - `C.configure_component_verbosity_by_name(Sev::S, "X-M")`.
+
632 * - Apply `C` to the flow::log::Logger or `Logger`s you want to affect.
+
633 * - Pass the `Logger` or `Logger`s to appropriate APIs that want to log.
+
634 *
+
635 * One could make changes after logging has begun, but that's a separate topic.
+
636 */
+ +
638{
+
639 /**
+
640 * CAUTION -- see flow::Flow_log_component doc header for directions to find actual members of this
+
641 * `enum class`. This entry is a placeholder for Doxygen purposes only, because of the macro magic involved
+
642 * in generating the actual `enum class`.
+
643 */
+ +
645};
+
646
+
647/**
+
648 * The map generated by flow::log macro magic that maps each enumerated value in flow::Flow_log_component to its
+
649 * string representation as used in log output and verbosity config. Flow user specifies, albeit very rarely,
+
650 * when configuring their program's logging via flow::log::Config::init_component_names().
+
651 *
+
652 * As a Flow user, you can informally assume that if the component `enum` member is called `S_SOME_NAME`, then
+
653 * its string counterpart in this map will be auto-computed to be `"SOME_NAME"` (optionally prepended with a
+
654 * prefix as supplied to flow::log::Config::init_component_names()). This is achieved via flow::log macro magic.
+
655 *
+
656 * @see flow::Flow_log_component first.
+
657 */
+
658extern const boost::unordered_multimap<Flow_log_component, std::string> S_FLOW_LOG_COMPONENT_NAME_MAP;
+
659
+
660#endif // FLOW_DOXYGEN_ONLY
+
661
+
662// Template implementations.
+
663
+
664template<typename Result, typename... Args>
+
665bool Function<Result (Args...)>::empty() const noexcept
+
666{
+
667 return !*this;
+
668}
+
669
+
670template<typename Result, typename... Args>
+
671void Function<Result (Args...)>::clear() noexcept
+
672{
+
673 *this = {};
+
674}
+
675
+
676} // namespace flow
+
std::function< Result(Args...)> Function_base
Short-hand for the base. We add no data of our own in this subclass, just a handful of APIs.
Definition: common.hpp:566
+
Catch-all namespace for the Flow project: A collection of various production-quality modules written ...
Definition: async_fwd.hpp:75
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
@ S_END_SENTINEL
CAUTION – see flow::Flow_log_component doc header for directions to find actual members of this enum ...
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
boost::chrono::high_resolution_clock Fine_clock
Clock used for delicate time measurements, such that the now() method gets the current time relative ...
Definition: common.hpp:405
-
signed char int8_t
Signed byte. Prefer to use uint8_t when representing binary data. This is 8 bits on all modern system...
Definition: common.hpp:388
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
boost::chrono::high_resolution_clock Fine_clock
Clock used for delicate time measurements, such that the now() method gets the current time relative ...
Definition: common.hpp:410
+
signed char int8_t
Signed byte. Prefer to use uint8_t when representing binary data. This is 8 bits on all modern system...
Definition: common.hpp:393
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
const boost::unordered_multimap< Flow_log_component, std::string > S_FLOW_LOG_COMPONENT_NAME_MAP
The map generated by flow::log macro magic that maps each enumerated value in flow::Flow_log_componen...
-
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:386
+
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:391
diff --git a/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp.html b/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp.html index 65bd2f948..8c5a643ae 100644 --- a/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp_source.html b/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp_source.html index f1fafb30f..417ddefdb 100644 --- a/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/concurrent__task__loop_8cpp_source.html @@ -312,13 +312,13 @@
Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...
Definition: async_fwd.hpp:75
void optimize_pinning_in_thread_pool(flow::log::Logger *logger_ptr, const std::vector< util::Thread * > &threads_in_pool, bool est_hw_core_sharing_helps_algo, bool est_hw_core_pinning_helps_algo, bool hw_threads_is_grouping_collated)
Assuming the same situation as documented for optimal_worker_thread_count_per_pool(),...
unsigned int optimal_worker_thread_count_per_pool(flow::log::Logger *logger_ptr, bool est_hw_core_sharing_helps_algo)
Assuming a planned thread pool will be receiving ~symmetrical load, and its UX-affecting (in particul...
-
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:356
+
std::string ostream_op_string(T const &... ostream_args)
Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
Definition: util.hpp:381
boost::thread Thread
Short-hand for standard thread class.
Definition: util_fwd.hpp:78
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
diff --git a/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp.html b/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp.html index 5aea37664..9fb9117b6 100644 --- a/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp.html @@ -159,7 +159,7 @@

diff --git a/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp_source.html b/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp_source.html index ae8ce509f..4b18aabd1 100644 --- a/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/concurrent__task__loop_8hpp_source.html @@ -844,7 +844,7 @@
772
773} // namespace flow::async
- +
The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
virtual size_t n_threads() const =0
How many threads does start() start?
virtual void post(Task &&task, Synchronicity synchronicity=Synchronicity::S_ASYNC)=0
Cause the given Task (function) to execute within the thread pool as soon as possible,...
@@ -871,15 +871,15 @@
Function< void()> Task
Short-hand for a task that can be posted for execution by a Concurrent_task_loop or flow::util::Task_...
Definition: async_fwd.hpp:96
auto asio_handler_via_op(Concurrent_task_loop *loop, const Op &op, Handler &&handler)
Given a boost.asio completion handler handler for a boost.asio async_*() action on some boost....
boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
diff --git a/doc/flow_doc/generated/html_full/config_8cpp.html b/doc/flow_doc/generated/html_full/config_8cpp.html index f4047fd0e..ec28fba74 100644 --- a/doc/flow_doc/generated/html_full/config_8cpp.html +++ b/doc/flow_doc/generated/html_full/config_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/config_8cpp_source.html b/doc/flow_doc/generated/html_full/config_8cpp_source.html index be3112adf..f108116f7 100644 --- a/doc/flow_doc/generated/html_full/config_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/config_8cpp_source.html @@ -380,7 +380,7 @@
Component_payload_type_to_cfg_map m_component_cfgs_by_payload_type
Fast-lookup map from distinct Component_payload type to the config for that component enum.
Definition: config.hpp:862
void store_severity_by_component(component_union_idx_t component_union_idx, raw_sev_t most_verbose_sev_or_none)
Helper that for the given flat-union-component-index saves the given per-component verbosity,...
Definition: config.cpp:55
component_union_idx_t component_to_union_idx(const Component &component) const
Given a component in the form user provides it at log call sites, returns its index in the flat compo...
Definition: config.cpp:40
-
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:120
+
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:145
Flow module providing logging functionality.
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Definition: log_fwd.hpp:224
@@ -390,7 +390,7 @@ diff --git a/doc/flow_doc/generated/html_full/config_8hpp.html b/doc/flow_doc/generated/html_full/config_8hpp.html index b7bfbebba..d03285cc5 100644 --- a/doc/flow_doc/generated/html_full/config_8hpp.html +++ b/doc/flow_doc/generated/html_full/config_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/config_8hpp_source.html b/doc/flow_doc/generated/html_full/config_8hpp_source.html index f6fa93542..bd62e05e0 100644 --- a/doc/flow_doc/generated/html_full/config_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/config_8hpp_source.html @@ -1158,7 +1158,7 @@
1086}
1087
1088} // namespace flow::log
- +
A light-weight class, each object storing a component payload encoding an enum value from enum type o...
Definition: log.hpp:840
unsigned int enum_raw_t
The type Payload must be enum class Payload : enum_raw_t: an enum type encoded via this integer type.
Definition: log.hpp:845
Trivial wrapper of atomic<raw_sev_t> which adds a couple of things to make it possible to construct,...
Definition: config.hpp:711
@@ -1196,19 +1196,19 @@
Component_payload_type_to_cfg_map m_component_cfgs_by_payload_type
Fast-lookup map from distinct Component_payload type to the config for that component enum.
Definition: config.hpp:862
void store_severity_by_component(component_union_idx_t component_union_idx, raw_sev_t most_verbose_sev_or_none)
Helper that for the given flat-union-component-index saves the given per-component verbosity,...
Definition: config.cpp:55
component_union_idx_t component_to_union_idx(const Component &component) const
Given a component in the form user provides it at log call sites, returns its index in the flat compo...
Definition: config.cpp:40
-
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:120
+
A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
Definition: util.hpp:145
Flow module providing logging functionality.
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Definition: log_fwd.hpp:224
-
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:276
+
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:301
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:386
+
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:391
The set of config stored for each distinct (as determined by Component::payload_type(),...
Definition: config.hpp:676
component_union_idx_t m_enum_to_num_offset
See the enum_to_num_offset arg in init_component_to_union_idx_mapping() doc header.
Definition: config.hpp:680
diff --git a/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp.html b/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp.html index 3977ef0db..bb096a666 100644 --- a/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp_source.html b/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp_source.html index 24292f96e..c3c8583a2 100644 --- a/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/config__enum__end__cpp_8macros_8hpp_source.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp.html b/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp.html index 634eb8e9b..37da4caab 100644 --- a/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp_source.html b/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp_source.html index e7d3af263..ee2f44412 100644 --- a/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/config__enum__end__hdr_8macros_8hpp_source.html @@ -109,7 +109,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp.html b/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp.html index 3b85090e9..16dc054d8 100644 --- a/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp_source.html b/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp_source.html index d9b47c802..4de48543c 100644 --- a/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/config__enum__start__cpp_8macros_8hpp_source.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp.html b/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp.html index 51bd36515..3fcd56857 100644 --- a/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp_source.html b/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp_source.html index 14473ae92..e825f73ed 100644 --- a/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/config__enum__start__hdr_8macros_8hpp_source.html @@ -130,7 +130,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl_8cpp.html b/doc/flow_doc/generated/html_full/cong__ctl_8cpp.html index e555fef88..3efda7322 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl_8cpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl_8cpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl_8cpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl_8cpp_source.html index 21846f9c7..a5f68eb8e 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl_8cpp_source.html @@ -249,15 +249,15 @@
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
std::istream & operator>>(std::istream &is, Congestion_control_selector::Strategy_choice &strategy_choice)
Deserializes a Peer_socket_options::Congestion_control_strategy_choice enum from a standard input str...
Definition: cong_ctl.cpp:124
std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
Definition: cong_ctl.cpp:146
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
Congestion_control_strategy_choice
The possible choices for congestion control strategy for the socket.
Definition: options.hpp:63
@ S_CLASSIC
Classic (Reno-style) AIMD congestion control.
@ S_CLASSIC_BANDWIDTH_ESTIMATED
Classic congestion control but with loss resulting in a window chosen from an outgoing bandwidth esti...
diff --git a/doc/flow_doc/generated/html_full/cong__ctl_8hpp.html b/doc/flow_doc/generated/html_full/cong__ctl_8hpp.html index fbfeb8b8b..622bd05b7 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl_8hpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl_8hpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl_8hpp_source.html index c9765f210..a6e2b51ba 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl_8hpp_source.html @@ -601,7 +601,7 @@
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
Congestion_control_strategy_choice
The possible choices for congestion control strategy for the socket.
Definition: options.hpp:63
@@ -609,7 +609,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp.html b/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp.html index a41c4fc9c..af22ea445 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp_source.html index c63764775..27f8c61c3 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic_8cpp_source.html @@ -281,7 +281,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp.html b/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp.html index 79f842722..710efb211 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp_source.html index c93826b97..4af7d8cae 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic_8hpp_source.html @@ -258,7 +258,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp.html b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp.html index d082fb279..850a3647f 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp_source.html index 394bcf73e..3ed39dab6 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8cpp_source.html @@ -324,11 +324,11 @@
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Definition: log.hpp:227
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp.html b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp.html index a6bf28682..0aeb6a628 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp_source.html index 005710f82..d5c2cc872 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__classic__bw_8hpp_source.html @@ -297,11 +297,11 @@
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
diff --git a/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp.html b/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp.html index 2d2ff17af..acc32a421 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp_source.html index 5224d3b68..4b4b7c309 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__util_8cpp_source.html @@ -492,11 +492,11 @@
#define FLOW_LOG_INFO(ARG_stream_fragment)
Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Definition: log.hpp:197
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Definition: log.hpp:227
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
diff --git a/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp.html b/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp.html index 04d7a3cf2..08bb85de9 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp_source.html b/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp_source.html index fcb50e682..c324f4da1 100644 --- a/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/cong__ctl__util_8hpp_source.html @@ -379,7 +379,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp.html b/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp.html index 252b2d787..9b649dca5 100644 --- a/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp_source.html index d8eaaddef..75d1ca655 100644 --- a/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2async__fwd_8hpp_source.html @@ -117,7 +117,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp.html b/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp.html index 706fe9510..bb870a87f 100644 --- a/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp_source.html index ee17f4cbf..8c8954748 100644 --- a/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2cfg__fwd_8hpp_source.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2common_8hpp.html b/doc/flow_doc/generated/html_full/detail_2common_8hpp.html index 22a9f2c5c..62243dd54 100644 --- a/doc/flow_doc/generated/html_full/detail_2common_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2common_8hpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2common_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2common_8hpp_source.html index 35136c173..4b7f854fd 100644 --- a/doc/flow_doc/generated/html_full/detail_2common_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2common_8hpp_source.html @@ -132,7 +132,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp.html b/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp.html index f3f6aa8fd..558606529 100644 --- a/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp_source.html index 3573ee12c..449ec2806 100644 --- a/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2log__fwd_8hpp_source.html @@ -117,7 +117,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp.html b/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp.html index 59a7f20fa..110a4bd8b 100644 --- a/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp_source.html index e3af43800..1376333a8 100644 --- a/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2net__flow__fwd_8hpp_source.html @@ -221,7 +221,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2util_8cpp.html b/doc/flow_doc/generated/html_full/detail_2util_8cpp.html index 2bedb00b5..67792abc5 100644 --- a/doc/flow_doc/generated/html_full/detail_2util_8cpp.html +++ b/doc/flow_doc/generated/html_full/detail_2util_8cpp.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2util_8cpp_source.html b/doc/flow_doc/generated/html_full/detail_2util_8cpp_source.html index 548fca4b5..ced1c6caf 100644 --- a/doc/flow_doc/generated/html_full/detail_2util_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2util_8cpp_source.html @@ -119,7 +119,7 @@
47} // namespace flow::util
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
Definition: basic_blob.hpp:29
std::string get_where_am_i_str(String_view file, String_view function, unsigned int line)
Helper for FLOW_UTIL_WHERE_AM_I(), etc., that, given values for source code file name,...
Definition: util.cpp:27
-
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:342
+
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:367
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
#define FLOW_UTIL_WHERE_AM_I_FROM_ARGS_TO_ARGS(ARG_file, ARG_function, ARG_line)
Helper macro, same as FLOW_UTIL_WHERE_AM_I_FROM_ARGS(), but results in a list of comma-separated,...
Definition: util.hpp:131
@@ -127,7 +127,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp.html b/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp.html index 54da3755f..d5fc6c006 100644 --- a/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp_source.html index ff9c7e775..dafdd5954 100644 --- a/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/detail_2util__fwd_8hpp_source.html @@ -261,13 +261,13 @@
Fine_time_pt chrono_duration_from_now_to_fine_time_pt(const boost::chrono::duration< Rep, Period > &dur)
Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
Definition: util.hpp:42
Fine_duration chrono_duration_to_fine_duration(const boost::chrono::duration< Rep, Period > &dur)
Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
Definition: util.hpp:31
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
diff --git a/doc/flow_doc/generated/html_full/dir_000000_000019.html b/doc/flow_doc/generated/html_full/dir_000000_000019.html index 8513b0e6d..8ee49ae0c 100644 --- a/doc/flow_doc/generated/html_full/dir_000000_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000000_000019.html @@ -70,7 +70,7 @@

asio → util Relation

File in net_flow/asioIncludes file in util
node.hppsched_task.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000001_000004.html b/doc/flow_doc/generated/html_full/dir_000001_000004.html index a6e79f861..343076cfb 100644 --- a/doc/flow_doc/generated/html_full/dir_000001_000004.html +++ b/doc/flow_doc/generated/html_full/dir_000001_000004.html @@ -70,7 +70,7 @@

async → detail Relation

File in asyncIncludes file in async/detail
async_fwd.hppasync_fwd.hpp
segregated_thread_task_loop.cpptask_qing_thread.hpp
segregated_thread_task_loop.hppasync_fwd.hpp
x_thread_task_loop.cpptask_qing_thread.hpp
x_thread_task_loop.hppasync_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000001_000013.html b/doc/flow_doc/generated/html_full/dir_000001_000013.html index 66cdb1996..1e6311eca 100644 --- a/doc/flow_doc/generated/html_full/dir_000001_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000001_000013.html @@ -70,7 +70,7 @@

async → log Relation

File in asyncIncludes file in log
op.hpplog.hpp
segregated_thread_task_loop.hpplog.hpp
x_thread_task_loop.hpplog.hpp
detail / task_qing_thread.cppconfig.hpp
detail / task_qing_thread.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000001_000017.html b/doc/flow_doc/generated/html_full/dir_000001_000017.html index c232bab26..c434cf729 100644 --- a/doc/flow_doc/generated/html_full/dir_000001_000017.html +++ b/doc/flow_doc/generated/html_full/dir_000001_000017.html @@ -70,7 +70,7 @@

async → perf Relation

File in asyncIncludes file in perf
single_thread_task_loop.hppclock_type_fwd.hpp
timed_concurrent_task_loop.hpptimed_handler.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000001_000019.html b/doc/flow_doc/generated/html_full/dir_000001_000019.html index 181437d67..23dd3a5b3 100644 --- a/doc/flow_doc/generated/html_full/dir_000001_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000001_000019.html @@ -70,7 +70,7 @@

async → util Relation

File in asyncIncludes file in util
async_fwd.hppsched_task_fwd.hpp
async_fwd.hpputil_fwd.hpp
concurrent_task_loop.hppsched_task_fwd.hpp
concurrent_task_loop.hpputil.hpp
op.hpprandom.hpp
segregated_thread_task_loop.cppsched_task.hpp
single_thread_task_loop.hpputil.hpp
x_thread_task_loop.cppsched_task.hpp
detail / task_qing_thread.hpputil_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000002_000005.html b/doc/flow_doc/generated/html_full/dir_000002_000005.html index 1396aaa31..7b6882a91 100644 --- a/doc/flow_doc/generated/html_full/dir_000002_000005.html +++ b/doc/flow_doc/generated/html_full/dir_000002_000005.html @@ -70,7 +70,7 @@

cfg → detail Relation

File in cfgIncludes file in cfg/detail
option_set.hppcfg_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000002_000013.html b/doc/flow_doc/generated/html_full/dir_000002_000013.html index 360339011..38e702d71 100644 --- a/doc/flow_doc/generated/html_full/dir_000002_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000002_000013.html @@ -70,7 +70,7 @@

cfg → log Relation

File in cfgIncludes file in log
option_set.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000002_000019.html b/doc/flow_doc/generated/html_full/dir_000002_000019.html index 893b83def..1a6530c64 100644 --- a/doc/flow_doc/generated/html_full/dir_000002_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000002_000019.html @@ -70,7 +70,7 @@

cfg → util Relation

File in cfgIncludes file in util
cfg_fwd.hpputil_fwd.hpp
cfg_manager.hppshared_ptr_alias_holder.hpp
cfg_manager.hpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000003_000018.html b/doc/flow_doc/generated/html_full/dir_000003_000018.html index 22a563583..7742c0a19 100644 --- a/doc/flow_doc/generated/html_full/dir_000003_000018.html +++ b/doc/flow_doc/generated/html_full/dir_000003_000018.html @@ -70,7 +70,7 @@

cong_ctl → stats Relation

File in net_flow/detail/cong_ctlIncludes file in net_flow/detail/stats
cong_ctl_classic_bw.hppbandwidth.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000004_000013.html b/doc/flow_doc/generated/html_full/dir_000004_000013.html index dedd56488..6174e6b6b 100644 --- a/doc/flow_doc/generated/html_full/dir_000004_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000004_000013.html @@ -70,7 +70,7 @@

detail → log Relation

File in async/detailIncludes file in log
task_qing_thread.cppconfig.hpp
task_qing_thread.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000004_000019.html b/doc/flow_doc/generated/html_full/dir_000004_000019.html index 479dede6d..109b4c858 100644 --- a/doc/flow_doc/generated/html_full/dir_000004_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000004_000019.html @@ -70,7 +70,7 @@

detail → util Relation

File in async/detailIncludes file in util
task_qing_thread.hpputil_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000007_000019.html b/doc/flow_doc/generated/html_full/dir_000007_000019.html index 8732e7e73..2d5b0fd67 100644 --- a/doc/flow_doc/generated/html_full/dir_000007_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000007_000019.html @@ -70,7 +70,7 @@

detail → util Relation

File in log/detailIncludes file in util
thread_lcl_str_appender.hppstring_ostream.hpp
thread_lcl_str_appender.hppuniq_id_holder.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000008_000003.html b/doc/flow_doc/generated/html_full/dir_000008_000003.html index b1fe562fe..02d4d9c66 100644 --- a/doc/flow_doc/generated/html_full/dir_000008_000003.html +++ b/doc/flow_doc/generated/html_full/dir_000008_000003.html @@ -70,7 +70,7 @@

detail → cong_ctl Relation

File in net_flow/detailIncludes file in net_flow/detail/cong_ctl
cong_ctl.cppcong_ctl_classic.hpp
cong_ctl.cppcong_ctl_classic_bw.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000008_000012.html b/doc/flow_doc/generated/html_full/dir_000008_000012.html index 02601d540..bbafafcdd 100644 --- a/doc/flow_doc/generated/html_full/dir_000008_000012.html +++ b/doc/flow_doc/generated/html_full/dir_000008_000012.html @@ -70,7 +70,7 @@

detail → error Relation

File in net_flow/detailIncludes file in net_flow/error
port_space.hpperror.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000008_000013.html b/doc/flow_doc/generated/html_full/dir_000008_000013.html index f89ce8f11..17f2f4b75 100644 --- a/doc/flow_doc/generated/html_full/dir_000008_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000008_000013.html @@ -70,7 +70,7 @@

detail → log Relation

File in net_flow/detailIncludes file in log
cong_ctl.hpplog.hpp
low_lvl_packet.hpplog.hpp
port_space.hpplog.hpp
seq_num.hpplog.hpp
socket_buffer.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000008_000019.html b/doc/flow_doc/generated/html_full/dir_000008_000019.html index 0e7f6ca82..f8e8ce5e6 100644 --- a/doc/flow_doc/generated/html_full/dir_000008_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000008_000019.html @@ -70,7 +70,7 @@

detail → util Relation

File in net_flow/detailIncludes file in util
cong_ctl.hpputil.hpp
drop_timer.cpputil.hpp
drop_timer.hppshared_ptr_alias_holder.hpp
low_lvl_io.cppsched_task.hpp
low_lvl_io.hpplinked_hash_set.hpp
low_lvl_packet.hppblob.hpp
low_lvl_packet.hppshared_ptr_alias_holder.hpp
low_lvl_packet.hpputil.hpp
port_space.cpputil.hpp
port_space.hpprandom.hpp
seq_num.cpprandom.hpp
socket_buffer.hppblob.hpp
socket_buffer.hpputil.hpp
stats / bandwidth.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000011_000013.html b/doc/flow_doc/generated/html_full/dir_000011_000013.html index e046d9b64..0cf291641 100644 --- a/doc/flow_doc/generated/html_full/dir_000011_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000011_000013.html @@ -70,7 +70,7 @@

error → log Relation

File in errorIncludes file in log
error.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000011_000019.html b/doc/flow_doc/generated/html_full/dir_000011_000019.html index 99fdc4dc8..7c62b5b32 100644 --- a/doc/flow_doc/generated/html_full/dir_000011_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000011_000019.html @@ -70,7 +70,7 @@

error → util Relation

File in errorIncludes file in util
error.hppdetail / util.hpp
error_fwd.hpputil_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000012_000008.html b/doc/flow_doc/generated/html_full/dir_000012_000008.html index 5bea6a276..b3d932379 100644 --- a/doc/flow_doc/generated/html_full/dir_000012_000008.html +++ b/doc/flow_doc/generated/html_full/dir_000012_000008.html @@ -70,7 +70,7 @@

error → detail Relation

File in net_flow/errorIncludes file in net_flow/detail
error.cppport_space.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000012_000019.html b/doc/flow_doc/generated/html_full/dir_000012_000019.html index 310d9b3cc..a29032128 100644 --- a/doc/flow_doc/generated/html_full/dir_000012_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000012_000019.html @@ -70,7 +70,7 @@

error → util Relation

File in net_flow/errorIncludes file in util
error.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000013_000001.html b/doc/flow_doc/generated/html_full/dir_000013_000001.html index ab3c5901b..f07bd9ab7 100644 --- a/doc/flow_doc/generated/html_full/dir_000013_000001.html +++ b/doc/flow_doc/generated/html_full/dir_000013_000001.html @@ -70,7 +70,7 @@

log → async Relation

File in logIncludes file in async
async_file_logger.hppsingle_thread_task_loop.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000013_000007.html b/doc/flow_doc/generated/html_full/dir_000013_000007.html index b184ae6e8..e109c816c 100644 --- a/doc/flow_doc/generated/html_full/dir_000013_000007.html +++ b/doc/flow_doc/generated/html_full/dir_000013_000007.html @@ -70,7 +70,7 @@

log → detail Relation

File in logIncludes file in log/detail
async_file_logger.cppserial_file_logger.hpp
async_file_logger.hpplog_fwd.hpp
log.hpplog_fwd.hpp
log.hppthread_lcl_str_appender.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000013_000019.html b/doc/flow_doc/generated/html_full/dir_000013_000019.html index d8abe9507..e7d2f1b87 100644 --- a/doc/flow_doc/generated/html_full/dir_000013_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000013_000019.html @@ -70,7 +70,7 @@

log → util Relation

File in logIncludes file in util
async_file_logger.hpputil_fwd.hpp
buffer_logger.hppstring_ostream.hpp
buffer_logger.hpputil_fwd.hpp
log.cpputil_fwd.hpp
log.hppuniq_id_holder.hpp
log.hpputil.hpp
log.hppdetail / util.hpp
ostream_log_msg_writer.cppfmt.hpp
ostream_log_msg_writer.cppstring_view.hpp
simple_ostream_logger.hpputil_fwd.hpp
detail / thread_lcl_str_appender.hppstring_ostream.hpp
detail / thread_lcl_str_appender.hppuniq_id_holder.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000016_000001.html b/doc/flow_doc/generated/html_full/dir_000016_000001.html index 9c6186995..40ceeecfc 100644 --- a/doc/flow_doc/generated/html_full/dir_000016_000001.html +++ b/doc/flow_doc/generated/html_full/dir_000016_000001.html @@ -70,7 +70,7 @@

net_flow → async Relation

File in net_flowIncludes file in async
event_set.cpputil.hpp
peer_socket.cpputil.hpp
server_socket.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000016_000008.html b/doc/flow_doc/generated/html_full/dir_000016_000008.html index 4abc8d79d..103fe7a22 100644 --- a/doc/flow_doc/generated/html_full/dir_000016_000008.html +++ b/doc/flow_doc/generated/html_full/dir_000016_000008.html @@ -70,7 +70,7 @@

net_flow → detail Relation

File in net_flowIncludes file in net_flow/detail
detail / cong_ctl.cppcong_ctl / cong_ctl_classic.hpp
detail / cong_ctl.cppcong_ctl / cong_ctl_classic_bw.hpp
detail / cong_ctl / cong_ctl_classic_bw.hppstats / bandwidth.hpp
error / error.cppport_space.hpp
info.cpplow_lvl_packet.hpp
node.hpplow_lvl_packet.hpp
node.hppnet_flow_fwd.hpp
node.hppport_space.hpp
options.cppcong_ctl.hpp
peer_socket.cppstats / bandwidth.hpp
peer_socket.cppcong_ctl.hpp
peer_socket.cppdrop_timer.hpp
peer_socket.hpplow_lvl_io.hpp
peer_socket.hppnet_flow_fwd.hpp
peer_socket.hppsocket_buffer.hpp
peer_socket.hppstats / socket_stats.hpp
server_socket.cppstats / bandwidth.hpp
server_socket.cppcong_ctl.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000016_000012.html b/doc/flow_doc/generated/html_full/dir_000016_000012.html index 19ccc0700..04ed21d94 100644 --- a/doc/flow_doc/generated/html_full/dir_000016_000012.html +++ b/doc/flow_doc/generated/html_full/dir_000016_000012.html @@ -70,7 +70,7 @@

net_flow → error Relation

File in net_flowIncludes file in net_flow/error
event_set.hpperror.hpp
node.hpperror.hpp
peer_socket.hpperror.hpp
detail / port_space.hpperror.hpp
server_socket.hpperror.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000016_000013.html b/doc/flow_doc/generated/html_full/dir_000016_000013.html index 66ef0e97d..058f0ab1c 100644 --- a/doc/flow_doc/generated/html_full/dir_000016_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000016_000013.html @@ -70,7 +70,7 @@

net_flow → log Relation

File in net_flowIncludes file in log
detail / cong_ctl.hpplog.hpp
detail / low_lvl_packet.hpplog.hpp
net_env_simulator.hpplog.hpp
node.hpplog.hpp
detail / port_space.hpplog.hpp
detail / seq_num.hpplog.hpp
server_socket.hpplog.hpp
detail / socket_buffer.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000016_000019.html b/doc/flow_doc/generated/html_full/dir_000016_000019.html index 915c1cad2..da66e76d8 100644 --- a/doc/flow_doc/generated/html_full/dir_000016_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000016_000019.html @@ -70,7 +70,7 @@

net_flow → util Relation

File in net_flowIncludes file in util
detail / cong_ctl.hpputil.hpp
detail / drop_timer.cpputil.hpp
detail / drop_timer.hppshared_ptr_alias_holder.hpp
endpoint.hpputil_fwd.hpp
error / error.cpputil.hpp
event_set.hppshared_ptr_alias_holder.hpp
event_set.hpptraits.hpp
detail / low_lvl_io.cppsched_task.hpp
detail / low_lvl_io.hpplinked_hash_set.hpp
detail / low_lvl_packet.hppblob.hpp
detail / low_lvl_packet.hppshared_ptr_alias_holder.hpp
detail / low_lvl_packet.hpputil.hpp
net_env_simulator.hpprandom.hpp
node.cppsched_task.hpp
asio / node.hppsched_task.hpp
node.hpputil.hpp
peer_socket.cppsched_task.hpp
peer_socket.hpplinked_hash_map.hpp
peer_socket.hppsched_task_fwd.hpp
peer_socket.hppshared_ptr_alias_holder.hpp
peer_socket.hpputil.hpp
detail / port_space.cpputil.hpp
detail / port_space.hpprandom.hpp
detail / seq_num.cpprandom.hpp
server_socket.hpplinked_hash_set.hpp
server_socket.hppshared_ptr_alias_holder.hpp
server_socket.hpputil.hpp
detail / socket_buffer.hppblob.hpp
detail / socket_buffer.hpputil.hpp
detail / stats / bandwidth.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000017_000013.html b/doc/flow_doc/generated/html_full/dir_000017_000013.html index 25a1432a3..090ca0f98 100644 --- a/doc/flow_doc/generated/html_full/dir_000017_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000017_000013.html @@ -70,7 +70,7 @@

perf → log Relation

File in perfIncludes file in log
checkpt_timer.hpplog.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000017_000019.html b/doc/flow_doc/generated/html_full/dir_000017_000019.html index 90112c58a..41b24072d 100644 --- a/doc/flow_doc/generated/html_full/dir_000017_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000017_000019.html @@ -70,7 +70,7 @@

perf → util Relation

File in perfIncludes file in util
clock_type.cppstring_ostream.hpp
clock_type.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000018_000019.html b/doc/flow_doc/generated/html_full/dir_000018_000019.html index 164dd4072..d5d4c6af6 100644 --- a/doc/flow_doc/generated/html_full/dir_000018_000019.html +++ b/doc/flow_doc/generated/html_full/dir_000018_000019.html @@ -70,7 +70,7 @@

stats → util Relation

File in net_flow/detail/statsIncludes file in util
bandwidth.cpputil.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000019_000009.html b/doc/flow_doc/generated/html_full/dir_000019_000009.html index da33dc7d9..753ed8931 100644 --- a/doc/flow_doc/generated/html_full/dir_000019_000009.html +++ b/doc/flow_doc/generated/html_full/dir_000019_000009.html @@ -70,7 +70,7 @@

util → detail Relation

File in utilIncludes file in util/detail
sched_task.hppsched_task_handle_state.hpp
util_fwd.hpputil_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_000019_000013.html b/doc/flow_doc/generated/html_full/dir_000019_000013.html index ca0d72832..d74d930c3 100644 --- a/doc/flow_doc/generated/html_full/dir_000019_000013.html +++ b/doc/flow_doc/generated/html_full/dir_000019_000013.html @@ -70,7 +70,7 @@

util → log Relation

File in utilIncludes file in log
basic_blob.hpplog.hpp
blob_fwd.hpplog_fwd.hpp
sched_task.hpplog.hpp
sched_task_fwd.hpplog_fwd.hpp
diff --git a/doc/flow_doc/generated/html_full/dir_076e4717ccf31a1bda117b982e8d440f.html b/doc/flow_doc/generated/html_full/dir_076e4717ccf31a1bda117b982e8d440f.html index 83ae2a49d..c443e02b8 100644 --- a/doc/flow_doc/generated/html_full/dir_076e4717ccf31a1bda117b982e8d440f.html +++ b/doc/flow_doc/generated/html_full/dir_076e4717ccf31a1bda117b982e8d440f.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_12ed47f6ecc03f411f952cdaf2e983c4.html b/doc/flow_doc/generated/html_full/dir_12ed47f6ecc03f411f952cdaf2e983c4.html index b8928eb25..827d928ca 100644 --- a/doc/flow_doc/generated/html_full/dir_12ed47f6ecc03f411f952cdaf2e983c4.html +++ b/doc/flow_doc/generated/html_full/dir_12ed47f6ecc03f411f952cdaf2e983c4.html @@ -86,7 +86,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_183f5ca7bfa2ee923b1b08301562c36a.html b/doc/flow_doc/generated/html_full/dir_183f5ca7bfa2ee923b1b08301562c36a.html index e4f64df2b..b7040637f 100644 --- a/doc/flow_doc/generated/html_full/dir_183f5ca7bfa2ee923b1b08301562c36a.html +++ b/doc/flow_doc/generated/html_full/dir_183f5ca7bfa2ee923b1b08301562c36a.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_1efabf1cd0b709973fdc844b590473f2.html b/doc/flow_doc/generated/html_full/dir_1efabf1cd0b709973fdc844b590473f2.html index 95129cb83..c01cb8d11 100644 --- a/doc/flow_doc/generated/html_full/dir_1efabf1cd0b709973fdc844b590473f2.html +++ b/doc/flow_doc/generated/html_full/dir_1efabf1cd0b709973fdc844b590473f2.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_23ec12649285f9fabf3a6b7380226c28.html b/doc/flow_doc/generated/html_full/dir_23ec12649285f9fabf3a6b7380226c28.html index 524580cf4..0cc7a7672 100644 --- a/doc/flow_doc/generated/html_full/dir_23ec12649285f9fabf3a6b7380226c28.html +++ b/doc/flow_doc/generated/html_full/dir_23ec12649285f9fabf3a6b7380226c28.html @@ -128,7 +128,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_2e2c6296987b56cb51feb2e618f819df.html b/doc/flow_doc/generated/html_full/dir_2e2c6296987b56cb51feb2e618f819df.html index b9b39222f..8f1287452 100644 --- a/doc/flow_doc/generated/html_full/dir_2e2c6296987b56cb51feb2e618f819df.html +++ b/doc/flow_doc/generated/html_full/dir_2e2c6296987b56cb51feb2e618f819df.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_32fe048265414b269410790b72c83abb.html b/doc/flow_doc/generated/html_full/dir_32fe048265414b269410790b72c83abb.html index 342c403fa..7c3d925e3 100644 --- a/doc/flow_doc/generated/html_full/dir_32fe048265414b269410790b72c83abb.html +++ b/doc/flow_doc/generated/html_full/dir_32fe048265414b269410790b72c83abb.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_460afd45d0ec637b1427e0e06a6fbcf7.html b/doc/flow_doc/generated/html_full/dir_460afd45d0ec637b1427e0e06a6fbcf7.html index 0ad39f12a..b9c6031a0 100644 --- a/doc/flow_doc/generated/html_full/dir_460afd45d0ec637b1427e0e06a6fbcf7.html +++ b/doc/flow_doc/generated/html_full/dir_460afd45d0ec637b1427e0e06a6fbcf7.html @@ -126,7 +126,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_4c52cb8b55b918be67d078d7a231760a.html b/doc/flow_doc/generated/html_full/dir_4c52cb8b55b918be67d078d7a231760a.html index 04ce17e5b..f946941a7 100644 --- a/doc/flow_doc/generated/html_full/dir_4c52cb8b55b918be67d078d7a231760a.html +++ b/doc/flow_doc/generated/html_full/dir_4c52cb8b55b918be67d078d7a231760a.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_6dd0f5e913f2b13fdf6025047ac045ce.html b/doc/flow_doc/generated/html_full/dir_6dd0f5e913f2b13fdf6025047ac045ce.html index c9f0b45f8..c7456374e 100644 --- a/doc/flow_doc/generated/html_full/dir_6dd0f5e913f2b13fdf6025047ac045ce.html +++ b/doc/flow_doc/generated/html_full/dir_6dd0f5e913f2b13fdf6025047ac045ce.html @@ -122,7 +122,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_7deb60020b604d720cf26eb7de2df042.html b/doc/flow_doc/generated/html_full/dir_7deb60020b604d720cf26eb7de2df042.html index 86d90489f..30ecb502b 100644 --- a/doc/flow_doc/generated/html_full/dir_7deb60020b604d720cf26eb7de2df042.html +++ b/doc/flow_doc/generated/html_full/dir_7deb60020b604d720cf26eb7de2df042.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_9381a7bbd03577d6d8720c7f35c94ffa.html b/doc/flow_doc/generated/html_full/dir_9381a7bbd03577d6d8720c7f35c94ffa.html index 74a90d422..90d354ca0 100644 --- a/doc/flow_doc/generated/html_full/dir_9381a7bbd03577d6d8720c7f35c94ffa.html +++ b/doc/flow_doc/generated/html_full/dir_9381a7bbd03577d6d8720c7f35c94ffa.html @@ -122,7 +122,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_9d19ee70020ba699428208fa42b853e3.html b/doc/flow_doc/generated/html_full/dir_9d19ee70020ba699428208fa42b853e3.html index 274ec4511..699f7d4bd 100644 --- a/doc/flow_doc/generated/html_full/dir_9d19ee70020ba699428208fa42b853e3.html +++ b/doc/flow_doc/generated/html_full/dir_9d19ee70020ba699428208fa42b853e3.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_aee2b3c67924e0eefa590b781c13db02.html b/doc/flow_doc/generated/html_full/dir_aee2b3c67924e0eefa590b781c13db02.html index 7468cf4ab..79cd80a64 100644 --- a/doc/flow_doc/generated/html_full/dir_aee2b3c67924e0eefa590b781c13db02.html +++ b/doc/flow_doc/generated/html_full/dir_aee2b3c67924e0eefa590b781c13db02.html @@ -87,7 +87,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_b5abf7709f04a6790223f09f199659e4.html b/doc/flow_doc/generated/html_full/dir_b5abf7709f04a6790223f09f199659e4.html index 530397416..8cc821831 100644 --- a/doc/flow_doc/generated/html_full/dir_b5abf7709f04a6790223f09f199659e4.html +++ b/doc/flow_doc/generated/html_full/dir_b5abf7709f04a6790223f09f199659e4.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_bf37cf39814650876b4aa4513810c0b4.html b/doc/flow_doc/generated/html_full/dir_bf37cf39814650876b4aa4513810c0b4.html index 6c406ecba..03e4d8f8c 100644 --- a/doc/flow_doc/generated/html_full/dir_bf37cf39814650876b4aa4513810c0b4.html +++ b/doc/flow_doc/generated/html_full/dir_bf37cf39814650876b4aa4513810c0b4.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_c3b46db8887e8285e98d946e3c1c617e.html b/doc/flow_doc/generated/html_full/dir_c3b46db8887e8285e98d946e3c1c617e.html index 0adfc46e6..ef933d516 100644 --- a/doc/flow_doc/generated/html_full/dir_c3b46db8887e8285e98d946e3c1c617e.html +++ b/doc/flow_doc/generated/html_full/dir_c3b46db8887e8285e98d946e3c1c617e.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_cfb2ffb2869bbb27b7281952022eb856.html b/doc/flow_doc/generated/html_full/dir_cfb2ffb2869bbb27b7281952022eb856.html index 870c83ec3..30d1d3f43 100644 --- a/doc/flow_doc/generated/html_full/dir_cfb2ffb2869bbb27b7281952022eb856.html +++ b/doc/flow_doc/generated/html_full/dir_cfb2ffb2869bbb27b7281952022eb856.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html b/doc/flow_doc/generated/html_full/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html index d23536833..57ee208b9 100644 --- a/doc/flow_doc/generated/html_full/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html +++ b/doc/flow_doc/generated/html_full/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/dir_fc8890094717abd5fd945eea3218f11d.html b/doc/flow_doc/generated/html_full/dir_fc8890094717abd5fd945eea3218f11d.html index cdd55635c..09a2092b2 100644 --- a/doc/flow_doc/generated/html_full/dir_fc8890094717abd5fd945eea3218f11d.html +++ b/doc/flow_doc/generated/html_full/dir_fc8890094717abd5fd945eea3218f11d.html @@ -86,7 +86,7 @@ diff --git a/doc/flow_doc/generated/html_full/doc-coding__style_8cpp.html b/doc/flow_doc/generated/html_full/doc-coding__style_8cpp.html index e3344b899..8f3cf9f23 100644 --- a/doc/flow_doc/generated/html_full/doc-coding__style_8cpp.html +++ b/doc/flow_doc/generated/html_full/doc-coding__style_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_full/doc-coding__style_8cpp_source.html b/doc/flow_doc/generated/html_full/doc-coding__style_8cpp_source.html index adc05bbe0..baeb9e7eb 100644 --- a/doc/flow_doc/generated/html_full/doc-coding__style_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/doc-coding__style_8cpp_source.html @@ -1660,16 +1660,16 @@
1588
1589# endif
1590#endif // !defined(FLOW_DOXYGEN_ONLY)
- +
std::ostream & operator<<(std::ostream &os, const Option_set< Value_set > &val)
Serializes (briefly) an Option_set to a standard output stream.
#define FLOW_LOG_WITHOUT_CHECKING(ARG_sev, ARG_stream_fragment)
Identical to FLOW_LOG_WITH_CHECKING() but foregoes the filter (Logger::should_log()) check.
Definition: log.hpp:532
#define FLOW_LOG_WARNING(ARG_stream_fragment)
Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...
Definition: log.hpp:152
Scheduled_task_handle schedule_task_at(log::Logger *logger_ptr, const Fine_time_pt &at, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
Identical to schedule_task_from_now() except the time is specified in absolute terms.
Definition: sched_task.hpp:245
-
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:386
+
unsigned char uint8_t
Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
Definition: common.hpp:391
diff --git a/doc/flow_doc/generated/html_full/drop__timer_8cpp.html b/doc/flow_doc/generated/html_full/drop__timer_8cpp.html index c9d4c072d..aa2232653 100644 --- a/doc/flow_doc/generated/html_full/drop__timer_8cpp.html +++ b/doc/flow_doc/generated/html_full/drop__timer_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/drop__timer_8cpp_source.html b/doc/flow_doc/generated/html_full/drop__timer_8cpp_source.html index a185031d3..a5361c333 100644 --- a/doc/flow_doc/generated/html_full/drop__timer_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/drop__timer_8cpp_source.html @@ -650,7 +650,7 @@
578}
579
580} // namespace flow::net_flow
- +
const Component & get_log_component() const
Returns reference to the stored Component object, particularly as many FLOW_LOG_*() macros expect.
Definition: log.cpp:230
Logger * get_logger() const
Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
Definition: log.cpp:225
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
@@ -684,7 +684,7 @@
Fine_duration & m_sock_drop_timeout
Reference to the containing Peer_socket's Peer_socket::m_snd_drop_timeout data member (= DTO,...
Definition: drop_timer.hpp:385
bool m_in_events_group
true if and only if the last start_contemporaneous_events() call exists, and either end_contemporaneo...
Definition: drop_timer.hpp:473
void on_packet_in_flight(packet_id_t packet_id)
Indicates that a packet identified by the given unique ID has just been sent over the wire (the low-l...
Definition: drop_timer.cpp:52
-
util::Lock_guard< Options_mutex > Options_lock
Short-hand for lock that acquires exclusive access to an Options_mutex.
+
util::Lock_guard< Options_mutex > Options_lock
Short-hand for lock that acquires exclusive access to an Options_mutex.
boost::shared_ptr< Drop_timer > Ptr
Short-hand for ref-counted pointer to mutable values of type Target_type::element_type (a-la T*).
Const_target_ptr Const_ptr
Short-hand for ref-counted pointer to immutable values of type Target_type::element_type (a-la T cons...
@@ -693,17 +693,17 @@
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Definition: log_fwd.hpp:224
@ S_INTERNAL_ERROR_SYSTEM_ERROR_ASIO_TIMER
Internal error: System error: Something went wrong with boost.asio timer subsystem.
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:276
+
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:301
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
-
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:408
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
+
Fine_clock::time_point Fine_time_pt
A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
Definition: common.hpp:413
diff --git a/doc/flow_doc/generated/html_full/drop__timer_8hpp.html b/doc/flow_doc/generated/html_full/drop__timer_8hpp.html index 4ad1f4b02..2f98673f8 100644 --- a/doc/flow_doc/generated/html_full/drop__timer_8hpp.html +++ b/doc/flow_doc/generated/html_full/drop__timer_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/drop__timer_8hpp_source.html b/doc/flow_doc/generated/html_full/drop__timer_8hpp_source.html index f772a0ccb..c92bc8c16 100644 --- a/doc/flow_doc/generated/html_full/drop__timer_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/drop__timer_8hpp_source.html @@ -546,7 +546,7 @@
474}; // class Drop_timer
475
476} // namespace flow::net_flow
- +
Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
Definition: log.hpp:1619
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Definition: log.hpp:1291
Internal net_flow class that maintains the Drop Timer for DATA packet(s) to have been sent out over a...
Definition: drop_timer.hpp:152
@@ -587,14 +587,14 @@
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
boost::asio::io_service Task_engine
Short-hand for boost.asio event service, the central class of boost.asio.
Definition: util_fwd.hpp:135
boost::asio::basic_waitable_timer< Fine_clock > Timer
boost.asio timer.
Definition: util_fwd.hpp:202
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
diff --git a/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp.html b/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp.html index 6445e6393..36edfef90 100644 --- a/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp.html +++ b/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp_source.html b/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp_source.html index 8478756d3..c724a235e 100644 --- a/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/dynamic__cfg__context_8hpp_source.html @@ -241,7 +241,7 @@
169
170} // namespace flow::cfg
- +
Manages a config setup, intended for a single daemon process, by maintaining 1 or more set(s) of stat...
Class which facilitates managing access to a dynamic configuration.
const Root_to_target_func m_root_to_target_func
Translates a root configuration object to a contained target configuration object.
@@ -254,7 +254,7 @@ diff --git a/doc/flow_doc/generated/html_full/endpoint_8cpp.html b/doc/flow_doc/generated/html_full/endpoint_8cpp.html index 915875974..e12551f1e 100644 --- a/doc/flow_doc/generated/html_full/endpoint_8cpp.html +++ b/doc/flow_doc/generated/html_full/endpoint_8cpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/endpoint_8cpp_source.html b/doc/flow_doc/generated/html_full/endpoint_8cpp_source.html index 03a567e02..32c2cb14d 100644 --- a/doc/flow_doc/generated/html_full/endpoint_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/endpoint_8cpp_source.html @@ -157,7 +157,7 @@ diff --git a/doc/flow_doc/generated/html_full/endpoint_8hpp.html b/doc/flow_doc/generated/html_full/endpoint_8hpp.html index 351e1a085..70d503c3c 100644 --- a/doc/flow_doc/generated/html_full/endpoint_8hpp.html +++ b/doc/flow_doc/generated/html_full/endpoint_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/endpoint_8hpp_source.html b/doc/flow_doc/generated/html_full/endpoint_8hpp_source.html index d7d1ba671..80df90c14 100644 --- a/doc/flow_doc/generated/html_full/endpoint_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/endpoint_8hpp_source.html @@ -195,7 +195,7 @@ diff --git a/doc/flow_doc/generated/html_full/error_2error_8cpp.html b/doc/flow_doc/generated/html_full/error_2error_8cpp.html index bd038691d..3c4a411f7 100644 --- a/doc/flow_doc/generated/html_full/error_2error_8cpp.html +++ b/doc/flow_doc/generated/html_full/error_2error_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/error_2error_8cpp_source.html b/doc/flow_doc/generated/html_full/error_2error_8cpp_source.html index b5b6a4727..258740994 100644 --- a/doc/flow_doc/generated/html_full/error_2error_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/error_2error_8cpp_source.html @@ -130,11 +130,11 @@
const char * what() const noexcept override
Returns a message describing the exception.
Definition: error.cpp:46
Flow module that facilitates working with error codes and exceptions; essentially comprised of niceti...
Definition: error.cpp:22
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
diff --git a/doc/flow_doc/generated/html_full/error_2error_8hpp.html b/doc/flow_doc/generated/html_full/error_2error_8hpp.html index ee1a9eb4f..bf248f37a 100644 --- a/doc/flow_doc/generated/html_full/error_2error_8hpp.html +++ b/doc/flow_doc/generated/html_full/error_2error_8hpp.html @@ -156,7 +156,7 @@

"[" << FLOW_ERROR_EMIT_ERR_val.message() << "]."); \
*err_code = FLOW_ERROR_EMIT_ERR_val; \
)
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
#define FLOW_UTIL_SEMICOLON_SAFE(ARG_func_macro_definition)
Use this to create a semicolon-safe version of a "void" functional macro definition consisting of at ...
Definition: util_fwd.hpp:1079

Sets *err_code to ARG_val and logs a warning about the error using FLOW_LOG_WARNING().

@@ -471,7 +471,7 @@

diff --git a/doc/flow_doc/generated/html_full/error_2error_8hpp_source.html b/doc/flow_doc/generated/html_full/error_2error_8hpp_source.html index 84f74c1f1..bd032577a 100644 --- a/doc/flow_doc/generated/html_full/error_2error_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/error_2error_8hpp_source.html @@ -537,12 +537,12 @@
bool exec_void_and_throw_on_error(const Func &func, Error_code *err_code, util::String_view context)
Equivalent of exec_and_throw_on_error() for operations with void return type.
Definition: error.hpp:168
bool exec_and_throw_on_error(const Func &func, Ret *ret, Error_code *err_code, util::String_view context)
Helper for FLOW_ERROR_EXEC_AND_THROW_ON_ERROR() macro that does everything in the latter not needing ...
Definition: error.hpp:128
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
diff --git a/doc/flow_doc/generated/html_full/error__fwd_8hpp.html b/doc/flow_doc/generated/html_full/error__fwd_8hpp.html index ec98f5829..d185cbe0f 100644 --- a/doc/flow_doc/generated/html_full/error__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/error__fwd_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/error__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/error__fwd_8hpp_source.html index e53776493..28a8116ab 100644 --- a/doc/flow_doc/generated/html_full/error__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/error__fwd_8hpp_source.html @@ -189,12 +189,12 @@
bool exec_void_and_throw_on_error(const Func &func, Error_code *err_code, util::String_view context)
Equivalent of exec_and_throw_on_error() for operations with void return type.
Definition: error.hpp:168
bool exec_and_throw_on_error(const Func &func, Ret *ret, Error_code *err_code, util::String_view context)
Helper for FLOW_ERROR_EXEC_AND_THROW_ON_ERROR() macro that does everything in the latter not needing ...
Definition: error.hpp:128
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
diff --git a/doc/flow_doc/generated/html_full/event__set_8cpp.html b/doc/flow_doc/generated/html_full/event__set_8cpp.html index d773665b6..c1812c2fe 100644 --- a/doc/flow_doc/generated/html_full/event__set_8cpp.html +++ b/doc/flow_doc/generated/html_full/event__set_8cpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_full/event__set_8cpp_source.html b/doc/flow_doc/generated/html_full/event__set_8cpp_source.html index 96551f54a..2589ac36b 100644 --- a/doc/flow_doc/generated/html_full/event__set_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/event__set_8cpp_source.html @@ -1666,7 +1666,7 @@
bool clear_result_sockets(Event_type ev_type, Error_code *err_code=0)
Identical to emit_result_sockets(&sockets, ev_type, err_code), where originally sockets is empty and ...
Definition: event_set.cpp:649
util::Linked_hash_map< Event_type, Sockets > Ev_type_to_socks_map
Short-hand for type storing a set of socket sets – one per possible Event_type enum value.
Definition: event_set.hpp:798
An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
Definition: node.hpp:937
-
bool sock_is_writable(const boost::any &sock_as_any) const
Returns true if and only if calling sock->send() with at least some arguments would return either non...
+
bool sock_is_writable(const boost::any &sock_as_any) const
Returns true if and only if calling sock->send() with at least some arguments would return either non...
void interrupt_all_waits(Error_code *err_code=0)
Interrupts any blocking operation, a/k/a wait, and informs the invoker of that operation that the blo...
Definition: event_set.cpp:1392
bool event_set_check_baseline(Event_set::Ptr event_set)
Checks each desired (Event_set::m_want) event in event_set; any that holds true is saved into event_s...
Definition: event_set.cpp:1017
void event_set_close(Event_set::Ptr event_set, Error_code *err_code)
Implementation of Event_set::close() when Event_set::state() != Event_set::State::S_CLOSED for event_...
Definition: event_set.cpp:1273
@@ -1675,7 +1675,7 @@
void event_set_close_worker(Event_set::Ptr event_set)
The guts of event_set_close_worker_check_state(): same thing, but assumes Event_set::state() == Event...
Definition: event_set.cpp:1332
void event_set_all_check_delta(bool defer_delta_check)
For each WAITING Event_set within the Node: checks for any events that hold, and if any do hold,...
Definition: event_set.cpp:1129
bool event_set_async_wait(Event_set::Ptr event_set, const Event_set::Event_handler &on_event, Error_code *err_code)
Implementation of Event_set::async_wait() when Event_set::state() == Event_set::State::S_INACTIVE.
Definition: event_set.cpp:917
-
bool sock_is_readable(const boost::any &sock_as_any) const
Returns true if and only if calling sock->receive() with at least some arguments would return either ...
+
bool sock_is_readable(const boost::any &sock_as_any) const
Returns true if and only if calling sock->receive() with at least some arguments would return either ...
Event_set::Ptr event_set_create(Error_code *err_code=0)
Creates a new Event_set in Event_set::State::S_INACTIVE state with no sockets/events stored; returns ...
Definition: event_set.cpp:881
void interrupt_all_waits_worker()
Thread W implementation of interrupt_all_waits().
Definition: event_set.cpp:1421
void interrupt_all_waits_internal_sig_handler(const Error_code &sys_err_code, int sig_number)
signal_set handler, executed on SIGINT and SIGTERM, if user has enabled this feature: causes interrup...
Definition: event_set.cpp:1456
@@ -1707,11 +1707,11 @@
@ S_EVENT_SET_CLOSED
Attempted operation on an event set, when that event set was closed.
@ S_NODE_NOT_RUNNING
Node not running.
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
Definition: node.cpp:25
-
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:276
-
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:342
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:633
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
bool key_exists(const Container &container, const typename Container::key_type &key)
Returns true if and only if the given key is present at least once in the given associative container...
Definition: util.hpp:301
+
void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
Definition: util.hpp:367
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
Definition: common.hpp:638
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
@@ -1719,7 +1719,7 @@ diff --git a/doc/flow_doc/generated/html_full/event__set_8hpp.html b/doc/flow_doc/generated/html_full/event__set_8hpp.html index 84d5ba700..6122e435f 100644 --- a/doc/flow_doc/generated/html_full/event__set_8hpp.html +++ b/doc/flow_doc/generated/html_full/event__set_8hpp.html @@ -118,7 +118,7 @@ diff --git a/doc/flow_doc/generated/html_full/event__set_8hpp_source.html b/doc/flow_doc/generated/html_full/event__set_8hpp_source.html index bd608fcf2..a1fef0eb5 100644 --- a/doc/flow_doc/generated/html_full/event__set_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/event__set_8hpp_source.html @@ -1231,8 +1231,8 @@
boost::unique_lock< Mutex > Lock_guard
Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
Definition: util_fwd.hpp:265
boost::recursive_mutex Mutex_recursive
Short-hand for reentrant, exclusive mutex.
Definition: util_fwd.hpp:218
Fine_duration chrono_duration_to_fine_duration(const boost::chrono::duration< Rep, Period > &dur)
Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
Definition: util.hpp:31
-
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:503
-
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:411
+
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
Definition: common.hpp:508
+
Fine_clock::duration Fine_duration
A high-res time duration as computed from two Fine_time_pts.
Definition: common.hpp:416
@@ -1240,7 +1240,7 @@ diff --git a/doc/flow_doc/generated/html_full/files.html b/doc/flow_doc/generated/html_full/files.html index 63ac0694f..69e05f406 100644 --- a/doc/flow_doc/generated/html_full/files.html +++ b/doc/flow_doc/generated/html_full/files.html @@ -236,7 +236,7 @@ diff --git a/doc/flow_doc/generated/html_full/fmt_8hpp.html b/doc/flow_doc/generated/html_full/fmt_8hpp.html index e6b8dcbaf..cb1a38292 100644 --- a/doc/flow_doc/generated/html_full/fmt_8hpp.html +++ b/doc/flow_doc/generated/html_full/fmt_8hpp.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_full/fmt_8hpp_source.html b/doc/flow_doc/generated/html_full/fmt_8hpp_source.html index 618bad698..b1c8a0158 100644 --- a/doc/flow_doc/generated/html_full/fmt_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/fmt_8hpp_source.html @@ -119,7 +119,7 @@ diff --git a/doc/flow_doc/generated/html_full/functions.html b/doc/flow_doc/generated/html_full/functions.html index b0c43a5db..064bbd2a7 100644 --- a/doc/flow_doc/generated/html_full/functions.html +++ b/doc/flow_doc/generated/html_full/functions.html @@ -131,7 +131,7 @@

- a -

    diff --git a/doc/flow_doc/generated/html_full/functions_b.html b/doc/flow_doc/generated/html_full/functions_b.html index 5cfdb83ca..b2cd0350c 100644 --- a/doc/flow_doc/generated/html_full/functions_b.html +++ b/doc/flow_doc/generated/html_full/functions_b.html @@ -88,7 +88,7 @@

    - b -

      diff --git a/doc/flow_doc/generated/html_full/functions_c.html b/doc/flow_doc/generated/html_full/functions_c.html index dd0989dc6..a54c56eb1 100644 --- a/doc/flow_doc/generated/html_full/functions_c.html +++ b/doc/flow_doc/generated/html_full/functions_c.html @@ -126,14 +126,14 @@

      - c -

      • const_data() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
      • const_end() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
      • const_front() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
      • -
      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
      • const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
      • -
      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
      • +
      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
      • const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
      • -
      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
      • +
      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
      • const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
      • -
      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
      • +
      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
      • const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
      • +
      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
      • const_newest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
      • const_oldest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
      • const_past_newest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
      • @@ -170,7 +170,7 @@

        - c -

          diff --git a/doc/flow_doc/generated/html_full/functions_d.html b/doc/flow_doc/generated/html_full/functions_d.html index a4b6d2a32..c512d2b34 100644 --- a/doc/flow_doc/generated/html_full/functions_d.html +++ b/doc/flow_doc/generated/html_full/functions_d.html @@ -105,7 +105,7 @@

          - d -

            diff --git a/doc/flow_doc/generated/html_full/functions_e.html b/doc/flow_doc/generated/html_full/functions_e.html index f7ee08309..6d8c3b8f3 100644 --- a/doc/flow_doc/generated/html_full/functions_e.html +++ b/doc/flow_doc/generated/html_full/functions_e.html @@ -101,7 +101,7 @@

            - e -

              diff --git a/doc/flow_doc/generated/html_full/functions_enum.html b/doc/flow_doc/generated/html_full/functions_enum.html index 1380bc65b..df93cdb79 100644 --- a/doc/flow_doc/generated/html_full/functions_enum.html +++ b/doc/flow_doc/generated/html_full/functions_enum.html @@ -76,7 +76,7 @@ diff --git a/doc/flow_doc/generated/html_full/functions_eval.html b/doc/flow_doc/generated/html_full/functions_eval.html index ee2f93196..e64f7ae80 100644 --- a/doc/flow_doc/generated/html_full/functions_eval.html +++ b/doc/flow_doc/generated/html_full/functions_eval.html @@ -69,7 +69,7 @@ diff --git a/doc/flow_doc/generated/html_full/functions_f.html b/doc/flow_doc/generated/html_full/functions_f.html index 9d5b8e710..98d908b16 100644 --- a/doc/flow_doc/generated/html_full/functions_f.html +++ b/doc/flow_doc/generated/html_full/functions_f.html @@ -80,7 +80,7 @@

              - f -

                diff --git a/doc/flow_doc/generated/html_full/functions_func.html b/doc/flow_doc/generated/html_full/functions_func.html index 8ac31da11..a9687ea2f 100644 --- a/doc/flow_doc/generated/html_full/functions_func.html +++ b/doc/flow_doc/generated/html_full/functions_func.html @@ -126,7 +126,7 @@

                - a -

                  diff --git a/doc/flow_doc/generated/html_full/functions_func_b.html b/doc/flow_doc/generated/html_full/functions_func_b.html index aae19af7a..9ae827b55 100644 --- a/doc/flow_doc/generated/html_full/functions_func_b.html +++ b/doc/flow_doc/generated/html_full/functions_func_b.html @@ -83,7 +83,7 @@

                  - b -

                    diff --git a/doc/flow_doc/generated/html_full/functions_func_c.html b/doc/flow_doc/generated/html_full/functions_func_c.html index 527a76941..d59af7874 100644 --- a/doc/flow_doc/generated/html_full/functions_func_c.html +++ b/doc/flow_doc/generated/html_full/functions_func_c.html @@ -144,7 +144,7 @@

                    - c -

                      diff --git a/doc/flow_doc/generated/html_full/functions_func_d.html b/doc/flow_doc/generated/html_full/functions_func_d.html index ba405800c..aab38c833 100644 --- a/doc/flow_doc/generated/html_full/functions_func_d.html +++ b/doc/flow_doc/generated/html_full/functions_func_d.html @@ -100,7 +100,7 @@

                      - d -

                        diff --git a/doc/flow_doc/generated/html_full/functions_func_e.html b/doc/flow_doc/generated/html_full/functions_func_e.html index d6267be96..a7f20069a 100644 --- a/doc/flow_doc/generated/html_full/functions_func_e.html +++ b/doc/flow_doc/generated/html_full/functions_func_e.html @@ -95,7 +95,7 @@

                        - e -

                          diff --git a/doc/flow_doc/generated/html_full/functions_func_f.html b/doc/flow_doc/generated/html_full/functions_func_f.html index 1e7cf60e1..115fb6596 100644 --- a/doc/flow_doc/generated/html_full/functions_func_f.html +++ b/doc/flow_doc/generated/html_full/functions_func_f.html @@ -76,7 +76,7 @@

                          - f -

                            diff --git a/doc/flow_doc/generated/html_full/functions_func_g.html b/doc/flow_doc/generated/html_full/functions_func_g.html index 964d489bd..4d8a2ae47 100644 --- a/doc/flow_doc/generated/html_full/functions_func_g.html +++ b/doc/flow_doc/generated/html_full/functions_func_g.html @@ -87,7 +87,7 @@

                            - g -

                              diff --git a/doc/flow_doc/generated/html_full/functions_func_h.html b/doc/flow_doc/generated/html_full/functions_func_h.html index 69d31acd0..5bc2fdd1f 100644 --- a/doc/flow_doc/generated/html_full/functions_func_h.html +++ b/doc/flow_doc/generated/html_full/functions_func_h.html @@ -88,7 +88,7 @@

                              - h -

                                diff --git a/doc/flow_doc/generated/html_full/functions_func_i.html b/doc/flow_doc/generated/html_full/functions_func_i.html index 59523ea4d..d07b402fe 100644 --- a/doc/flow_doc/generated/html_full/functions_func_i.html +++ b/doc/flow_doc/generated/html_full/functions_func_i.html @@ -69,7 +69,6 @@

                                - i -

                                • idle_timeout() : flow::net_flow::Peer_socket_send_stats_accumulator
                                • in_slow_start() : flow::net_flow::Congestion_control_classic_data
                                • in_thread() : flow::async::Single_thread_task_loop
                                • -
                                • Individual_ack() : flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack
                                • Individual_ack_rexmit_off() : flow::net_flow::Ack_packet::Individual_ack_rexmit_off
                                • Individual_ack_rexmit_on() : flow::net_flow::Ack_packet::Individual_ack_rexmit_on
                                • info() : flow::net_flow::Peer_socket
                                • @@ -88,7 +87,7 @@

                                  - i -

                                    diff --git a/doc/flow_doc/generated/html_full/functions_func_l.html b/doc/flow_doc/generated/html_full/functions_func_l.html index 31a59e60f..42aa8c778 100644 --- a/doc/flow_doc/generated/html_full/functions_func_l.html +++ b/doc/flow_doc/generated/html_full/functions_func_l.html @@ -102,7 +102,7 @@

                                    - l -

                                      diff --git a/doc/flow_doc/generated/html_full/functions_func_m.html b/doc/flow_doc/generated/html_full/functions_func_m.html index 327e825bd..9eb4a9d48 100644 --- a/doc/flow_doc/generated/html_full/functions_func_m.html +++ b/doc/flow_doc/generated/html_full/functions_func_m.html @@ -79,7 +79,7 @@

                                      - m -

                                        diff --git a/doc/flow_doc/generated/html_full/functions_func_n.html b/doc/flow_doc/generated/html_full/functions_func_n.html index 463bdcae4..266fd9c00 100644 --- a/doc/flow_doc/generated/html_full/functions_func_n.html +++ b/doc/flow_doc/generated/html_full/functions_func_n.html @@ -82,6 +82,7 @@

                                        - n -

                                        • node_send() : flow::net_flow::Peer_socket
                                        • node_sync_receive() : flow::net_flow::Peer_socket
                                        • node_sync_send() : flow::net_flow::Peer_socket
                                        • +
                                        • Noncopyable() : flow::util::Noncopyable
                                        • normalize_component_name() : flow::log::Config
                                        • normalized_component_name() : flow::log::Config
                                        • now() : flow::perf::Checkpointing_timer
                                        • @@ -92,7 +93,7 @@

                                          - n -

                                            diff --git a/doc/flow_doc/generated/html_full/functions_func_o.html b/doc/flow_doc/generated/html_full/functions_func_o.html index 15777e61f..f31383cce 100644 --- a/doc/flow_doc/generated/html_full/functions_func_o.html +++ b/doc/flow_doc/generated/html_full/functions_func_o.html @@ -93,7 +93,7 @@

                                            - o -

                                            • operator<() : flow::net_flow::Sequence_number
                                            • operator<<() : flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >, flow::log::Verbosity_config, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket, flow::net_flow::Event_set, flow::net_flow::Peer_socket, flow::net_flow::Peer_socket_info, flow::net_flow::Peer_socket_options, flow::net_flow::Peer_socket_receive_stats, flow::net_flow::Peer_socket_send_stats, flow::net_flow::Remote_endpoint, flow::net_flow::Server_socket, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer, flow::perf::Duration_set
                                            • operator<=() : flow::net_flow::Sequence_number
                                            • -
                                            • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack, flow::net_flow::Sequence_number, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                            • +
                                            • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::net_flow::Sequence_number, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Noncopyable, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                            • operator==() : flow::log::Verbosity_config, flow::net_flow::Node::Socket_id, flow::net_flow::Remote_endpoint, flow::net_flow::Sequence_number
                                            • operator>() : flow::net_flow::Sequence_number
                                            • operator>=() : flow::net_flow::Sequence_number
                                            • @@ -119,7 +119,7 @@

                                              - o -

                                                diff --git a/doc/flow_doc/generated/html_full/functions_func_p.html b/doc/flow_doc/generated/html_full/functions_func_p.html index 89f5019cf..a0d07e480 100644 --- a/doc/flow_doc/generated/html_full/functions_func_p.html +++ b/doc/flow_doc/generated/html_full/functions_func_p.html @@ -96,7 +96,7 @@

                                                - p -

                                                  diff --git a/doc/flow_doc/generated/html_full/functions_func_r.html b/doc/flow_doc/generated/html_full/functions_func_r.html index da443f0db..719a638ba 100644 --- a/doc/flow_doc/generated/html_full/functions_func_r.html +++ b/doc/flow_doc/generated/html_full/functions_func_r.html @@ -107,7 +107,7 @@

                                                  - r -

                                                    diff --git a/doc/flow_doc/generated/html_full/functions_func_s.html b/doc/flow_doc/generated/html_full/functions_func_s.html index d17119e44..ad9faa15e 100644 --- a/doc/flow_doc/generated/html_full/functions_func_s.html +++ b/doc/flow_doc/generated/html_full/functions_func_s.html @@ -205,7 +205,7 @@

                                                    - s -

                                                      diff --git a/doc/flow_doc/generated/html_full/functions_func_t.html b/doc/flow_doc/generated/html_full/functions_func_t.html index 8fae7f608..5b0a2e645 100644 --- a/doc/flow_doc/generated/html_full/functions_func_t.html +++ b/doc/flow_doc/generated/html_full/functions_func_t.html @@ -95,7 +95,7 @@

                                                      - t -

                                                        diff --git a/doc/flow_doc/generated/html_full/functions_func_u.html b/doc/flow_doc/generated/html_full/functions_func_u.html index 01dd3d9cf..a744dcedf 100644 --- a/doc/flow_doc/generated/html_full/functions_func_u.html +++ b/doc/flow_doc/generated/html_full/functions_func_u.html @@ -75,7 +75,7 @@

                                                        - u -

                                                          diff --git a/doc/flow_doc/generated/html_full/functions_func_v.html b/doc/flow_doc/generated/html_full/functions_func_v.html index 3b808a6f6..25443ee00 100644 --- a/doc/flow_doc/generated/html_full/functions_func_v.html +++ b/doc/flow_doc/generated/html_full/functions_func_v.html @@ -82,7 +82,7 @@

                                                          - v -

                                                            diff --git a/doc/flow_doc/generated/html_full/functions_func_w.html b/doc/flow_doc/generated/html_full/functions_func_w.html index cf2cd2833..311640921 100644 --- a/doc/flow_doc/generated/html_full/functions_func_w.html +++ b/doc/flow_doc/generated/html_full/functions_func_w.html @@ -72,7 +72,7 @@

                                                            - w -

                                                              diff --git a/doc/flow_doc/generated/html_full/functions_func_z.html b/doc/flow_doc/generated/html_full/functions_func_z.html index d80cf9164..2d432c3ee 100644 --- a/doc/flow_doc/generated/html_full/functions_func_z.html +++ b/doc/flow_doc/generated/html_full/functions_func_z.html @@ -71,7 +71,7 @@

                                                              - z -

                                                                diff --git a/doc/flow_doc/generated/html_full/functions_func_~.html b/doc/flow_doc/generated/html_full/functions_func_~.html index c0f081f91..05d8a637e 100644 --- a/doc/flow_doc/generated/html_full/functions_func_~.html +++ b/doc/flow_doc/generated/html_full/functions_func_~.html @@ -87,7 +87,7 @@

                                                                - ~ -

                                                                  diff --git a/doc/flow_doc/generated/html_full/functions_g.html b/doc/flow_doc/generated/html_full/functions_g.html index b266601a2..91ef87854 100644 --- a/doc/flow_doc/generated/html_full/functions_g.html +++ b/doc/flow_doc/generated/html_full/functions_g.html @@ -88,7 +88,7 @@

                                                                  - g -

                                                                    diff --git a/doc/flow_doc/generated/html_full/functions_h.html b/doc/flow_doc/generated/html_full/functions_h.html index af464d2fd..2ad5f08e9 100644 --- a/doc/flow_doc/generated/html_full/functions_h.html +++ b/doc/flow_doc/generated/html_full/functions_h.html @@ -94,7 +94,7 @@

                                                                    - h -

                                                                      diff --git a/doc/flow_doc/generated/html_full/functions_i.html b/doc/flow_doc/generated/html_full/functions_i.html index 0b34a664b..11c815b41 100644 --- a/doc/flow_doc/generated/html_full/functions_i.html +++ b/doc/flow_doc/generated/html_full/functions_i.html @@ -71,7 +71,6 @@

                                                                      - i -

                                                                      • Impl : flow::async::Timed_concurrent_task_loop, flow::cfg::Static_config_manager< Value_set >
                                                                      • in_slow_start() : flow::net_flow::Congestion_control_classic_data
                                                                      • in_thread() : flow::async::Single_thread_task_loop
                                                                      • -
                                                                      • Individual_ack() : flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack
                                                                      • Individual_ack_rexmit_off() : flow::net_flow::Ack_packet::Individual_ack_rexmit_off
                                                                      • Individual_ack_rexmit_on() : flow::net_flow::Ack_packet::Individual_ack_rexmit_on
                                                                      • info() : flow::net_flow::Peer_socket
                                                                      • @@ -100,7 +99,7 @@

                                                                        - i -

                                                                          diff --git a/doc/flow_doc/generated/html_full/functions_k.html b/doc/flow_doc/generated/html_full/functions_k.html index 3f222ef04..f51c6e6fc 100644 --- a/doc/flow_doc/generated/html_full/functions_k.html +++ b/doc/flow_doc/generated/html_full/functions_k.html @@ -73,7 +73,7 @@

                                                                          - k -

                                                                            diff --git a/doc/flow_doc/generated/html_full/functions_l.html b/doc/flow_doc/generated/html_full/functions_l.html index c2fe2393a..99ec34598 100644 --- a/doc/flow_doc/generated/html_full/functions_l.html +++ b/doc/flow_doc/generated/html_full/functions_l.html @@ -106,7 +106,7 @@

                                                                            - l -

                                                                              diff --git a/doc/flow_doc/generated/html_full/functions_m.html b/doc/flow_doc/generated/html_full/functions_m.html index 59cc5899e..aef3ad3a5 100644 --- a/doc/flow_doc/generated/html_full/functions_m.html +++ b/doc/flow_doc/generated/html_full/functions_m.html @@ -234,6 +234,7 @@

                                                                              - m -

                                                                              • m_mutex_unless_single_threaded : flow::util::Scheduled_task_handle_state
                                                                              • m_n_threads_or_zero : flow::async::Cross_thread_task_loop, flow::async::Segregated_thread_task_loop
                                                                              • m_name : flow::perf::Checkpointing_timer::Aggregator, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer
                                                                              • +
                                                                              • m_nc : flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack
                                                                              • m_net_env_sim : flow::net_flow::Node
                                                                              • m_nickname : flow::async::Cross_thread_task_loop, flow::async::Segregated_thread_task_loop, flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >
                                                                              • m_no_acks_yet : flow::net_flow::Send_bandwidth_estimator
                                                                              • @@ -502,7 +503,7 @@

                                                                                - m -

                                                                                  diff --git a/doc/flow_doc/generated/html_full/functions_n.html b/doc/flow_doc/generated/html_full/functions_n.html index e6ec4d7f3..c95274af0 100644 --- a/doc/flow_doc/generated/html_full/functions_n.html +++ b/doc/flow_doc/generated/html_full/functions_n.html @@ -76,15 +76,17 @@

                                                                                  - n -

                                                                                  • newest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                  • Node() : flow::net_flow::asio::Node, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket
                                                                                  • node() : flow::net_flow::Event_set
                                                                                  • -
                                                                                  • Node : flow::net_flow::Event_set, flow::net_flow::Node, flow::net_flow::Node_options, flow::net_flow::Peer_socket
                                                                                  • -
                                                                                  • node() : flow::net_flow::Peer_socket, flow::net_flow::Server_socket
                                                                                  • -
                                                                                  • Node : flow::net_flow::Server_socket
                                                                                  • +
                                                                                  • Node : flow::net_flow::Event_set, flow::net_flow::Node, flow::net_flow::Node_options
                                                                                  • +
                                                                                  • node() : flow::net_flow::Peer_socket
                                                                                  • +
                                                                                  • Node : flow::net_flow::Peer_socket, flow::net_flow::Server_socket
                                                                                  • +
                                                                                  • node() : flow::net_flow::Server_socket
                                                                                  • Node_options() : flow::net_flow::Node_options, flow::net_flow::Peer_socket_options
                                                                                  • node_or_post_error() : flow::net_flow::asio::Peer_socket
                                                                                  • node_receive() : flow::net_flow::Peer_socket
                                                                                  • node_send() : flow::net_flow::Peer_socket
                                                                                  • node_sync_receive() : flow::net_flow::Peer_socket
                                                                                  • node_sync_send() : flow::net_flow::Peer_socket
                                                                                  • +
                                                                                  • Noncopyable() : flow::util::Noncopyable
                                                                                  • normalize_component_name() : flow::log::Config
                                                                                  • normalized_component_name() : flow::log::Config
                                                                                  • now() : flow::perf::Checkpointing_timer
                                                                                  • @@ -95,7 +97,7 @@

                                                                                    - n -

                                                                                      diff --git a/doc/flow_doc/generated/html_full/functions_o.html b/doc/flow_doc/generated/html_full/functions_o.html index 8ceac9acb..a89491c5b 100644 --- a/doc/flow_doc/generated/html_full/functions_o.html +++ b/doc/flow_doc/generated/html_full/functions_o.html @@ -93,9 +93,9 @@

                                                                                      - o -

                                                                                      • operator-=() : flow::net_flow::Sequence_number
                                                                                      • operator/=() : flow::perf::Duration_set
                                                                                      • operator<() : flow::net_flow::Sequence_number
                                                                                      • -
                                                                                      • operator<<() : flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >, flow::log::Verbosity_config, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket, flow::net_flow::Congestion_control_selector, flow::net_flow::Event_set, flow::net_flow::Node_options, flow::net_flow::Peer_socket, flow::net_flow::Peer_socket_info, flow::net_flow::Peer_socket_options, flow::net_flow::Peer_socket_receive_stats, flow::net_flow::Peer_socket_send_stats, flow::net_flow::Remote_endpoint, flow::net_flow::Sequence_number, flow::net_flow::Server_socket, flow::net_flow::Socket_buffer, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer, flow::perf::Duration_set
                                                                                      • +
                                                                                      • operator<<() : flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >, flow::log::Verbosity_config, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket, flow::net_flow::Congestion_control_selector, flow::net_flow::Event_set, flow::net_flow::Node_options, flow::net_flow::Peer_socket, flow::net_flow::Peer_socket_info, flow::net_flow::Peer_socket_options, flow::net_flow::Peer_socket_receive_stats, flow::net_flow::Peer_socket_send_stats, flow::net_flow::Remote_endpoint, flow::net_flow::Sequence_number, flow::net_flow::Server_socket, flow::net_flow::Socket_buffer, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer, flow::perf::Duration_set
                                                                                      • operator<=() : flow::net_flow::Sequence_number
                                                                                      • -
                                                                                      • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack, flow::net_flow::Sequence_number, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                      • +
                                                                                      • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::net_flow::Sequence_number, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Noncopyable, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                      • operator==() : flow::log::Verbosity_config, flow::net_flow::Node, flow::net_flow::Node::Socket_id, flow::net_flow::Remote_endpoint, flow::net_flow::Sequence_number
                                                                                      • operator>() : flow::net_flow::Sequence_number
                                                                                      • operator>=() : flow::net_flow::Sequence_number
                                                                                      • @@ -128,7 +128,7 @@

                                                                                        - o -

                                                                                          diff --git a/doc/flow_doc/generated/html_full/functions_p.html b/doc/flow_doc/generated/html_full/functions_p.html index 8cec89001..2f97c1882 100644 --- a/doc/flow_doc/generated/html_full/functions_p.html +++ b/doc/flow_doc/generated/html_full/functions_p.html @@ -106,7 +106,7 @@

                                                                                          - p -

                                                                                            diff --git a/doc/flow_doc/generated/html_full/functions_q.html b/doc/flow_doc/generated/html_full/functions_q.html index 869947043..742b182ab 100644 --- a/doc/flow_doc/generated/html_full/functions_q.html +++ b/doc/flow_doc/generated/html_full/functions_q.html @@ -71,7 +71,7 @@

                                                                                            - q -

                                                                                              diff --git a/doc/flow_doc/generated/html_full/functions_r.html b/doc/flow_doc/generated/html_full/functions_r.html index 44a575a97..09fe82255 100644 --- a/doc/flow_doc/generated/html_full/functions_r.html +++ b/doc/flow_doc/generated/html_full/functions_r.html @@ -118,7 +118,7 @@

                                                                                              - r -

                                                                                                diff --git a/doc/flow_doc/generated/html_full/functions_rela.html b/doc/flow_doc/generated/html_full/functions_rela.html index 19939ab5a..40ff2ae2a 100644 --- a/doc/flow_doc/generated/html_full/functions_rela.html +++ b/doc/flow_doc/generated/html_full/functions_rela.html @@ -124,7 +124,7 @@

                                                                                                - s -

                                                                                                  diff --git a/doc/flow_doc/generated/html_full/functions_s.html b/doc/flow_doc/generated/html_full/functions_s.html index 1b017ba1a..3b93a1659 100644 --- a/doc/flow_doc/generated/html_full/functions_s.html +++ b/doc/flow_doc/generated/html_full/functions_s.html @@ -231,12 +231,12 @@

                                                                                                  - s -

                                                                                                  • start_past_prefix_inc() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                  • start_timer() : flow::net_flow::Drop_timer
                                                                                                  • starts_with() : flow::util::Basic_string_view< Ch, Traits >
                                                                                                  • -
                                                                                                  • State : flow::net_flow::Event_set
                                                                                                  • state() : flow::net_flow::Event_set
                                                                                                  • -
                                                                                                  • State : flow::net_flow::Peer_socket
                                                                                                  • +
                                                                                                  • State : flow::net_flow::Event_set
                                                                                                  • state() : flow::net_flow::Peer_socket
                                                                                                  • -
                                                                                                  • State : flow::net_flow::Server_socket
                                                                                                  • +
                                                                                                  • State : flow::net_flow::Peer_socket
                                                                                                  • state() : flow::net_flow::Server_socket
                                                                                                  • +
                                                                                                  • State : flow::net_flow::Server_socket
                                                                                                  • state_to_ostream() : flow::cfg::Config_manager< S_d_value_set >
                                                                                                  • state_to_ostream_impl() : flow::cfg::Config_manager< S_d_value_set >
                                                                                                  • Static_config_manager() : flow::cfg::Static_config_manager< Value_set >
                                                                                                  • @@ -276,7 +276,7 @@

                                                                                                    - s -

                                                                                                      diff --git a/doc/flow_doc/generated/html_full/functions_t.html b/doc/flow_doc/generated/html_full/functions_t.html index 13b888d2c..042f7f7a1 100644 --- a/doc/flow_doc/generated/html_full/functions_t.html +++ b/doc/flow_doc/generated/html_full/functions_t.html @@ -106,7 +106,7 @@

                                                                                                      - t -

                                                                                                        diff --git a/doc/flow_doc/generated/html_full/functions_type.html b/doc/flow_doc/generated/html_full/functions_type.html index 4142ad54a..7ee963b2b 100644 --- a/doc/flow_doc/generated/html_full/functions_type.html +++ b/doc/flow_doc/generated/html_full/functions_type.html @@ -93,13 +93,13 @@

                                                                                                        - c -

                                                                                                        • Component_union_idx_to_sev_map : flow::log::Config
                                                                                                        • Const_buffer : flow::net_flow::Low_lvl_packet
                                                                                                        • Const_buffer_sequence : flow::net_flow::Low_lvl_packet
                                                                                                        • -
                                                                                                        • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                        • const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                        • -
                                                                                                        • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                        • +
                                                                                                        • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                        • const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                        • -
                                                                                                        • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                        • -
                                                                                                        • const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • -
                                                                                                        • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • +
                                                                                                        • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                        • +
                                                                                                        • const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                        • +
                                                                                                        • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • +
                                                                                                        • const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • const_pointer : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • Const_ptr : flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack, flow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >
                                                                                                        • const_reference : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                        • @@ -289,7 +289,7 @@

                                                                                                          - v -

                                                                                                            diff --git a/doc/flow_doc/generated/html_full/functions_u.html b/doc/flow_doc/generated/html_full/functions_u.html index 83e8bb9d5..966a4542b 100644 --- a/doc/flow_doc/generated/html_full/functions_u.html +++ b/doc/flow_doc/generated/html_full/functions_u.html @@ -77,7 +77,7 @@

                                                                                                            - u -

                                                                                                              diff --git a/doc/flow_doc/generated/html_full/functions_v.html b/doc/flow_doc/generated/html_full/functions_v.html index c0320788f..01ad929f8 100644 --- a/doc/flow_doc/generated/html_full/functions_v.html +++ b/doc/flow_doc/generated/html_full/functions_v.html @@ -92,7 +92,7 @@

                                                                                                              - v -

                                                                                                                diff --git a/doc/flow_doc/generated/html_full/functions_vars.html b/doc/flow_doc/generated/html_full/functions_vars.html index c188336f7..1a8af80a1 100644 --- a/doc/flow_doc/generated/html_full/functions_vars.html +++ b/doc/flow_doc/generated/html_full/functions_vars.html @@ -234,6 +234,7 @@

                                                                                                                - m -

                                                                                                                • m_mutex_unless_single_threaded : flow::util::Scheduled_task_handle_state
                                                                                                                • m_n_threads_or_zero : flow::async::Cross_thread_task_loop, flow::async::Segregated_thread_task_loop
                                                                                                                • m_name : flow::perf::Checkpointing_timer::Aggregator, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer
                                                                                                                • +
                                                                                                                • m_nc : flow::net_flow::Ack_packet::Individual_ack, flow::net_flow::Peer_socket::Individual_ack
                                                                                                                • m_net_env_sim : flow::net_flow::Node
                                                                                                                • m_nickname : flow::async::Cross_thread_task_loop, flow::async::Segregated_thread_task_loop, flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >
                                                                                                                • m_no_acks_yet : flow::net_flow::Send_bandwidth_estimator
                                                                                                                • @@ -490,7 +491,7 @@

                                                                                                                  - m -

                                                                                                                    diff --git a/doc/flow_doc/generated/html_full/functions_vars_s.html b/doc/flow_doc/generated/html_full/functions_vars_s.html index caa63ad34..b9e6e9845 100644 --- a/doc/flow_doc/generated/html_full/functions_vars_s.html +++ b/doc/flow_doc/generated/html_full/functions_vars_s.html @@ -116,7 +116,7 @@

                                                                                                                    - s -

                                                                                                                      diff --git a/doc/flow_doc/generated/html_full/functions_vars_v.html b/doc/flow_doc/generated/html_full/functions_vars_v.html index 18683f7fb..fb3f83d9a 100644 --- a/doc/flow_doc/generated/html_full/functions_vars_v.html +++ b/doc/flow_doc/generated/html_full/functions_vars_v.html @@ -71,7 +71,7 @@

                                                                                                                      - v -

                                                                                                                        diff --git a/doc/flow_doc/generated/html_full/functions_w.html b/doc/flow_doc/generated/html_full/functions_w.html index b90345980..b6a292d90 100644 --- a/doc/flow_doc/generated/html_full/functions_w.html +++ b/doc/flow_doc/generated/html_full/functions_w.html @@ -72,7 +72,7 @@

                                                                                                                        - w -

                                                                                                                          diff --git a/doc/flow_doc/generated/html_full/functions_z.html b/doc/flow_doc/generated/html_full/functions_z.html index 9a94c1866..9fcc6b8da 100644 --- a/doc/flow_doc/generated/html_full/functions_z.html +++ b/doc/flow_doc/generated/html_full/functions_z.html @@ -71,7 +71,7 @@

                                                                                                                          - z -

                                                                                                                            diff --git a/doc/flow_doc/generated/html_full/functions_~.html b/doc/flow_doc/generated/html_full/functions_~.html index 2e520ee36..32457b185 100644 --- a/doc/flow_doc/generated/html_full/functions_~.html +++ b/doc/flow_doc/generated/html_full/functions_~.html @@ -87,7 +87,7 @@

                                                                                                                            - ~ -

                                                                                                                              diff --git a/doc/flow_doc/generated/html_full/globals.html b/doc/flow_doc/generated/html_full/globals.html index 175e9e789..2e16624c9 100644 --- a/doc/flow_doc/generated/html_full/globals.html +++ b/doc/flow_doc/generated/html_full/globals.html @@ -117,7 +117,7 @@

                                                                                                                              - f -

                                                                                                                                diff --git a/doc/flow_doc/generated/html_full/globals_defs.html b/doc/flow_doc/generated/html_full/globals_defs.html index 7d24d5b48..04b1eef1a 100644 --- a/doc/flow_doc/generated/html_full/globals_defs.html +++ b/doc/flow_doc/generated/html_full/globals_defs.html @@ -117,7 +117,7 @@

                                                                                                                                - f -

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/graph_legend.html b/doc/flow_doc/generated/html_full/graph_legend.html index 35c35ee43..16babee8d 100644 --- a/doc/flow_doc/generated/html_full/graph_legend.html +++ b/doc/flow_doc/generated/html_full/graph_legend.html @@ -129,7 +129,7 @@ diff --git a/doc/flow_doc/generated/html_full/hierarchy.html b/doc/flow_doc/generated/html_full/hierarchy.html index c8b0e1d7c..184f25419 100644 --- a/doc/flow_doc/generated/html_full/hierarchy.html +++ b/doc/flow_doc/generated/html_full/hierarchy.html @@ -208,76 +208,77 @@  Cflow::util::Rnd_gen_uniform_range_mt< range_t >Identical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object  Cflow::util::Scheduled_task_handle_stateInternal-use data store used by schedule[d]_task_*(), each object containing the state relevant to a single call to either schedule_task_from_now() or schedule_task_at()  Cflow::util::String_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string - Cflow::util::Null_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor - Cflow::async::Concurrent_task_loopThe core flow::async interface, providing an optionally multi-threaded thread pool onto which runnable Tasks, optionally arranged into concurrency-avoiding Ops, can be boost.asio-posted for subsequent execution - Cflow::async::Timed_concurrent_task_loop_impl< std::atomic< perf::duration_rep_t > > - Cflow::async::Timed_concurrent_task_loopDecorates a general – potentially multi-threaded – Concurrent_task_loop of any kind but with timing capabilities - Cflow::async::Timed_concurrent_task_loop_impl< perf::duration_rep_t > - Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency - Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks - Cflow::async::Timed_concurrent_task_loop_impl< Time_accumulator >Decorator of a Concurrent_task_loop with same or greater lifetime that accumulates time elapsed in any tasks posted or scheduled onto that loop - Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved - Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) - Cflow::net_flow::Congestion_control_strategyThe abstract interface for a per-socket module that determines the socket's congestion control behavior - Cflow::net_flow::Low_lvl_packetInternal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as the super-type for all specific packet types, represented by derived structs like Ack_packet, Rst_packet, etc - Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer - Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support - Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established - Cflow::cfg::Config_manager< S_d_value_set >::On_dynamic_change_func_handleOpaque handle for managing a dynamic config change callback - Cflow::cfg::Option_set_baseUn-templated base for Option_set - Cflow::cfg::Option_set< Value_set >The core config-parsing facility, which builds parsing/comparison/output capabilities on top of a given simple config-holding object, of the type Value_set, a template argument to this class template - Cflow::net_flow::Low_lvl_packet::Packet_type_infoA simple, unmodifiable data store that contains the properties unique to each packet type a/k/a concrete sub-type of Low_lvl_packet - Cflow::net_flow::Peer_socket_infoA data store that keeps stats about the a Peer_socket connection - Cflow::net_flow::Peer_socket_optionsA set of low-level options affecting a single Peer_socket - Cflow::net_flow::Peer_socket_receive_statsA data store that keeps stats about the incoming direction of a Peer_socket connection to another Flow-protocol Peer_socket - Cflow::net_flow::Peer_socket_receive_stats_accumulatorA class that keeps a Peer_socket_receive_stats data store, includes methods to conveniently accumulate data in it, and provides output to ostream - Cflow::net_flow::Peer_socket_send_statsA data store that keeps stats about the outgoing direction of a Peer_socket connection to another Flow-protocol Peer_socket - Cflow::net_flow::Peer_socket_send_stats_accumulatorA class that keeps a Peer_socket_send_stats data store, includes methods to conveniently accumulate data in it, and provides output to ostream - Cflow::net_flow::Remote_endpointRepresents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remote Node and the logical Flow-protocol port within that Node - Cflow::util::Rnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved - Cflow::util::Rnd_gen_uniform_range< std::size_t > - Cflow::util::Rnd_gen_uniform_range< Peer_socket::security_token_t > - Cflow::util::Rnd_gen_uniform_range< range_t >Simple, non-thread-safe uniform-range random number generator - Cflow::util::Scoped_setter< Value >A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value - Cflow::net_flow::Peer_socket::Sent_packet::Sent_whenData store to keep timing related info when a packet is sent out - Cflow::net_flow::Sequence_numberAn internal net_flow sequence number identifying a piece of data - Cflow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >Convenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Drop_timer > > - Cflow::net_flow::Drop_timerInternal net_flow class that maintains the Drop Timer for DATA packet(s) to have been sent out over a connection but not yet acknowledged by the receiver - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Event_set > > - Cflow::net_flow::Event_setA user-set collection of sockets and desired conditions on those sockets (such as: "socket has data + Cflow::util::NoncopyableUseful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized) + Cflow::util::Null_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor + Cflow::async::Concurrent_task_loopThe core flow::async interface, providing an optionally multi-threaded thread pool onto which runnable Tasks, optionally arranged into concurrency-avoiding Ops, can be boost.asio-posted for subsequent execution + Cflow::async::Timed_concurrent_task_loop_impl< std::atomic< perf::duration_rep_t > > + Cflow::async::Timed_concurrent_task_loopDecorates a general – potentially multi-threaded – Concurrent_task_loop of any kind but with timing capabilities + Cflow::async::Timed_concurrent_task_loop_impl< perf::duration_rep_t > + Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency + Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks + Cflow::async::Timed_concurrent_task_loop_impl< Time_accumulator >Decorator of a Concurrent_task_loop with same or greater lifetime that accumulates time elapsed in any tasks posted or scheduled onto that loop + Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved + Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) + Cflow::net_flow::Congestion_control_strategyThe abstract interface for a per-socket module that determines the socket's congestion control behavior + Cflow::net_flow::Low_lvl_packetInternal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as the super-type for all specific packet types, represented by derived structs like Ack_packet, Rst_packet, etc + Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer + Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support + Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established + Cflow::cfg::Config_manager< S_d_value_set >::On_dynamic_change_func_handleOpaque handle for managing a dynamic config change callback + Cflow::cfg::Option_set_baseUn-templated base for Option_set + Cflow::cfg::Option_set< Value_set >The core config-parsing facility, which builds parsing/comparison/output capabilities on top of a given simple config-holding object, of the type Value_set, a template argument to this class template + Cflow::net_flow::Low_lvl_packet::Packet_type_infoA simple, unmodifiable data store that contains the properties unique to each packet type a/k/a concrete sub-type of Low_lvl_packet + Cflow::net_flow::Peer_socket_infoA data store that keeps stats about the a Peer_socket connection + Cflow::net_flow::Peer_socket_optionsA set of low-level options affecting a single Peer_socket + Cflow::net_flow::Peer_socket_receive_statsA data store that keeps stats about the incoming direction of a Peer_socket connection to another Flow-protocol Peer_socket + Cflow::net_flow::Peer_socket_receive_stats_accumulatorA class that keeps a Peer_socket_receive_stats data store, includes methods to conveniently accumulate data in it, and provides output to ostream + Cflow::net_flow::Peer_socket_send_statsA data store that keeps stats about the outgoing direction of a Peer_socket connection to another Flow-protocol Peer_socket + Cflow::net_flow::Peer_socket_send_stats_accumulatorA class that keeps a Peer_socket_send_stats data store, includes methods to conveniently accumulate data in it, and provides output to ostream + Cflow::net_flow::Remote_endpointRepresents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remote Node and the logical Flow-protocol port within that Node + Cflow::util::Rnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved + Cflow::util::Rnd_gen_uniform_range< std::size_t > + Cflow::util::Rnd_gen_uniform_range< Peer_socket::security_token_t > + Cflow::util::Rnd_gen_uniform_range< range_t >Simple, non-thread-safe uniform-range random number generator + Cflow::util::Scoped_setter< Value >A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value + Cflow::net_flow::Peer_socket::Sent_packet::Sent_whenData store to keep timing related info when a packet is sent out + Cflow::net_flow::Sequence_numberAn internal net_flow sequence number identifying a piece of data + Cflow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >Convenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Drop_timer > > + Cflow::net_flow::Drop_timerInternal net_flow class that maintains the Drop Timer for DATA packet(s) to have been sent out over a connection but not yet acknowledged by the receiver + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Event_set > > + Cflow::net_flow::Event_setA user-set collection of sockets and desired conditions on those sockets (such as: "socket has data to read"), with the ability to wait for those conditions to become true and signal the user when so - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > > - Cflow::net_flow::Low_lvl_packetInternal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as the super-type for all specific packet types, represented by derived structs like Ack_packet, Rst_packet, etc - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Null_value_set > > - Cflow::cfg::Null_value_setEmpty struct suitable as a *_value_set template arg for Config_manager, when a slot requires a Value_set, but you have no config to actually parse there - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket > > - Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Received_packet > > - Cflow::net_flow::Peer_socket::Received_packetMetadata (and data, if retransmission is on) for a packet that has been received (and, if retransmission is off, copied to Receive buffer) - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Sent_packet > > - Cflow::net_flow::Peer_socket::Sent_packetMetadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission is off) or possibly more (if on) times - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Server_socket > > - Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established - Cflow::net_flow::Event_set::Socket_as_any_equalsEquality predicate class used in storing various sockets of types wrapped as boost::anys in the Sockets type - Cflow::net_flow::Event_set::Socket_as_any_hashHasher class used in storing various sockets of types wrapped as boost::anys in the Sockets type - Cflow::net_flow::Node::Socket_idThe data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in this Node - Cboost::system::system_error - Cflow::error::Runtime_errorAn std::runtime_error (which is an std::exception) that stores an Error_code - Cflow::log::Async_file_logger::Throttling_cfgControls behavior of the throttling algorithm as described in Async_file_logger doc header Throttling section - Cflow::perf::Time_pt_setConvenience wrapper around an array<Time_pt, N>, which stores a time point for each of the N possible clock types in perf::Clock_type - Cflow::util::Unique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end - Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) - Cflow::log::Verbosity_configOptional-use structure encapsulating a full set of verbosity config, such that one can parse it from a config source (like an options file) in concise form and apply it to a log::Config object - Cbool - Cuniform_int_distribution< Peer_socket::security_token_t > - Cuniform_int_distribution< std::size_t > + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > > + Cflow::net_flow::Low_lvl_packetInternal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as the super-type for all specific packet types, represented by derived structs like Ack_packet, Rst_packet, etc + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Null_value_set > > + Cflow::cfg::Null_value_setEmpty struct suitable as a *_value_set template arg for Config_manager, when a slot requires a Value_set, but you have no config to actually parse there + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket > > + Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Received_packet > > + Cflow::net_flow::Peer_socket::Received_packetMetadata (and data, if retransmission is on) for a packet that has been received (and, if retransmission is off, copied to Receive buffer) + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Sent_packet > > + Cflow::net_flow::Peer_socket::Sent_packetMetadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission is off) or possibly more (if on) times + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Server_socket > > + Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established + Cflow::net_flow::Event_set::Socket_as_any_equalsEquality predicate class used in storing various sockets of types wrapped as boost::anys in the Sockets type + Cflow::net_flow::Event_set::Socket_as_any_hashHasher class used in storing various sockets of types wrapped as boost::anys in the Sockets type + Cflow::net_flow::Node::Socket_idThe data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in this Node + Cboost::system::system_error + Cflow::error::Runtime_errorAn std::runtime_error (which is an std::exception) that stores an Error_code + Cflow::log::Async_file_logger::Throttling_cfgControls behavior of the throttling algorithm as described in Async_file_logger doc header Throttling section + Cflow::perf::Time_pt_setConvenience wrapper around an array<Time_pt, N>, which stores a time point for each of the N possible clock types in perf::Clock_type + Cflow::util::Unique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end + Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) + Cflow::log::Verbosity_configOptional-use structure encapsulating a full set of verbosity config, such that one can parse it from a config source (like an options file) in concise form and apply it to a log::Config object + Cbool + Cuniform_int_distribution< Peer_socket::security_token_t > + Cuniform_int_distribution< std::size_t > diff --git a/doc/flow_doc/generated/html_full/index.html b/doc/flow_doc/generated/html_full/index.html index adfb92ee3..20cd6dcbb 100644 --- a/doc/flow_doc/generated/html_full/index.html +++ b/doc/flow_doc/generated/html_full/index.html @@ -71,7 +71,7 @@ diff --git a/doc/flow_doc/generated/html_full/info_8cpp.html b/doc/flow_doc/generated/html_full/info_8cpp.html index c2a4aa03c..7bc635c05 100644 --- a/doc/flow_doc/generated/html_full/info_8cpp.html +++ b/doc/flow_doc/generated/html_full/info_8cpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/info_8cpp_source.html b/doc/flow_doc/generated/html_full/info_8cpp_source.html index 9bd53b179..17151533a 100644 --- a/doc/flow_doc/generated/html_full/info_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/info_8cpp_source.html @@ -626,8 +626,8 @@
                                                                                                                                  @ S_PARTIALLY_XFERRED
                                                                                                                                  Bytes transferred less than bytes expected.
                                                                                                                                  @ S_ERROR
                                                                                                                                  Error occurred – probably no bytes transferred.
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:246
                                                                                                                                  -
                                                                                                                                  boost::chrono::high_resolution_clock Fine_clock
                                                                                                                                  Clock used for delicate time measurements, such that the now() method gets the current time relative ...
                                                                                                                                  Definition: common.hpp:405
                                                                                                                                  +
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:271
                                                                                                                                  +
                                                                                                                                  boost::chrono::high_resolution_clock Fine_clock
                                                                                                                                  Clock used for delicate time measurements, such that the now() method gets the current time relative ...
                                                                                                                                  Definition: common.hpp:410
                                                                                                                                  static const std::string & type_id_to_str(const std::type_index &type_id)
                                                                                                                                  Returns a brief (a few characters) string description of the given packet type given as type_index(ty...
                                                                                                                                  A data store that keeps stats about the a Peer_socket connection.
                                                                                                                                  Definition: info.hpp:456
                                                                                                                                  Peer_socket_send_stats m_snd
                                                                                                                                  Stats for outgoing direction of traffic. As opposed to the other m_snd_* members, this typically accu...
                                                                                                                                  Definition: info.hpp:511
                                                                                                                                  @@ -708,7 +708,7 @@ diff --git a/doc/flow_doc/generated/html_full/info_8hpp.html b/doc/flow_doc/generated/html_full/info_8hpp.html index 49b5e2c50..091d4ce70 100644 --- a/doc/flow_doc/generated/html_full/info_8hpp.html +++ b/doc/flow_doc/generated/html_full/info_8hpp.html @@ -106,7 +106,7 @@ diff --git a/doc/flow_doc/generated/html_full/info_8hpp_source.html b/doc/flow_doc/generated/html_full/info_8hpp_source.html index 6d4f79315..66ab1fe75 100644 --- a/doc/flow_doc/generated/html_full/info_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/info_8hpp_source.html @@ -814,9 +814,9 @@
                                                                                                                                  uint64_t m_remote_rcv_wnd_exhaustion_events
                                                                                                                                  Number of times m_rcv_wnd_exhausted changed from false.
                                                                                                                                  Definition: info.hpp:341
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  Xfer_op_result
                                                                                                                                  Result of a send or receive operation, used at least in stat reporting.
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  A set of low-level options affecting a single Flow Node, including Peer_socket objects and other obje...
                                                                                                                                  Definition: options.hpp:449
                                                                                                                                  @@ -901,7 +901,7 @@ diff --git a/doc/flow_doc/generated/html_full/inherit_graph_54.map b/doc/flow_doc/generated/html_full/inherit_graph_54.map index 3b8fcefd8..098fe07e9 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_54.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_54.map @@ -1,3 +1,3 @@ - + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_54.md5 b/doc/flow_doc/generated/html_full/inherit_graph_54.md5 index 9322a8379..53ae598f7 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_54.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_54.md5 @@ -1 +1 @@ -825e30a437002041c14da93b11c67493 \ No newline at end of file +b08793a7b48bcd7a1fcaede138326f35 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_54.svg b/doc/flow_doc/generated/html_full/inherit_graph_54.svg index 340b181bc..fdc32467c 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_54.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_54.svg @@ -4,18 +4,17 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Scoped -_setter< Value > + + +flow::util::Noncopyable diff --git a/doc/flow_doc/generated/html_full/inherit_graph_55.map b/doc/flow_doc/generated/html_full/inherit_graph_55.map index feeafeb8f..3b8fcefd8 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_55.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_55.map @@ -1,4 +1,3 @@ - - + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_55.md5 b/doc/flow_doc/generated/html_full/inherit_graph_55.md5 index f764e8d61..9322a8379 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_55.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_55.md5 @@ -1 +1 @@ -f3ba3775c34b8f1def0185f220da279a \ No newline at end of file +825e30a437002041c14da93b11c67493 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_55.svg b/doc/flow_doc/generated/html_full/inherit_graph_55.svg index 78802dd6f..340b181bc 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_55.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_55.svg @@ -4,37 +4,20 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Shared -_ptr_alias_holder< boost -::shared_ptr< Null_value -_set > > + + +flow::util::Scoped +_setter< Value > - - -Node1 - - -flow::cfg::Null_value_set - - - - - -Node0->Node1 - - - diff --git a/doc/flow_doc/generated/html_full/inherit_graph_56.map b/doc/flow_doc/generated/html_full/inherit_graph_56.map index 1f9296a31..feeafeb8f 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_56.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_56.map @@ -1,3 +1,4 @@ - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_56.md5 b/doc/flow_doc/generated/html_full/inherit_graph_56.md5 index 9b6b6e191..f764e8d61 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_56.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_56.md5 @@ -1 +1 @@ -fbea1374fb9aa614dc9d506fe5bfab59 \ No newline at end of file +f3ba3775c34b8f1def0185f220da279a \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_56.svg b/doc/flow_doc/generated/html_full/inherit_graph_56.svg index 219482527..78802dd6f 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_56.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_56.svg @@ -4,21 +4,37 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Shared -_ptr_alias_holder< Target -_ptr, Const_target_ptr > + + +flow::util::Shared +_ptr_alias_holder< boost +::shared_ptr< Null_value +_set > > + + +Node1 + + +flow::cfg::Null_value_set + + + + + +Node0->Node1 + + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_57.map b/doc/flow_doc/generated/html_full/inherit_graph_57.map index 66dcf2d6b..1f9296a31 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_57.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_57.map @@ -1,4 +1,3 @@ - - + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_57.md5 b/doc/flow_doc/generated/html_full/inherit_graph_57.md5 index 3d1ff454d..9b6b6e191 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_57.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_57.md5 @@ -1 +1 @@ -5416adf0313402d489991774ed45d9dc \ No newline at end of file +fbea1374fb9aa614dc9d506fe5bfab59 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_57.svg b/doc/flow_doc/generated/html_full/inherit_graph_57.svg index c6646ec74..219482527 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_57.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_57.svg @@ -4,35 +4,21 @@ - - + + Graphical Class Hierarchy - + Node0 - - -std::atomic< T > + + +flow::util::Shared +_ptr_alias_holder< Target +_ptr, Const_target_ptr > - - -Node1 - - -flow::log::Config:: -Atomic_raw_sev - - - - - -Node0->Node1 - - - diff --git a/doc/flow_doc/generated/html_full/inherit_graph_58.map b/doc/flow_doc/generated/html_full/inherit_graph_58.map index 1b0eee54d..66dcf2d6b 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_58.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_58.map @@ -1,4 +1,4 @@ - - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_58.md5 b/doc/flow_doc/generated/html_full/inherit_graph_58.md5 index 6334f2e9c..3d1ff454d 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_58.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_58.md5 @@ -1 +1 @@ -52c4cecb7f0e1188846428a0e8e187eb \ No newline at end of file +5416adf0313402d489991774ed45d9dc \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_58.svg b/doc/flow_doc/generated/html_full/inherit_graph_58.svg index cff797d97..c6646ec74 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_58.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_58.svg @@ -4,36 +4,35 @@ - + Graphical Class Hierarchy - + Node0 - -std::basic_string_view -< Char > + +std::atomic< T > Node1 - - -flow::util::Basic_string -_view< Ch, Traits > + + +flow::log::Config:: +Atomic_raw_sev Node0->Node1 - - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_59.map b/doc/flow_doc/generated/html_full/inherit_graph_59.map index 00ce9c8ca..1b0eee54d 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_59.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_59.map @@ -1,4 +1,4 @@ - - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_59.md5 b/doc/flow_doc/generated/html_full/inherit_graph_59.md5 index 631d6c08e..6334f2e9c 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_59.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_59.md5 @@ -1 +1 @@ -979e00af4627b0fd082bc6cefdd07083 \ No newline at end of file +52c4cecb7f0e1188846428a0e8e187eb \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_59.svg b/doc/flow_doc/generated/html_full/inherit_graph_59.svg index 592b89f51..cff797d97 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_59.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_59.svg @@ -4,35 +4,36 @@ - + Graphical Class Hierarchy - + Node0 - -std::function + +std::basic_string_view +< Char > Node1 - - -flow::Function< Result -(Args...)> + + +flow::util::Basic_string +_view< Ch, Traits > Node0->Node1 - - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_60.map b/doc/flow_doc/generated/html_full/inherit_graph_60.map index 10aad7fd2..00ce9c8ca 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_60.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_60.map @@ -1,3 +1,4 @@ - + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_60.md5 b/doc/flow_doc/generated/html_full/inherit_graph_60.md5 index a9fa57b0b..631d6c08e 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_60.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_60.md5 @@ -1 +1 @@ -a844f3f0687d28c67260fe15a7b32f10 \ No newline at end of file +979e00af4627b0fd082bc6cefdd07083 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_60.svg b/doc/flow_doc/generated/html_full/inherit_graph_60.svg index a01cc332d..592b89f51 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_60.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_60.svg @@ -4,21 +4,35 @@ - - + + Graphical Class Hierarchy - + Node0 - - -uniform_int_distribution -< Peer_socket::security -_token_t > + + +std::function + + +Node1 + + +flow::Function< Result +(Args...)> + + + + + +Node0->Node1 + + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_61.map b/doc/flow_doc/generated/html_full/inherit_graph_61.map index f2fdd6609..10aad7fd2 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_61.map +++ b/doc/flow_doc/generated/html_full/inherit_graph_61.map @@ -1,3 +1,3 @@ - + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_61.md5 b/doc/flow_doc/generated/html_full/inherit_graph_61.md5 index cd59668c9..a9fa57b0b 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_61.md5 +++ b/doc/flow_doc/generated/html_full/inherit_graph_61.md5 @@ -1 +1 @@ -fec23efb9493177c7b360b81d71f47a9 \ No newline at end of file +a844f3f0687d28c67260fe15a7b32f10 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_61.svg b/doc/flow_doc/generated/html_full/inherit_graph_61.svg index 040e57a23..a01cc332d 100644 --- a/doc/flow_doc/generated/html_full/inherit_graph_61.svg +++ b/doc/flow_doc/generated/html_full/inherit_graph_61.svg @@ -4,18 +4,19 @@ - - + + Graphical Class Hierarchy - + Node0 - - -uniform_int_distribution -< std::size_t > + + +uniform_int_distribution +< Peer_socket::security +_token_t > diff --git a/doc/flow_doc/generated/html_full/inherit_graph_62.map b/doc/flow_doc/generated/html_full/inherit_graph_62.map new file mode 100644 index 000000000..f2fdd6609 --- /dev/null +++ b/doc/flow_doc/generated/html_full/inherit_graph_62.map @@ -0,0 +1,3 @@ + + + diff --git a/doc/flow_doc/generated/html_full/inherit_graph_62.md5 b/doc/flow_doc/generated/html_full/inherit_graph_62.md5 new file mode 100644 index 000000000..cd59668c9 --- /dev/null +++ b/doc/flow_doc/generated/html_full/inherit_graph_62.md5 @@ -0,0 +1 @@ +fec23efb9493177c7b360b81d71f47a9 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/inherit_graph_62.svg b/doc/flow_doc/generated/html_full/inherit_graph_62.svg new file mode 100644 index 000000000..040e57a23 --- /dev/null +++ b/doc/flow_doc/generated/html_full/inherit_graph_62.svg @@ -0,0 +1,23 @@ + + + + + + +Graphical Class Hierarchy + + + +Node0 + + +uniform_int_distribution +< std::size_t > + + + + + diff --git a/doc/flow_doc/generated/html_full/inherits.html b/doc/flow_doc/generated/html_full/inherits.html index 973cbe6f5..0b12159b0 100644 --- a/doc/flow_doc/generated/html_full/inherits.html +++ b/doc/flow_doc/generated/html_full/inherits.html @@ -177,27 +177,29 @@

                                                                                                                                  This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

                                                                                                                                  - + - + - + - + - + - + - + - + + + diff --git a/doc/flow_doc/generated/html_full/linked__hash__map_8hpp.html b/doc/flow_doc/generated/html_full/linked__hash__map_8hpp.html index 5e0d52d0e..dfe716441 100644 --- a/doc/flow_doc/generated/html_full/linked__hash__map_8hpp.html +++ b/doc/flow_doc/generated/html_full/linked__hash__map_8hpp.html @@ -106,7 +106,7 @@ diff --git a/doc/flow_doc/generated/html_full/linked__hash__map_8hpp_source.html b/doc/flow_doc/generated/html_full/linked__hash__map_8hpp_source.html index cb1822c31..50ec471fb 100644 --- a/doc/flow_doc/generated/html_full/linked__hash__map_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/linked__hash__map_8hpp_source.html @@ -1240,7 +1240,7 @@ diff --git a/doc/flow_doc/generated/html_full/linked__hash__set_8hpp.html b/doc/flow_doc/generated/html_full/linked__hash__set_8hpp.html index 55c3cbe8b..abda68a03 100644 --- a/doc/flow_doc/generated/html_full/linked__hash__set_8hpp.html +++ b/doc/flow_doc/generated/html_full/linked__hash__set_8hpp.html @@ -106,7 +106,7 @@ diff --git a/doc/flow_doc/generated/html_full/linked__hash__set_8hpp_source.html b/doc/flow_doc/generated/html_full/linked__hash__set_8hpp_source.html index 04f6754a2..ebbff99e5 100644 --- a/doc/flow_doc/generated/html_full/linked__hash__set_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/linked__hash__set_8hpp_source.html @@ -1018,7 +1018,7 @@ diff --git a/doc/flow_doc/generated/html_full/log_8cpp.html b/doc/flow_doc/generated/html_full/log_8cpp.html index 951192b9f..8c25572cf 100644 --- a/doc/flow_doc/generated/html_full/log_8cpp.html +++ b/doc/flow_doc/generated/html_full/log_8cpp.html @@ -109,7 +109,7 @@ diff --git a/doc/flow_doc/generated/html_full/log_8cpp_source.html b/doc/flow_doc/generated/html_full/log_8cpp_source.html index d4e70ca64..70254c525 100644 --- a/doc/flow_doc/generated/html_full/log_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/log_8cpp_source.html @@ -422,11 +422,11 @@
                                                                                                                                  boost::thread_specific_ptr< Msg_metadata > this_thread_sync_msg_metadata_ptr
                                                                                                                                  Thread-local Msg_metadata object used by FLOW_LOG_WITHOUT_CHECKING() for an alleged perf bonus in the...
                                                                                                                                  Definition: log.cpp:28
                                                                                                                                  void beautify_chrono_ostream(std::ostream *os_ptr)
                                                                                                                                  Sets certain chrono-related formatting on the given ostream that results in a consistent,...
                                                                                                                                  Definition: util.cpp:173
                                                                                                                                  Thread::id Thread_id
                                                                                                                                  Short-hand for an OS-provided ID of a util::Thread.
                                                                                                                                  Definition: util_fwd.hpp:90
                                                                                                                                  -
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:498
                                                                                                                                  +
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:523
                                                                                                                                  size_t deep_size(const std::string &val)
                                                                                                                                  Estimate of memory footprint of the given value, including memory allocated on its behalf – but exclu...
                                                                                                                                  Definition: util.cpp:186
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  Simple data store containing all of the information generated at every logging call site by flow::log...
                                                                                                                                  Definition: log.hpp:1048
                                                                                                                                  util::Thread_id m_call_thread_id
                                                                                                                                  Thread ID of the thread from which the log call was invoked; or a default-constructed (no-thread) suc...
                                                                                                                                  Definition: log.hpp:1144
                                                                                                                                  std::string m_call_thread_nickname
                                                                                                                                  Thread nickname, as for Logger::this_thread_set_logged_nickname(), of the thread from which the log c...
                                                                                                                                  Definition: log.hpp:1134
                                                                                                                                  @@ -434,7 +434,7 @@ diff --git a/doc/flow_doc/generated/html_full/log_8hpp.html b/doc/flow_doc/generated/html_full/log_8hpp.html index 19ac49406..e0a7bdf50 100644 --- a/doc/flow_doc/generated/html_full/log_8hpp.html +++ b/doc/flow_doc/generated/html_full/log_8hpp.html @@ -989,7 +989,7 @@

                                                                                                                                  Severity selection

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/log_8hpp_source.html b/doc/flow_doc/generated/html_full/log_8hpp_source.html index da2c7550d..8bce9df0f 100644 --- a/doc/flow_doc/generated/html_full/log_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/log_8hpp_source.html @@ -1892,7 +1892,7 @@ diff --git a/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp.html b/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp.html index a3e04c400..60762893a 100644 --- a/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp_source.html b/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp_source.html index f237c104f..6956d32a1 100644 --- a/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/log__component__enum__declare_8macros_8hpp_source.html @@ -154,7 +154,7 @@ diff --git a/doc/flow_doc/generated/html_full/log__fwd_8hpp.html b/doc/flow_doc/generated/html_full/log__fwd_8hpp.html index 96b4d5c30..09e6936e4 100644 --- a/doc/flow_doc/generated/html_full/log__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/log__fwd_8hpp.html @@ -131,7 +131,7 @@ diff --git a/doc/flow_doc/generated/html_full/log__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/log__fwd_8hpp_source.html index 959c1264a..2091133e3 100644 --- a/doc/flow_doc/generated/html_full/log__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/log__fwd_8hpp_source.html @@ -480,7 +480,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__io_8cpp.html b/doc/flow_doc/generated/html_full/low__lvl__io_8cpp.html index f8f327d72..3e008c9d1 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__io_8cpp.html +++ b/doc/flow_doc/generated/html_full/low__lvl__io_8cpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__io_8cpp_source.html b/doc/flow_doc/generated/html_full/low__lvl__io_8cpp_source.html index 345131734..6824ccd64 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__io_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/low__lvl__io_8cpp_source.html @@ -1192,7 +1192,7 @@
                                                                                                                                  void async_no_sock_low_lvl_rst_send(Low_lvl_packet::Const_ptr causing_packet, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Sends an RST to the given UDP endpoint in response to the given incoming low-level packet that came f...
                                                                                                                                  Definition: low_lvl_io.cpp:586
                                                                                                                                  unsigned int handle_incoming_with_simulation(util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint, bool is_sim_duplicate_packet=false)
                                                                                                                                  Helper for low_lvl_recv_and_handle() that calls handle_incoming() on the not-yet-deserialized low-lev...
                                                                                                                                  Definition: low_lvl_io.cpp:187
                                                                                                                                  void low_lvl_recv_and_handle(Error_code sys_err_code)
                                                                                                                                  Handles the pre-condition that m_low_lvl_sock has a UDP packet available for reading,...
                                                                                                                                  Definition: low_lvl_io.cpp:46
                                                                                                                                  -
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  +
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  Udp_socket m_low_lvl_sock
                                                                                                                                  The UDP socket used to receive low-level packets (to assemble into application layer data) and send t...
                                                                                                                                  Definition: node.hpp:3753
                                                                                                                                  void async_low_lvl_packet_send_impl(const util::Udp_endpoint &low_lvl_remote_endpoint, Low_lvl_packet::Const_ptr packet, bool delayed_by_pacing, Peer_socket::Ptr sock)
                                                                                                                                  Takes given low-level packet structure, serializes it, and initiates asynchronous send of these data ...
                                                                                                                                  Definition: low_lvl_io.cpp:321
                                                                                                                                  bool async_sock_low_lvl_packet_send_or_close_immediately(const Peer_socket::Ptr &sock, Low_lvl_packet::Ptr &&packet, bool defer_delta_check)
                                                                                                                                  Similar to async_sock_low_lvl_packet_send_paced() except it also calls close_connection_immediately(s...
                                                                                                                                  @@ -1201,13 +1201,13 @@
                                                                                                                                  void async_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
                                                                                                                                  Sends an RST to the other side of the given socket asynchronously when possible.
                                                                                                                                  Node_options m_opts
                                                                                                                                  This Node's global set of options.
                                                                                                                                  Definition: node.hpp:3704
                                                                                                                                  void async_low_lvl_recv()
                                                                                                                                  Registers so that during the current or next m_task_engine.run(), the latter will wait for a receivab...
                                                                                                                                  Definition: low_lvl_io.cpp:31
                                                                                                                                  -
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  +
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  util::Task_engine m_task_engine
                                                                                                                                  The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
                                                                                                                                  Definition: node.hpp:3739
                                                                                                                                  void sock_pacing_new_time_slice(Peer_socket::Ptr sock, const Fine_time_pt &now)
                                                                                                                                  async_sock_low_lvl_packet_send_paced() pacing helper: Resets the socket's Send_pacing_data structure ...
                                                                                                                                  Definition: low_lvl_io.cpp:765
                                                                                                                                  -
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  +
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  @ S_CLOSED
                                                                                                                                  Neither future reads nor writes are possible, AND Node has disowned the Peer_socket.
                                                                                                                                  -
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  +
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  An internal net_flow sequence number identifying a piece of data.
                                                                                                                                  Definition: seq_num.hpp:126
                                                                                                                                  boost::shared_ptr< Peer_socket > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable values of type Target_type::element_type (a-la T*).
                                                                                                                                  Const_target_ptr Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable values of type Target_type::element_type (a-la T cons...
                                                                                                                                  @@ -1229,20 +1229,20 @@
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  boost::asio::ip::udp::endpoint Udp_endpoint
                                                                                                                                  Short-hand for the UDP endpoint (IP/port) type.
                                                                                                                                  Definition: util_fwd.hpp:208
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  -
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  size_t m_dyn_low_lvl_max_packet_size
                                                                                                                                  Any incoming low-level (UDP) packet will be truncated to this size.
                                                                                                                                  Definition: options.hpp:553
                                                                                                                                  unsigned int m_dyn_max_packets_per_main_loop_iteration
                                                                                                                                  The UDP net-stack may deliver 2 or more datagrams to the Flow Node at the same time.
                                                                                                                                  Definition: options.hpp:545
                                                                                                                                  Fine_duration m_st_timer_min_period
                                                                                                                                  A time period such that the boost.asio timer implementation for this platform is able to accurately a...
                                                                                                                                  Definition: options.hpp:534
                                                                                                                                  -
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  -
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  +
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  +
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  The current outgoing packet pacing state, including queue of low-level packets to be sent,...
                                                                                                                                  Definition: low_lvl_io.hpp:178
                                                                                                                                  util::Timer m_slice_timer
                                                                                                                                  When running, m_packet_q is non-empty, m_bytes_allowed_this_slice < data size of m_packet_q....
                                                                                                                                  Definition: low_lvl_io.hpp:232
                                                                                                                                  size_t m_bytes_allowed_this_slice
                                                                                                                                  This many bytes worth of DATA packets may still be sent, at this time, within the time slice defined ...
                                                                                                                                  Definition: low_lvl_io.hpp:212
                                                                                                                                  @@ -1253,7 +1253,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__io_8hpp.html b/doc/flow_doc/generated/html_full/low__lvl__io_8hpp.html index c05668821..9995e96eb 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__io_8hpp.html +++ b/doc/flow_doc/generated/html_full/low__lvl__io_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__io_8hpp_source.html b/doc/flow_doc/generated/html_full/low__lvl__io_8hpp_source.html index 29274103b..73ab03f5f 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__io_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/low__lvl__io_8hpp_source.html @@ -321,8 +321,8 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  boost::asio::basic_waitable_timer< Fine_clock > Timer
                                                                                                                                  boost.asio timer.
                                                                                                                                  Definition: util_fwd.hpp:202
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  The current outgoing packet pacing state, including queue of low-level packets to be sent,...
                                                                                                                                  Definition: low_lvl_io.hpp:178
                                                                                                                                  util::Timer m_slice_timer
                                                                                                                                  When running, m_packet_q is non-empty, m_bytes_allowed_this_slice < data size of m_packet_q....
                                                                                                                                  Definition: low_lvl_io.hpp:232
                                                                                                                                  size_t m_bytes_allowed_this_slice
                                                                                                                                  This many bytes worth of DATA packets may still be sent, at this time, within the time slice defined ...
                                                                                                                                  Definition: low_lvl_io.hpp:212
                                                                                                                                  @@ -334,7 +334,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp.html b/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp.html index ad6733562..6798eb04f 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp.html +++ b/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp_source.html b/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp_source.html index 2d862edd6..813b1909b 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/low__lvl__packet_8cpp_source.html @@ -1170,86 +1170,86 @@
                                                                                                                                  @ S_TRACE
                                                                                                                                  Message indicates any condition that may occur with great frequency (thus verbose if logged).
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  -
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:388
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  +
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:413
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:386
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:391
                                                                                                                                  Individual_ack_rexmit_off(const Sequence_number &seq_num, ack_delay_t delay)
                                                                                                                                  Constructs object.
                                                                                                                                  Individual_ack_rexmit_on(const Sequence_number &seq_num, unsigned int rexmit_id, ack_delay_t delay)
                                                                                                                                  Constructs object.
                                                                                                                                  -
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  -
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_acked_packets
                                                                                                                                  List of incoming (post-deserialization of ACK) acknowledgments of DATA packets, each identified by it...
                                                                                                                                  -
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  +
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  +
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_acked_packets
                                                                                                                                  List of incoming (post-deserialization of ACK) acknowledgments of DATA packets, each identified by it...
                                                                                                                                  +
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  +
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  uint16_t m_rcv_acked_packets_rexmit_out_size
                                                                                                                                  This is the serialized version of m_rcv_acked_packets_rexmit_{on|off}_out.size() and m_rcv_acked_pack...
                                                                                                                                  -
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  +
                                                                                                                                  uint16_t m_rcv_acked_packets_rexmit_out_size
                                                                                                                                  This is the serialized version of m_rcv_acked_packets_rexmit_{on|off}_out.size() and m_rcv_acked_pack...
                                                                                                                                  +
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  Ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  -
                                                                                                                                  uint16_t m_data_size_raw
                                                                                                                                  This is the serialized version of m_data.size() (see m_data).
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  uint16_t m_data_size_raw
                                                                                                                                  This is the serialized version of m_data.size() (see m_data).
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Data_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  The sequence number of the first byte in the payload; i.e., of m_data.front(), a/k/a m_data[0].
                                                                                                                                  -
                                                                                                                                  rexmit_id_t m_rexmit_id
                                                                                                                                  Retransmit counter of the DATA packet being sent.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  The sequence number of the first byte in the payload; i.e., of m_data.front(), a/k/a m_data[0].
                                                                                                                                  +
                                                                                                                                  rexmit_id_t m_rexmit_id
                                                                                                                                  Retransmit counter of the DATA packet being sent.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  util::Blob m_data
                                                                                                                                  The payload.
                                                                                                                                  +
                                                                                                                                  util::Blob m_data
                                                                                                                                  The payload.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  uint8_t m_opt_rexmit_on_raw
                                                                                                                                  This is the serialized version of the multi-byte bool Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  -
                                                                                                                                  const uint16_t m_reserved2
                                                                                                                                  Unused space reserved for future use, ensuring correct alignment of other fields and headers.
                                                                                                                                  +
                                                                                                                                  uint8_t m_opt_rexmit_on_raw
                                                                                                                                  This is the serialized version of the multi-byte bool Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  +
                                                                                                                                  const uint16_t m_reserved2
                                                                                                                                  Unused space reserved for future use, ensuring correct alignment of other fields and headers.
                                                                                                                                  Aux_raw_data()
                                                                                                                                  Constructs a mostly-uninitialized object, except for the const member(s), if any.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as...
                                                                                                                                  -
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  -
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  -
                                                                                                                                  Aux_raw_data m_aux_raw_data
                                                                                                                                  Auxilliary data area necessary for serialize_to_raw_data() to work.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as...
                                                                                                                                  +
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  +
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  Aux_raw_data m_aux_raw_data
                                                                                                                                  Auxilliary data area necessary for serialize_to_raw_data() to work.
                                                                                                                                  static Ptr create_from_raw_data_packet(log::Logger *logger_ptr, util::Blob *raw_packet, bool prefer_no_move)
                                                                                                                                  Constructs packet on the heap with values determined by the given raw binary data as presumably recei...
                                                                                                                                  static const std::string & type_id_to_str(const std::type_index &type_id)
                                                                                                                                  Returns a brief (a few characters) string description of the given packet type given as type_index(ty...
                                                                                                                                  struct flow::net_flow::Low_lvl_packet::@7 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  virtual std::ostream & to_ostream(std::ostream &os, bool verbose=false) const
                                                                                                                                  Writes a multi-line representation of *this to an output stream.
                                                                                                                                  Low_lvl_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values.
                                                                                                                                  -
                                                                                                                                  static const boost::unordered_map< std::type_index, Packet_type_info > S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO
                                                                                                                                  Mapping from native typeid(), a/k/a packet type (for all possible packet types), to the set of proper...
                                                                                                                                  +
                                                                                                                                  static const boost::unordered_map< std::type_index, Packet_type_info > S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO
                                                                                                                                  Mapping from native typeid(), a/k/a packet type (for all possible packet types), to the set of proper...
                                                                                                                                  size_t serialize_to_raw_data_and_log(Const_buffer_sequence *raw_bufs) const
                                                                                                                                  Identical to serialize_to_raw_data() but adds log-level-appropriate logging after the operation.
                                                                                                                                  static const uint8_t & type_id_native_to_raw(const std::type_info &type_id)
                                                                                                                                  Helper that looks up the Packet_type_info::m_raw_type_id value for the given typeid(p),...
                                                                                                                                  -
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  +
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  std::ostream & type_to_ostream(std::ostream &os) const
                                                                                                                                  Writes a brief representation of typeid(*this) – i.e., the packet type (ACK, RST, etc....
                                                                                                                                  -
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_type_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet's type ("ACK",...
                                                                                                                                  -
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token member of a couple different packet types.
                                                                                                                                  +
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_type_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet's type ("ACK",...
                                                                                                                                  +
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token member of a couple different packet types.
                                                                                                                                  virtual size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const =0
                                                                                                                                  Serializes the current logical packet data from *this into the given Const_buffer_sequence,...
                                                                                                                                  -
                                                                                                                                  boost::asio::const_buffer Const_buffer
                                                                                                                                  Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory ...
                                                                                                                                  +
                                                                                                                                  boost::asio::const_buffer Const_buffer
                                                                                                                                  Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory ...
                                                                                                                                  size_t serialize_common_header_to_raw_data(Const_buffer_sequence *raw_bufs) const
                                                                                                                                  Helper for serialize_to_raw_data() implementations in sub-types that encodes the header common to all...
                                                                                                                                  -
                                                                                                                                  bool m_opt_rexmit_on
                                                                                                                                  Option indicating whether this connection is using retransmission or not.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  +
                                                                                                                                  bool m_opt_rexmit_on
                                                                                                                                  Option indicating whether this connection is using retransmission or not.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Rst_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  struct flow::net_flow::Syn_ack_ack_packet::@9 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Syn_ack_ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite traffi...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite traffi...
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Syn_ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  struct flow::net_flow::Syn_ack_packet::@8 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Syn_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by the user ...
                                                                                                                                  +
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by the user ...
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be usi...
                                                                                                                                  +
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be usi...
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp.html b/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp.html index b0c70227e..246d19419 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp.html +++ b/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp.html @@ -82,6 +82,7 @@ #include "flow/util/blob.hpp"
                                                                                                                                  #include <boost/endian.hpp>
                                                                                                                                  #include <limits>
                                                                                                                                  +#include <type_traits>

                                                                                                                                  Go to the source code of this file.

                                                                                                                                  @@ -136,7 +137,7 @@ diff --git a/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp_source.html b/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp_source.html index 481affdbb..4f23815ed 100644 --- a/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/low__lvl__packet_8hpp_source.html @@ -99,1391 +99,1388 @@
                                                                                                                                  27#include "flow/util/blob.hpp"
                                                                                                                                  28#include <boost/endian.hpp>
                                                                                                                                  29#include <limits>
                                                                                                                                  -
                                                                                                                                  30
                                                                                                                                  -
                                                                                                                                  31namespace flow::net_flow
                                                                                                                                  -
                                                                                                                                  32{
                                                                                                                                  -
                                                                                                                                  33
                                                                                                                                  -
                                                                                                                                  34/**
                                                                                                                                  -
                                                                                                                                  35 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level packet structure and serves as
                                                                                                                                  -
                                                                                                                                  36 * the super-type for all specific packet types, represented by derived `struct`s like Ack_packet, Rst_packet,
                                                                                                                                  -
                                                                                                                                  37 * etc.
                                                                                                                                  -
                                                                                                                                  38 *
                                                                                                                                  -
                                                                                                                                  39 * This `struct` and its sub-`struct` hierarchy are not too complex but nevertheless are somewhat unorthodox,
                                                                                                                                  -
                                                                                                                                  40 * combining a few different paradigms. So it's worth explaining these paradigms.
                                                                                                                                  -
                                                                                                                                  41 *
                                                                                                                                  -
                                                                                                                                  42 * ### Paradigm: Data store ###
                                                                                                                                  -
                                                                                                                                  43 * This is a `struct` holding the conceptual contents of a packet. Low_lvl_packet stores common values like
                                                                                                                                  -
                                                                                                                                  44 * #m_opt_rexmit_on, #m_src_port, and a few more. Each sub-`struct` stores further values specific to each
                                                                                                                                  -
                                                                                                                                  45 * packet type; for example, as of this writing, Data_packet::m_data contains the data payload of a DATA
                                                                                                                                  -
                                                                                                                                  46 * packet; this would not apply, for example, to another sub-`struct` like Rst_packet, because an RST stores
                                                                                                                                  -
                                                                                                                                  47 * no binary blob like that.
                                                                                                                                  -
                                                                                                                                  48 *
                                                                                                                                  -
                                                                                                                                  49 * Since it's a simple data store, the applicable data members (in this `struct` and the sub-types) are
                                                                                                                                  -
                                                                                                                                  50 * both public AND non-`const`. They can be read and written at will, thus changing or reading the
                                                                                                                                  -
                                                                                                                                  51 * logical contents of the packet.
                                                                                                                                  -
                                                                                                                                  52 *
                                                                                                                                  -
                                                                                                                                  53 * ### Paradigm: Polymorphic type ###
                                                                                                                                  -
                                                                                                                                  54 * While a simple data store, it also represents a hierarchy of possible packet types, and indeed a number
                                                                                                                                  -
                                                                                                                                  55 * of important polymorphic operations are included. Some are private/internal, and some are public.
                                                                                                                                  -
                                                                                                                                  56 * A public method may not appear polymorphic by its signature, but in that case usually its implementation
                                                                                                                                  -
                                                                                                                                  57 * uses non-public `virtual` methods to accomplish its tasks. Specifically, the key APIs are:
                                                                                                                                  -
                                                                                                                                  58 *
                                                                                                                                  -
                                                                                                                                  59 * - `create_uninit_packet<T>()`: This creates an uninitialized sub-object of Low_lvl_packet, of actual
                                                                                                                                  -
                                                                                                                                  60 * type `T`, where `T` derives from Low_lvl_packet. This returns a `shared_ptr<T>`, and any actual
                                                                                                                                  -
                                                                                                                                  61 * constructor used to implement this factory method is non-public, so the only way for a user to
                                                                                                                                  -
                                                                                                                                  62 * create a Low_lvl_packet is to get at a ref-counted pointer to it -- not a raw, unprotected pointer. If storing
                                                                                                                                  -
                                                                                                                                  63 * only `shared_ptr<T>` or `Ptr` values, deletion is not something to worry about, as it will happen
                                                                                                                                  -
                                                                                                                                  64 * automatically.
                                                                                                                                  -
                                                                                                                                  65 * - Same with the other factory methods described just below. Direct access to `Low_lvl_packet*` or
                                                                                                                                  -
                                                                                                                                  66 * `T*`, where `T` derives from Low_lvl_packet, is not allowed (but this is not enforced at compile time
                                                                                                                                  -
                                                                                                                                  67 * and, at best, via `assert()`s at runtime).
                                                                                                                                  -
                                                                                                                                  68 * - create_from_raw_data_packet(): Given a raw serialized packet, this factory method constructs
                                                                                                                                  -
                                                                                                                                  69 * a Low_lvl_packet of the appropriate polymorphic sub-type, filling it at all levels with the data
                                                                                                                                  -
                                                                                                                                  70 * deserialized for the input binary blob. Internally, it uses some private, `virtual` action to get this
                                                                                                                                  -
                                                                                                                                  71 * to work. At any rate, this method is used to crete a logical representation of a packet off the wire.
                                                                                                                                  -
                                                                                                                                  72 * - serialize_to_raw_data(): The opposite operation: convert existing object to raw data sendable over the wire.
                                                                                                                                  -
                                                                                                                                  73 * This uses a high-performance scatter-gather paradigm of producing a sequence of pointers and lengths to
                                                                                                                                  -
                                                                                                                                  74 * already existing data areas, avoiding copying. This thing is `virtual` and applies to any Low_lvl_packet
                                                                                                                                  -
                                                                                                                                  75 * sub-object.
                                                                                                                                  -
                                                                                                                                  76 *
                                                                                                                                  -
                                                                                                                                  77 * (Reminder: As with all polymorphism and `shared_ptr`, you may need `static_pointer_cast<>` to up- and down-cast
                                                                                                                                  -
                                                                                                                                  78 * between Low_lvl_packet and subclasses. Also `Low_lvl_packet::ptr_cast()` up-casts even syntactically-sugarier-ly.)
                                                                                                                                  -
                                                                                                                                  79 *
                                                                                                                                  -
                                                                                                                                  80 * The two basic flows are:
                                                                                                                                  -
                                                                                                                                  81 * - Call `create_uninit_packet<T>()` to construct a sub-`struct` of Low_lvl_packet, returned as a ref-counted
                                                                                                                                  -
                                                                                                                                  82 * pointer to `T`. Fill out all the fields manually, accessing object via aforemetioned smart pointer.
                                                                                                                                  -
                                                                                                                                  83 * Call serialize_to_raw_data(). Pass result of latter to a boost.asio network-sending routine
                                                                                                                                  -
                                                                                                                                  84 * to send over wire. Ensure you pass a `Ptr` to the completion handler passed to that routine, so that
                                                                                                                                  -
                                                                                                                                  85 * the Low_lvl_packet survives while being sent. The handler can let the `Ptr` go out of scope, likely
                                                                                                                                  -
                                                                                                                                  86 * `delete`ing the Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  87 * - Receive raw packet over wire. Call create_from_raw_data_packet() to yield a Low_lvl_packet::Ptr pointing
                                                                                                                                  -
                                                                                                                                  88 * to new Low_lvl_packet sub-object with all fields filled out. Read the fields as needed to process the
                                                                                                                                  -
                                                                                                                                  89 * packet; store the `Ptr` if necessary; eventually removing it from all data structures will drop ref-count
                                                                                                                                  -
                                                                                                                                  90 * to zero, and it will be auto-`delete`d.
                                                                                                                                  -
                                                                                                                                  91 *
                                                                                                                                  -
                                                                                                                                  92 * ### Other utlities ###
                                                                                                                                  -
                                                                                                                                  93 * A number of (typically polymorphic) facilities exist, mainly to log these objects to `ostream`s, including
                                                                                                                                  -
                                                                                                                                  94 * when logging with FLOW_LOG_TRACE() and FLOW_LOG_DATA().
                                                                                                                                  -
                                                                                                                                  95 *
                                                                                                                                  -
                                                                                                                                  96 * - #m_verbose_ostream_manip and #m_concise_ostream_manip are `const` data members that can be output
                                                                                                                                  -
                                                                                                                                  97 * via the usual `<<` operator to `ostream`s in order to output verbose and concise descriptions
                                                                                                                                  -
                                                                                                                                  98 * of any Low_lvl_packet (of any sub-`struct` type, polymorphically).
                                                                                                                                  -
                                                                                                                                  99 * - #m_type_ostream_manip can be similarly used to output just the packet type of any given
                                                                                                                                  -
                                                                                                                                  100 * Low_lvl_packet (producing strings like `"ACK"` or `"RST"`).
                                                                                                                                  -
                                                                                                                                  101 *
                                                                                                                                  -
                                                                                                                                  102 * The implementation of these is typically some polymorphic `virtual` magic, but the use is straightforward using
                                                                                                                                  -
                                                                                                                                  103 * these `ostream` manipulator data members.
                                                                                                                                  -
                                                                                                                                  104 *
                                                                                                                                  -
                                                                                                                                  105 * Implementation notes
                                                                                                                                  -
                                                                                                                                  106 * --------------------
                                                                                                                                  -
                                                                                                                                  107 *
                                                                                                                                  -
                                                                                                                                  108 * ### History of approaches ###
                                                                                                                                  -
                                                                                                                                  109 * Originally the implementation used the boost.serialization library for packet serialization, but
                                                                                                                                  -
                                                                                                                                  110 * it turned out to consume way too much CPU time which consequently limited the maximum
                                                                                                                                  -
                                                                                                                                  111 * throughput at high speeds. The next implementation used the traditional approach based on
                                                                                                                                  -
                                                                                                                                  112 * "packed" structures (structures without any padding), in one big `struct Low_lvl_packet`.
                                                                                                                                  -
                                                                                                                                  113 * However, I deemed the latter setup too C-like (yet simultaneously
                                                                                                                                  -
                                                                                                                                  114 * not C-like enough, in that no unions were used, hence RAM was wasted despite the C-like approach).
                                                                                                                                  -
                                                                                                                                  115 * Ultimately, the current version of the implementation came about, with its polymorphic `struct` hierarchy
                                                                                                                                  -
                                                                                                                                  116 * and abstract Low_lvl_packet `struct` (which, in the previous iteration, simply contained everything
                                                                                                                                  -
                                                                                                                                  117 * about every type, complete with an `enum Type` instead of using C++'s built-in `typeid`, as the current
                                                                                                                                  -
                                                                                                                                  118 * version uses).
                                                                                                                                  -
                                                                                                                                  119 *
                                                                                                                                  -
                                                                                                                                  120 * While the above evolution was more about coding style philosophy (from a single type and a type selector
                                                                                                                                  -
                                                                                                                                  121 * `enum` to a polymorphic hierarchy and `typeid`), the other evolution concerned the way serialization
                                                                                                                                  -
                                                                                                                                  122 * (for sending over the write) worked. At first, as mentioned, there were the logical values (which were
                                                                                                                                  -
                                                                                                                                  123 * public and non-`const`), and there were private packed `struct`s into which the logical values were
                                                                                                                                  -
                                                                                                                                  124 * placed (with transformation for endianness and other things) at serialization time; finally then assembling
                                                                                                                                  -
                                                                                                                                  125 * a newly allocated single binary buffer, those packed `struct`s copied into it. Not bad -- rather verbose
                                                                                                                                  -
                                                                                                                                  126 * having all those types defined, but not bad -- but it did involve a new buffer and linear-time copying into
                                                                                                                                  -
                                                                                                                                  127 * that buffer. This seemed like a shame.
                                                                                                                                  -
                                                                                                                                  128 *
                                                                                                                                  -
                                                                                                                                  129 * This led to the final improvement, which was to turn the serialization function into one that generates
                                                                                                                                  -
                                                                                                                                  130 * a `boost::asio::const_buffer_sequence`, basically a sequence of pointers and associated lengths of areas
                                                                                                                                  -
                                                                                                                                  131 * already present in memory. In most cases (with a couple small exceptions), the stored public data members
                                                                                                                                  -
                                                                                                                                  132 * (e.g., #m_src_port and Data_packet::m_data) could simply have their addresses and lengths taken and placed
                                                                                                                                  -
                                                                                                                                  133 * into the `const_buffer_sequence` -- no buffer copying involved. This should achieve a nice performance
                                                                                                                                  -
                                                                                                                                  134 * improvement. The removal of things like `struct Common_header` and `struct Ack_header` is a good bonus
                                                                                                                                  -
                                                                                                                                  135 * coding-wise, too.
                                                                                                                                  -
                                                                                                                                  136 *
                                                                                                                                  -
                                                                                                                                  137 * (There is a caveat there. While no issue for the true performance culprits, namely Data_packet::m_data,
                                                                                                                                  -
                                                                                                                                  138 * the various multi-byte integer values like #m_src_port technically have to undergo endianness conversion
                                                                                                                                  -
                                                                                                                                  139 * during serialization. So technically simply taking an address and size is not enough; the value needs
                                                                                                                                  -
                                                                                                                                  140 * to be flipped *potentially*. In reality, though, all relevant architectures are such that we chose
                                                                                                                                  -
                                                                                                                                  141 * identical network byte order as memory byte order, making no flipping necessary in practice. Of course,
                                                                                                                                  -
                                                                                                                                  142 * if we spread to an architecture where this is not true, everything will explode. However, a compile-time
                                                                                                                                  -
                                                                                                                                  143 * assertion would warn us of this, and a nearby comment will instruct on how to deal with the problem, in the
                                                                                                                                  -
                                                                                                                                  144 * unlikely case it were to appear. [Little-endian is rather universal these days.])
                                                                                                                                  -
                                                                                                                                  145 *
                                                                                                                                  -
                                                                                                                                  146 * ### Packed structures, stored integers, and alignment ###
                                                                                                                                  -
                                                                                                                                  147 * When 2 or more contiguous data members are used in serializing (serialize_to_raw_data() or overridden
                                                                                                                                  -
                                                                                                                                  148 * version), they are packed together via `"#pragma pack"`. (Note that this affect entire `struct`s at a time
                                                                                                                                  -
                                                                                                                                  149 * only; hence we need to use some anonymously-typed grouping `struct`s named `m_packed`.)
                                                                                                                                  -
                                                                                                                                  150 *
                                                                                                                                  -
                                                                                                                                  151 * Numeric values are stored as unsigned integers, which is the most portable choice for serializing.
                                                                                                                                  -
                                                                                                                                  152 * Booleans are serialized as bytes for compactness.
                                                                                                                                  -
                                                                                                                                  153 *
                                                                                                                                  -
                                                                                                                                  154 * Some effort is made to keep fields aligned along word edges when serializing. There is not too much
                                                                                                                                  -
                                                                                                                                  155 * of that as of this writing, but we should remain vigilant as packet formats become more complex over time.
                                                                                                                                  -
                                                                                                                                  156 *
                                                                                                                                  -
                                                                                                                                  157 * @todo With C++11, some lines of code could be eliminated by using `using` for Low_lvl_packet sub-types
                                                                                                                                  -
                                                                                                                                  158 * to inherit the constructor(s) of Low_lvl_packet. (For some of the sub-types an explicit constructor
                                                                                                                                  -
                                                                                                                                  159 * would still be necessary, but it would just shadow the inherited one, which is fine and still saves lines
                                                                                                                                  -
                                                                                                                                  160 * in the other sub-types.) However, for now I've left it as-is, partially to be friendly to the Doxygen
                                                                                                                                  -
                                                                                                                                  161 * documentation generator, and partially to make the interface easy to read. Still, it may be better the other
                                                                                                                                  -
                                                                                                                                  162 * way.
                                                                                                                                  -
                                                                                                                                  163 */
                                                                                                                                  - - -
                                                                                                                                  166 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  -
                                                                                                                                  167 public util::Shared_ptr_alias_holder<boost::shared_ptr<Low_lvl_packet>>,
                                                                                                                                  -
                                                                                                                                  168 public log::Log_context,
                                                                                                                                  -
                                                                                                                                  169 private boost::noncopyable
                                                                                                                                  -
                                                                                                                                  170{
                                                                                                                                  -
                                                                                                                                  171 // Types.
                                                                                                                                  -
                                                                                                                                  172
                                                                                                                                  -
                                                                                                                                  173 /**
                                                                                                                                  -
                                                                                                                                  174 * Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory area.
                                                                                                                                  -
                                                                                                                                  175 *
                                                                                                                                  -
                                                                                                                                  176 * @todo Consider moving alias Low_lvl_packet::Const_buffer to `util` namespace or even outside it, as it is
                                                                                                                                  -
                                                                                                                                  177 * used commonly (or `boost::asio::const_buffer` is used where `Const_buffer` could be used for readability).
                                                                                                                                  -
                                                                                                                                  178 */
                                                                                                                                  -
                                                                                                                                  179 using Const_buffer = boost::asio::const_buffer;
                                                                                                                                  -
                                                                                                                                  180
                                                                                                                                  -
                                                                                                                                  181 /**
                                                                                                                                  -
                                                                                                                                  182 * Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory.
                                                                                                                                  -
                                                                                                                                  183 * This is a model of the `ConstBufferSequence` model in boost.asio, which means a `const` reference to this
                                                                                                                                  -
                                                                                                                                  184 * can be passed to boost.asio scatter-gathering send functions such as `Udp_socket::async_send_to()`;
                                                                                                                                  -
                                                                                                                                  185 * the scattered buffers represented by an instance of this type will be, at high performance, gathered
                                                                                                                                  -
                                                                                                                                  186 * into a single UDP datagram and sent over the wire if possible.
                                                                                                                                  -
                                                                                                                                  187 */
                                                                                                                                  -
                                                                                                                                  188 using Const_buffer_sequence = std::vector<Const_buffer>;
                                                                                                                                  -
                                                                                                                                  189
                                                                                                                                  -
                                                                                                                                  190 /// Type used for `m_security_token` member of a couple different packet types.
                                                                                                                                  -
                                                                                                                                  191 using security_token_t = uint64_t;
                                                                                                                                  -
                                                                                                                                  192
                                                                                                                                  -
                                                                                                                                  193 /**
                                                                                                                                  -
                                                                                                                                  194 * Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  -
                                                                                                                                  195 *
                                                                                                                                  -
                                                                                                                                  196 * Why 8 bits? This handles up 255 retransmissions, which is long after we'd kill the connection
                                                                                                                                  -
                                                                                                                                  197 * anyway.
                                                                                                                                  -
                                                                                                                                  198 */
                                                                                                                                  - -
                                                                                                                                  200
                                                                                                                                  -
                                                                                                                                  201 /// Type used to store the size of `m_rcv_wnd` member in a couple of different packet types.
                                                                                                                                  -
                                                                                                                                  202 using rcv_wnd_t = uint32_t;
                                                                                                                                  -
                                                                                                                                  203
                                                                                                                                  -
                                                                                                                                  204 /* Data: These are actual Common Header payload.
                                                                                                                                  -
                                                                                                                                  205 *
                                                                                                                                  -
                                                                                                                                  206 * These are common to all packet types, since we are super-`struct` to all actual packet types.
                                                                                                                                  -
                                                                                                                                  207 *
                                                                                                                                  -
                                                                                                                                  208 * Note the implicit data field typeid(*this) which identifies the actual type of this packet.
                                                                                                                                  -
                                                                                                                                  209 * (C++ subtlety: typeid(this) will just yield typeid(Low_lvl_packet), which isn't that useful;
                                                                                                                                  -
                                                                                                                                  210 * but typeid(*this) will actually get you typeid(Data_packet), typeid(Ack_packet), etc. */
                                                                                                                                  -
                                                                                                                                  211
                                                                                                                                  -
                                                                                                                                  212 /**
                                                                                                                                  -
                                                                                                                                  213 * Option indicating whether this connection is using retransmission or not. This value must not
                                                                                                                                  -
                                                                                                                                  214 * change over the course of a connection and is provided in each packet for simpler
                                                                                                                                  -
                                                                                                                                  215 * deserialization (so that the latter can proceed completely without having to check the
                                                                                                                                  -
                                                                                                                                  216 * connection properties).
                                                                                                                                  -
                                                                                                                                  217 *
                                                                                                                                  -
                                                                                                                                  218 * For a given connection handshake, the SYN receiver should either disconnect/RST or respond with
                                                                                                                                  -
                                                                                                                                  219 * SYN_ACK. If it responds with SYN_ACK, it indicates agreement to abide by this option for the
                                                                                                                                  -
                                                                                                                                  220 * rest of the connection.
                                                                                                                                  -
                                                                                                                                  221 */
                                                                                                                                  - -
                                                                                                                                  223
                                                                                                                                  -
                                                                                                                                  224#pragma pack(push, 1)
                                                                                                                                  -
                                                                                                                                  225 /// Packed group affected by `#pragma pack`.
                                                                                                                                  -
                                                                                                                                  226 struct
                                                                                                                                  -
                                                                                                                                  227 {
                                                                                                                                  -
                                                                                                                                  228 // Data.
                                                                                                                                  -
                                                                                                                                  229
                                                                                                                                  -
                                                                                                                                  230 /// Flow-protocol port # of socket in sending Node.
                                                                                                                                  - -
                                                                                                                                  232 /// Flow-protocol port # of socket in receiving Node.
                                                                                                                                  - - -
                                                                                                                                  235#pragma pack(pop)
                                                                                                                                  -
                                                                                                                                  236
                                                                                                                                  -
                                                                                                                                  237 // Type checks.
                                                                                                                                  -
                                                                                                                                  238 static_assert(std::numeric_limits<flow_port_t>::is_integer
                                                                                                                                  -
                                                                                                                                  239 && (!std::numeric_limits<flow_port_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  240 "Ports are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  241
                                                                                                                                  -
                                                                                                                                  242 // Data: These are peripheral (not actual packet payload).
                                                                                                                                  -
                                                                                                                                  243
                                                                                                                                  -
                                                                                                                                  244 /// `ostream` manipulator (argument to `ostream <<`) that will output packet's type ("ACK", "RST", etc.).
                                                                                                                                  -
                                                                                                                                  245 const Function<std::ostream& (std::ostream&)> m_type_ostream_manip;
                                                                                                                                  -
                                                                                                                                  246
                                                                                                                                  -
                                                                                                                                  247 /// `ostream` manipulator (argument to `ostream <<`) that will output packet info suitable for DATA log level.
                                                                                                                                  -
                                                                                                                                  248 const Function<std::ostream& (std::ostream&)> m_verbose_ostream_manip;
                                                                                                                                  -
                                                                                                                                  249
                                                                                                                                  -
                                                                                                                                  250 /// `ostream` manipulator (argument to `ostream <<`) that will output packet info suitable for TRACE log level.
                                                                                                                                  -
                                                                                                                                  251 const Function<std::ostream& (std::ostream&)> m_concise_ostream_manip;
                                                                                                                                  -
                                                                                                                                  252
                                                                                                                                  -
                                                                                                                                  253 // Methods.
                                                                                                                                  -
                                                                                                                                  254
                                                                                                                                  -
                                                                                                                                  255 /**
                                                                                                                                  -
                                                                                                                                  256 * Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type specified
                                                                                                                                  -
                                                                                                                                  257 * as the template parameter (Ack_packet, Rst_packet, etc.). Since any constructor is not public, this is
                                                                                                                                  -
                                                                                                                                  258 * the only way to instantiate a blank Low_lvl_packet sub-object.
                                                                                                                                  -
                                                                                                                                  259 *
                                                                                                                                  -
                                                                                                                                  260 * Compiler template parameter inference should make the following work, so the template parameter can be omitted.:
                                                                                                                                  -
                                                                                                                                  261 *
                                                                                                                                  -
                                                                                                                                  262 * ~~~
                                                                                                                                  -
                                                                                                                                  263 * shared_ptr<Ack_packet> = create_uninit_packet(get_logger());
                                                                                                                                  -
                                                                                                                                  264 * // ^-- Low_lvl_packet_sub was inferred to be Ack_packet based on the left hand side of the assignment.
                                                                                                                                  -
                                                                                                                                  265 * ~~~
                                                                                                                                  -
                                                                                                                                  266 *
                                                                                                                                  -
                                                                                                                                  267 * @tparam Low_lvl_packet_sub
                                                                                                                                  -
                                                                                                                                  268 * Any type deriving from Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  269 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  270 * Logger to use subsequently in the new object.
                                                                                                                                  -
                                                                                                                                  271 * @return Ref-counted pointer to newly created object of the specified type.
                                                                                                                                  -
                                                                                                                                  272 * If you need an up-cast pointer, use create_uninit_packet_base().
                                                                                                                                  -
                                                                                                                                  273 */
                                                                                                                                  -
                                                                                                                                  274 template<typename Low_lvl_packet_sub>
                                                                                                                                  -
                                                                                                                                  275 static boost::shared_ptr<Low_lvl_packet_sub> create_uninit_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  276
                                                                                                                                  -
                                                                                                                                  277 /**
                                                                                                                                  -
                                                                                                                                  278 * A simple convenience method that casts the result of create_uninit_packet() from `shared_ptr<T>`, where `T` is a
                                                                                                                                  -
                                                                                                                                  279 * sub-type of Low_lvl_packet, to `shared_ptr<Low_lvl_packet>` a/k/a Ptr.
                                                                                                                                  -
                                                                                                                                  280 *
                                                                                                                                  -
                                                                                                                                  281 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  282 * See create_uninit_packet().
                                                                                                                                  -
                                                                                                                                  283 * @return See create_uninit_packet() (but cast to a type compatible with the polymorphic base type).
                                                                                                                                  -
                                                                                                                                  284 */
                                                                                                                                  -
                                                                                                                                  285 template<typename Low_lvl_packet_sub>
                                                                                                                                  -
                                                                                                                                  286 static Ptr create_uninit_packet_base(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  287
                                                                                                                                  -
                                                                                                                                  288 /**
                                                                                                                                  -
                                                                                                                                  289 * Constructs packet on the heap with values determined by the given raw binary data as presumably
                                                                                                                                  -
                                                                                                                                  290 * received from the wire and originally serialized by a compatible serializing Node. The returned
                                                                                                                                  -
                                                                                                                                  291 * value is a reference-counted pointer with a reference count of 1 (i.e., no other references to
                                                                                                                                  -
                                                                                                                                  292 * underlying object have been saved anywhere by the time method returns).
                                                                                                                                  -
                                                                                                                                  293 *
                                                                                                                                  -
                                                                                                                                  294 * It is the opposite of serialize_to_raw_data() but not symmetrically efficient; where the latter
                                                                                                                                  -
                                                                                                                                  295 * produces a sequence of pointers/lengths of already present areas of memory (no copying), the present method
                                                                                                                                  -
                                                                                                                                  296 * copies the raw data into a new structure and is thus less efficient.
                                                                                                                                  -
                                                                                                                                  297 *
                                                                                                                                  -
                                                                                                                                  298 * Suppose `ptr` is returned. Then `*ptr` is of polymorphic type `Low_lvl_packet*` but actually is
                                                                                                                                  -
                                                                                                                                  299 * of some specific sub-type (like `Ack_packet*`). `typeid(*ptr)` can be used to determine the exact type.
                                                                                                                                  -
                                                                                                                                  300 * In particular one can write things like: `bool is_ack = typeid(*ptr) == typeid(Ack_packet)`.
                                                                                                                                  -
                                                                                                                                  301 * Of course, in many cases one may call one of a number of virtual methods of Low_lvl_packet to get
                                                                                                                                  -
                                                                                                                                  302 * type-specific polymorphic behavior.
                                                                                                                                  -
                                                                                                                                  303 *
                                                                                                                                  -
                                                                                                                                  304 * @see m_type_ostream_manip() for easy way to output human-readable version of `typeid(*ptr).name()`, where
                                                                                                                                  -
                                                                                                                                  305 * `ptr` is the value returned.
                                                                                                                                  -
                                                                                                                                  306 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  307 * Pointer to entire packet raw buffer as received over the wire.
                                                                                                                                  -
                                                                                                                                  308 * Upon return, the state of `*raw_packet` is not known; and caller retains
                                                                                                                                  -
                                                                                                                                  309 * ownership of it (e.g., can read another datagram into it if desired). As of this writing it will either
                                                                                                                                  -
                                                                                                                                  310 * remain unchanged or be emptied (via a move elsewhere) -- but ideally code without relying on either specific
                                                                                                                                  -
                                                                                                                                  311 * outcome.
                                                                                                                                  -
                                                                                                                                  312 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  313 * If `true`, the method should (if at all reasonable) not alter `raw_packet->capacity()` (in particular
                                                                                                                                  -
                                                                                                                                  314 * it should not use move semantics to send its contents to another data structure); otherwise
                                                                                                                                  -
                                                                                                                                  315 * it should be free to do so (i.e., if it considers doing so beneficial for performance reasons).
                                                                                                                                  -
                                                                                                                                  316 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  317 * Will be used to log within this method as well as be saved as the
                                                                                                                                  -
                                                                                                                                  318 * `Logger*` in the new Low_lvl_packet created and returned (if any).
                                                                                                                                  -
                                                                                                                                  319 * @return A null pointer on failure; otherwise pointer to an object of some sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  320 */
                                                                                                                                  -
                                                                                                                                  321 static Ptr create_from_raw_data_packet(log::Logger* logger_ptr, util::Blob* raw_packet, bool prefer_no_move);
                                                                                                                                  -
                                                                                                                                  322
                                                                                                                                  -
                                                                                                                                  323 /**
                                                                                                                                  -
                                                                                                                                  324 * Serializes the current logical packet data from `*this` into the given `Const_buffer_sequence`,
                                                                                                                                  -
                                                                                                                                  325 * which is a sequence of pointers and lengths of existing scattered areas in memory, presumably
                                                                                                                                  -
                                                                                                                                  326 * for transmission over the wire to a compatible serializing Node.
                                                                                                                                  -
                                                                                                                                  327 *
                                                                                                                                  -
                                                                                                                                  328 * It is the opposite of create_from_raw_data_packet() but not symmetrically efficient; where the latter
                                                                                                                                  -
                                                                                                                                  329 * copies the raw data into a new structure, the present method produces a sequence of pointers/lengths
                                                                                                                                  -
                                                                                                                                  330 * of already present areas of memory (no copying) and is thus more efficient.
                                                                                                                                  -
                                                                                                                                  331 *
                                                                                                                                  -
                                                                                                                                  332 * The input `*raw_bufs` is appended to and is *not* cleared by this method. Thus one may use this
                                                                                                                                  -
                                                                                                                                  333 * method to produce a larger buffer sequence of which the serialization of `*this` is only a part
                                                                                                                                  -
                                                                                                                                  334 * (possibly in the middle somewhere).
                                                                                                                                  -
                                                                                                                                  335 *
                                                                                                                                  -
                                                                                                                                  336 * Behavior is undefined if one modifies `*this` after calling the present method. It is safer to
                                                                                                                                  -
                                                                                                                                  337 * run this on a `const Low_lvl_packet` rather than a mutable Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  338 *
                                                                                                                                  -
                                                                                                                                  339 * @warning This efficiency comes with an important caveat: the generated additions to `*raw_bufs` will
                                                                                                                                  -
                                                                                                                                  340 * remain valid *only* while `*this` exists. If its destructor runs, the buffers added here
                                                                                                                                  -
                                                                                                                                  341 * will become invalid, and accessing them will result in undefined behavior.
                                                                                                                                  -
                                                                                                                                  342 *
                                                                                                                                  -
                                                                                                                                  343 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  344 * Pointer to the sequence of `Const_buffer`s into which we will append pointers/lengths
                                                                                                                                  -
                                                                                                                                  345 * of serialized data.
                                                                                                                                  -
                                                                                                                                  346 * @return Size in bytes of the data references to which have been appended to `*raw_bufs`;
                                                                                                                                  -
                                                                                                                                  347 * Already present data are not included.
                                                                                                                                  -
                                                                                                                                  348 */
                                                                                                                                  -
                                                                                                                                  349 virtual size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const = 0;
                                                                                                                                  -
                                                                                                                                  350
                                                                                                                                  -
                                                                                                                                  351 /**
                                                                                                                                  -
                                                                                                                                  352 * Identical to serialize_to_raw_data() but adds log-level-appropriate logging after the operation.
                                                                                                                                  -
                                                                                                                                  353 *
                                                                                                                                  -
                                                                                                                                  354 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  355 * See serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  356 * @return See serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  357 */
                                                                                                                                  - -
                                                                                                                                  359
                                                                                                                                  -
                                                                                                                                  360 /**
                                                                                                                                  -
                                                                                                                                  361 * Returns a brief (a few characters) string description of the given packet type given as
                                                                                                                                  -
                                                                                                                                  362 * `type_index(typeid(p))`, where `p` is a reference to an instance of a concrete Low_lvl_packet sub-type.
                                                                                                                                  -
                                                                                                                                  363 *
                                                                                                                                  -
                                                                                                                                  364 * @param type_id
                                                                                                                                  -
                                                                                                                                  365 * See above. If the `p` points to a value of some other type, behavior is undefined.
                                                                                                                                  -
                                                                                                                                  366 * @return Reference to a string without newlines or other whitespace: "DATA", "ACK", "SYN_ACK_ACK", etc.
                                                                                                                                  -
                                                                                                                                  367 */
                                                                                                                                  -
                                                                                                                                  368 static const std::string& type_id_to_str(const std::type_index& type_id);
                                                                                                                                  -
                                                                                                                                  369
                                                                                                                                  -
                                                                                                                                  370protected:
                                                                                                                                  -
                                                                                                                                  371 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  372
                                                                                                                                  -
                                                                                                                                  373 /**
                                                                                                                                  -
                                                                                                                                  374 * Constructs packet with uninitialized (essentially random) values. This is not public, because
                                                                                                                                  -
                                                                                                                                  375 * a Low_lvl_packet is meaningless without being of some specific sub-type referring to an actual
                                                                                                                                  -
                                                                                                                                  376 * packet (e.g., Ack_packet, Rst_packet, etc.). (The presence of pure virtual methods would probably
                                                                                                                                  -
                                                                                                                                  377 * accomplish this too, but it's nice to be explicit.)
                                                                                                                                  -
                                                                                                                                  378 *
                                                                                                                                  -
                                                                                                                                  379 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  380 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  381 */
                                                                                                                                  -
                                                                                                                                  382 explicit Low_lvl_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  383
                                                                                                                                  -
                                                                                                                                  384 // Methods.
                                                                                                                                  -
                                                                                                                                  385
                                                                                                                                  -
                                                                                                                                  386 /**
                                                                                                                                  -
                                                                                                                                  387 * Helper for serialize_to_raw_data() implementations in sub-types that encodes the header common to all
                                                                                                                                  -
                                                                                                                                  388 * packet types, starting with the packet type ID leading that header.
                                                                                                                                  -
                                                                                                                                  389 *
                                                                                                                                  -
                                                                                                                                  390 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  391 * See serialize_to_raw_data(). Header fields are encoded and appended to this.
                                                                                                                                  -
                                                                                                                                  392 * @return See serialize_to_raw_data(). The total # of bytes encoded and appended to `*raw_bufs` by the call.
                                                                                                                                  -
                                                                                                                                  393 */
                                                                                                                                  - -
                                                                                                                                  395
                                                                                                                                  -
                                                                                                                                  396 /**
                                                                                                                                  -
                                                                                                                                  397 * Writes a multi-line representation of `*this` to an output stream.
                                                                                                                                  -
                                                                                                                                  398 *
                                                                                                                                  -
                                                                                                                                  399 * Unless the sub-type needs to add no information of its own (as of this writing, the case for Rst_packet),
                                                                                                                                  -
                                                                                                                                  400 * this implementation (of this virtual method) is only present as a utility for the sub-types.
                                                                                                                                  -
                                                                                                                                  401 * The sub-type is recommended to first call this implementation; then add type-specific lines
                                                                                                                                  -
                                                                                                                                  402 * afterwards, ending with a newline. Following this recommendation will result in uniform, decent-looking
                                                                                                                                  -
                                                                                                                                  403 * overall output.
                                                                                                                                  -
                                                                                                                                  404 *
                                                                                                                                  -
                                                                                                                                  405 * @note This is protected, because it is meant only to be used in the implementation of
                                                                                                                                  -
                                                                                                                                  406 * the `ostream` manipulators #m_verbose_ostream_manip and #m_concise_ostream_manip, which
                                                                                                                                  -
                                                                                                                                  407 * are public and to be used by users of this type.
                                                                                                                                  -
                                                                                                                                  408 * @param os
                                                                                                                                  -
                                                                                                                                  409 * The output stream to use. Normally I'd make this a pointer, but this non-constant reference is
                                                                                                                                  -
                                                                                                                                  410 * fairly typical in STL and the world in general, for `ostream` in particular.
                                                                                                                                  -
                                                                                                                                  411 * @param verbose
                                                                                                                                  -
                                                                                                                                  412 * If `false`, output suitable for TRACE level logging is produced; otherwise for DATA level logging.
                                                                                                                                  -
                                                                                                                                  413 * @return `os`.
                                                                                                                                  -
                                                                                                                                  414 */
                                                                                                                                  -
                                                                                                                                  415 virtual std::ostream& to_ostream(std::ostream& os, bool verbose = false) const;
                                                                                                                                  -
                                                                                                                                  416
                                                                                                                                  -
                                                                                                                                  417 /**
                                                                                                                                  -
                                                                                                                                  418 * Returns `true`, at compile time, if and only if the native memory representation is big-endian, meaning,
                                                                                                                                  -
                                                                                                                                  419 * for example, the value `uint32_t(1)` is stored as the bytes, in order, 0x00 0x00 0x00 0x01, and not the reverse.
                                                                                                                                  -
                                                                                                                                  420 * Can be used in a compile-time check such as `static_assert()`.
                                                                                                                                  -
                                                                                                                                  421 *
                                                                                                                                  -
                                                                                                                                  422 * @return See above.
                                                                                                                                  -
                                                                                                                                  423 */
                                                                                                                                  -
                                                                                                                                  424 static constexpr bool native_is_big_endian();
                                                                                                                                  -
                                                                                                                                  425
                                                                                                                                  -
                                                                                                                                  426private:
                                                                                                                                  -
                                                                                                                                  427 // Types.
                                                                                                                                  -
                                                                                                                                  428
                                                                                                                                  -
                                                                                                                                  429#pragma pack(push, 1)
                                                                                                                                  -
                                                                                                                                  430
                                                                                                                                  -
                                                                                                                                  431 /**
                                                                                                                                  -
                                                                                                                                  432 * Helper data store type for storing binary data needed by serialize_to_raw_data(), when certains bits
                                                                                                                                  -
                                                                                                                                  433 * are not already represented by the public data members present in `struct` Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  434 *
                                                                                                                                  -
                                                                                                                                  435 * The need for this is somewhat subtle and is explained fully inside Low_lvl_packet::serialize_to_raw_data(),
                                                                                                                                  -
                                                                                                                                  436 * so I won't go into it here. Also see each data member's doc header.
                                                                                                                                  -
                                                                                                                                  437 */
                                                                                                                                  - -
                                                                                                                                  439 private boost::noncopyable
                                                                                                                                  -
                                                                                                                                  440 {
                                                                                                                                  -
                                                                                                                                  441 /**
                                                                                                                                  -
                                                                                                                                  442 * This is the serialized version of the multi-byte `bool` Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  -
                                                                                                                                  443 * Since the latter is of a more civilized `bool` type, and we need a single byte version, this here
                                                                                                                                  -
                                                                                                                                  444 * is set to the obvious encoding of the `bool`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  -
                                                                                                                                  445 * serialize said `bool`.
                                                                                                                                  -
                                                                                                                                  446 */
                                                                                                                                  - -
                                                                                                                                  448
                                                                                                                                  -
                                                                                                                                  449 /**
                                                                                                                                  -
                                                                                                                                  450 * Unused space reserved for future use, ensuring correct alignment of other fields and
                                                                                                                                  -
                                                                                                                                  451 * headers. Currently it must be always set to zero. Since Low_lvl_packet has no need of a public
                                                                                                                                  -
                                                                                                                                  452 * data member like this, we keep it in here, as needed for Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  453 */
                                                                                                                                  -
                                                                                                                                  454 const uint16_t m_reserved2;
                                                                                                                                  -
                                                                                                                                  455
                                                                                                                                  -
                                                                                                                                  456 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  457
                                                                                                                                  -
                                                                                                                                  458 /// Constructs a mostly-uninitialized object, except for the `const` member(s), if any.
                                                                                                                                  -
                                                                                                                                  459 explicit Aux_raw_data();
                                                                                                                                  -
                                                                                                                                  460 };
                                                                                                                                  -
                                                                                                                                  461
                                                                                                                                  -
                                                                                                                                  462#pragma pack(pop)
                                                                                                                                  -
                                                                                                                                  463
                                                                                                                                  -
                                                                                                                                  464 /**
                                                                                                                                  -
                                                                                                                                  465 * A simple, unmodifiable data store that contains the properties unique to each packet type a/k/a
                                                                                                                                  -
                                                                                                                                  466 * concrete sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  467 */
                                                                                                                                  -
                                                                                                                                  468 struct Packet_type_info // Cannot use boost::noncopyable, as that disables direct member initialization.
                                                                                                                                  -
                                                                                                                                  469 {
                                                                                                                                  -
                                                                                                                                  470 /// The type ID value, in serialized order, to be used in each serialization of all packets of this type.
                                                                                                                                  - -
                                                                                                                                  472
                                                                                                                                  -
                                                                                                                                  473 /// The brief string representation of this packet type, suitable for Low_lvl_packet::type_id_to_str().
                                                                                                                                  -
                                                                                                                                  474 const std::string m_type_id_str;
                                                                                                                                  -
                                                                                                                                  475 };
                                                                                                                                  -
                                                                                                                                  476
                                                                                                                                  -
                                                                                                                                  477 // Methods.
                                                                                                                                  -
                                                                                                                                  478
                                                                                                                                  -
                                                                                                                                  479 /**
                                                                                                                                  -
                                                                                                                                  480 * Writes a brief representation of `typeid(*this)` -- i.e., the packet type (ACK, RST, etc.) --
                                                                                                                                  -
                                                                                                                                  481 * to an output stream. See also type_id_to_str().
                                                                                                                                  -
                                                                                                                                  482 *
                                                                                                                                  -
                                                                                                                                  483 * @note This is private, because it is meant only to be used in the implementation of
                                                                                                                                  -
                                                                                                                                  484 * the `ostream` manipulator #m_type_ostream_manip, which is public and to be used by users of this type.
                                                                                                                                  -
                                                                                                                                  485 * @param os
                                                                                                                                  -
                                                                                                                                  486 * The output stream to use. Normally I'd make this a pointer, but this non-constant reference is
                                                                                                                                  -
                                                                                                                                  487 * fairly typical in STL and the world in general, for `ostream` in particular.
                                                                                                                                  -
                                                                                                                                  488 * @return `os`.
                                                                                                                                  -
                                                                                                                                  489 */
                                                                                                                                  -
                                                                                                                                  490 std::ostream& type_to_ostream(std::ostream& os) const;
                                                                                                                                  -
                                                                                                                                  491
                                                                                                                                  -
                                                                                                                                  492 /**
                                                                                                                                  -
                                                                                                                                  493 * Helper that looks up the Packet_type_info::m_raw_type_id value for the given `typeid(p)`, where `p` refers
                                                                                                                                  -
                                                                                                                                  494 * to an instance of a concrete sub-type of Low_lvl_packet. Note that is returns a reference, and indeed the referred
                                                                                                                                  -
                                                                                                                                  495 * to memory will remain valid and unmodified throughout the program's runtime. Therefore, it can be used
                                                                                                                                  -
                                                                                                                                  496 * for serialization without copying.
                                                                                                                                  -
                                                                                                                                  497 *
                                                                                                                                  -
                                                                                                                                  498 * ### Implementation note ###
                                                                                                                                  -
                                                                                                                                  499 * It would be nice to make this `constexpr`, as then it can be used in `switch()` statement
                                                                                                                                  -
                                                                                                                                  500 * conditionals. Unfortunately, at least as of C++17, this is not possible with our current implementation:
                                                                                                                                  -
                                                                                                                                  501 * #S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO is an `unordered_map` (as of this writing), and that is not a "literal"
                                                                                                                                  -
                                                                                                                                  502 * type (in other words, lookups in it are not done at compile time, even when for a human it would seem clearly
                                                                                                                                  -
                                                                                                                                  503 * possible... iterators and such are involved, and that goes beyond what `constexpr` evaluation can do).
                                                                                                                                  -
                                                                                                                                  504 *
                                                                                                                                  -
                                                                                                                                  505 * @param type_id
                                                                                                                                  -
                                                                                                                                  506 * See type_id_to_str().
                                                                                                                                  -
                                                                                                                                  507 * @return Reference to a constant area of memory.
                                                                                                                                  -
                                                                                                                                  508 */
                                                                                                                                  -
                                                                                                                                  509 static const uint8_t& type_id_native_to_raw(const std::type_info& type_id);
                                                                                                                                  -
                                                                                                                                  510
                                                                                                                                  -
                                                                                                                                  511 /**
                                                                                                                                  -
                                                                                                                                  512 * `virtual` helper for create_from_raw_data_packet() that fills out the fields of `*this` that are *not*
                                                                                                                                  -
                                                                                                                                  513 * in Low_lvl_packet but rather in the sub-type.
                                                                                                                                  -
                                                                                                                                  514 *
                                                                                                                                  -
                                                                                                                                  515 * `*raw_buf` must represent the area of create_from_raw_data_packet()'s `*raw_buf` argument immediately
                                                                                                                                  -
                                                                                                                                  516 * following the Common Header, which is the area deserialized into Low_lvl_packet proper. Hence
                                                                                                                                  -
                                                                                                                                  517 * `*raw_buf` must point to and contain the length of the rest of that input buffer. The present method
                                                                                                                                  -
                                                                                                                                  518 * must then deserialize it into the sub-object's own fields.
                                                                                                                                  -
                                                                                                                                  519 *
                                                                                                                                  -
                                                                                                                                  520 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  521 * Pointer to immutable buffer just past the input raw packet data's Common Header area.
                                                                                                                                  -
                                                                                                                                  522 * Note that while the underlying area is immutable (hence the type #Const_buffer!),
                                                                                                                                  -
                                                                                                                                  523 * `*raw_buf` itself may be modified (i.e., the area to which it will refer on exit is undefined).
                                                                                                                                  -
                                                                                                                                  524 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  525 * See create_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  526 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  527 * See create_from_raw_data_packet(). `raw_buf` must start somewhere within it and be
                                                                                                                                  -
                                                                                                                                  528 * sized to go exactly to its end.
                                                                                                                                  -
                                                                                                                                  529 * @return `false` if create_from_raw_data_packet() should return `Ptr()` (error); `true` if
                                                                                                                                  -
                                                                                                                                  530 * deserialization successful.
                                                                                                                                  -
                                                                                                                                  531 */
                                                                                                                                  - -
                                                                                                                                  533 bool prefer_no_move, util::Blob* raw_packet) = 0;
                                                                                                                                  -
                                                                                                                                  534
                                                                                                                                  -
                                                                                                                                  535 // Constants.
                                                                                                                                  -
                                                                                                                                  536
                                                                                                                                  -
                                                                                                                                  537 /**
                                                                                                                                  -
                                                                                                                                  538 * Mapping from native `typeid()`, a/k/a packet type (for all possible packet types), to the set of properties of
                                                                                                                                  -
                                                                                                                                  539 * that packet type. The keys are every possible value of `type_index(typeid(p))`, where `p` is a reference
                                                                                                                                  -
                                                                                                                                  540 * to an instance of any concrete Low_lvl_packet sub-type.
                                                                                                                                  -
                                                                                                                                  541 *
                                                                                                                                  -
                                                                                                                                  542 * ### Implementation note ###
                                                                                                                                  -
                                                                                                                                  543 * An alternative way to implement this mechanism (as of this writing, raw type IDs and brief
                                                                                                                                  -
                                                                                                                                  544 * string descriptions per packet type) is to use `virtual` liberally, combined with a `switch` if needed. (Note,
                                                                                                                                  -
                                                                                                                                  545 * also, that a way to index -- such as in an `unordered` container -- by
                                                                                                                                  -
                                                                                                                                  546 * packet type is necessary elsewhere. We use `type_index(typeid()))` now, but a [worse] alternative is to have
                                                                                                                                  -
                                                                                                                                  547 * `virtual` type IDs returned for each Low_lvl_packet sub-type.) I could explain
                                                                                                                                  -
                                                                                                                                  548 * at length all the reasons why the chosen way is superior, but let me just give you the conclusion: I originally
                                                                                                                                  -
                                                                                                                                  549 * tried it the `virtual/switch` way. Instead of the raw type IDs and
                                                                                                                                  -
                                                                                                                                  550 * string descriptions being conveniently encapsulated in the present map (where there's little to no chance of
                                                                                                                                  -
                                                                                                                                  551 * conflicting values), they were distributed across `virtual` implementations. This was less maintainable; nor did
                                                                                                                                  -
                                                                                                                                  552 * it improve OO style, since the raw type ID values (at least) were
                                                                                                                                  -
                                                                                                                                  553 * still inter-dependent (were not allowed to conflict) in any case.
                                                                                                                                  -
                                                                                                                                  554 * The present solution does not pretend the actual contents of these values are of no interest to Low_lvl_packet
                                                                                                                                  -
                                                                                                                                  555 * itself (as opposed to the sub-types), and in not having to pretend this, all related code is quite a bit more
                                                                                                                                  -
                                                                                                                                  556 * compact and a bit more maintainable as well.
                                                                                                                                  -
                                                                                                                                  557 */
                                                                                                                                  -
                                                                                                                                  558 static const boost::unordered_map<std::type_index, Packet_type_info> S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO;
                                                                                                                                  -
                                                                                                                                  559
                                                                                                                                  -
                                                                                                                                  560 // Data.
                                                                                                                                  -
                                                                                                                                  561
                                                                                                                                  -
                                                                                                                                  562 /**
                                                                                                                                  -
                                                                                                                                  563 * Auxilliary data area necessary for serialize_to_raw_data() to work. This is explained in doc header
                                                                                                                                  -
                                                                                                                                  564 * for Aux_raw_data.
                                                                                                                                  -
                                                                                                                                  565 *
                                                                                                                                  -
                                                                                                                                  566 * It is declared `mutable`, because the conceptual state contained within a Low_lvl_packet is expressed
                                                                                                                                  -
                                                                                                                                  567 * via its public non-`const` data members. #m_aux_raw_data is merely a helper data store for
                                                                                                                                  -
                                                                                                                                  568 * the `const` method serialize_to_raw_data(). Since that method is `const`, this should be `mutable`,
                                                                                                                                  -
                                                                                                                                  569 * like a performance cache of sorts, only not exactly.
                                                                                                                                  -
                                                                                                                                  570 */
                                                                                                                                  - -
                                                                                                                                  572}; // struct Low_lvl_packet
                                                                                                                                  -
                                                                                                                                  573
                                                                                                                                  -
                                                                                                                                  574/**
                                                                                                                                  -
                                                                                                                                  575 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  -
                                                                                                                                  576 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  577 *
                                                                                                                                  -
                                                                                                                                  578 * A SYN packet is sent by the actively connecting peer to a passively listening server socket.
                                                                                                                                  -
                                                                                                                                  579 * Thus a SYN arises from the Node that performs `Node::connect...()`. In response, a Syn_ack_packet
                                                                                                                                  -
                                                                                                                                  580 * is expected.
                                                                                                                                  -
                                                                                                                                  581 */
                                                                                                                                  - -
                                                                                                                                  583{
                                                                                                                                  -
                                                                                                                                  584 // Data.
                                                                                                                                  -
                                                                                                                                  585
                                                                                                                                  -
                                                                                                                                  586 /**
                                                                                                                                  -
                                                                                                                                  587 * The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be
                                                                                                                                  -
                                                                                                                                  588 * using in `Data_packet`s over this connection, if it succeeds. All bytes actually sent by the
                                                                                                                                  -
                                                                                                                                  589 * SYN sender will start with this ISN + 1 and increment by 1 for each byte in the stream further.
                                                                                                                                  -
                                                                                                                                  590 * A retransmission of a given datum starting with sequence number S will still start with sequence number
                                                                                                                                  -
                                                                                                                                  591 * S.
                                                                                                                                  -
                                                                                                                                  592 */
                                                                                                                                  - -
                                                                                                                                  594
                                                                                                                                  -
                                                                                                                                  595 /**
                                                                                                                                  -
                                                                                                                                  596 * Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by
                                                                                                                                  -
                                                                                                                                  597 * the user on the other side.
                                                                                                                                  -
                                                                                                                                  598 *
                                                                                                                                  -
                                                                                                                                  599 * @todo Possibly eliminate this, since NetFlow is reliable; the metadata can just be sent explicitly by the
                                                                                                                                  -
                                                                                                                                  600 * user once the connection is established. However, for now reliability is optional.
                                                                                                                                  -
                                                                                                                                  601 */
                                                                                                                                  - -
                                                                                                                                  603
                                                                                                                                  -
                                                                                                                                  604 // Type checks.
                                                                                                                                  -
                                                                                                                                  605 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  -
                                                                                                                                  606 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  607 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  608
                                                                                                                                  -
                                                                                                                                  609 /// In serialized packet, the type ID byte identifying this as a SYN packet. Must not equal any other packet type's.
                                                                                                                                  -
                                                                                                                                  610 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  -
                                                                                                                                  611
                                                                                                                                  -
                                                                                                                                  612 // Methods.
                                                                                                                                  -
                                                                                                                                  613
                                                                                                                                  -
                                                                                                                                  614 /**
                                                                                                                                  -
                                                                                                                                  615 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  616 *
                                                                                                                                  -
                                                                                                                                  617 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  618 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  619 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  620 */
                                                                                                                                  -
                                                                                                                                  621 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  622
                                                                                                                                  -
                                                                                                                                  623private:
                                                                                                                                  -
                                                                                                                                  624 // Friends.
                                                                                                                                  -
                                                                                                                                  625
                                                                                                                                  -
                                                                                                                                  626 /// Friend of Syn_packet: For access to private constructor `Syn_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  627 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  628 friend boost::shared_ptr<Syn_packet> Low_lvl_packet::create_uninit_packet<Syn_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  629
                                                                                                                                  -
                                                                                                                                  630 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  631
                                                                                                                                  -
                                                                                                                                  632 /**
                                                                                                                                  -
                                                                                                                                  633 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  634 *
                                                                                                                                  -
                                                                                                                                  635 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  636 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  637 */
                                                                                                                                  -
                                                                                                                                  638 explicit Syn_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  639
                                                                                                                                  -
                                                                                                                                  640 // Methods.
                                                                                                                                  -
                                                                                                                                  641
                                                                                                                                  -
                                                                                                                                  642 /**
                                                                                                                                  -
                                                                                                                                  643 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  644 *
                                                                                                                                  -
                                                                                                                                  645 * @param os
                                                                                                                                  -
                                                                                                                                  646 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  647 * @param verbose
                                                                                                                                  -
                                                                                                                                  648 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  649 * @return `os`.
                                                                                                                                  -
                                                                                                                                  650 */
                                                                                                                                  -
                                                                                                                                  651 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  -
                                                                                                                                  652
                                                                                                                                  -
                                                                                                                                  653 /**
                                                                                                                                  -
                                                                                                                                  654 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  655 *
                                                                                                                                  -
                                                                                                                                  656 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  657 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  658 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  659 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  660 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  661 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  662 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  663 */
                                                                                                                                  - -
                                                                                                                                  665 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  666}; // struct Syn_packet
                                                                                                                                  -
                                                                                                                                  667
                                                                                                                                  -
                                                                                                                                  668/**
                                                                                                                                  -
                                                                                                                                  669 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  -
                                                                                                                                  670 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  671 *
                                                                                                                                  -
                                                                                                                                  672 * A SYN_ACK packet is sent by the passively listening server socket in response to a valid received SYN.
                                                                                                                                  -
                                                                                                                                  673 * Thus a SYN_ACK arises from the Node that performs Node::listen() and receives SYN. In response, a
                                                                                                                                  -
                                                                                                                                  674 * Syn_ack_ack_packet is expected to complete the 3-way handshake and establish a Peer_socket to Peer_socket
                                                                                                                                  -
                                                                                                                                  675 * connection.
                                                                                                                                  -
                                                                                                                                  676 */
                                                                                                                                  - -
                                                                                                                                  678{
                                                                                                                                  -
                                                                                                                                  679 // Data.
                                                                                                                                  -
                                                                                                                                  680
                                                                                                                                  -
                                                                                                                                  681 /**
                                                                                                                                  -
                                                                                                                                  682 * Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite
                                                                                                                                  -
                                                                                                                                  683 * traffic direction of the full-duplex connection being established.
                                                                                                                                  -
                                                                                                                                  684 */
                                                                                                                                  - -
                                                                                                                                  686
                                                                                                                                  -
                                                                                                                                  687#pragma pack(push, 1)
                                                                                                                                  -
                                                                                                                                  688 /// Packed group affected by `#pragma pack`.
                                                                                                                                  -
                                                                                                                                  689 struct
                                                                                                                                  -
                                                                                                                                  690 {
                                                                                                                                  -
                                                                                                                                  691 /**
                                                                                                                                  -
                                                                                                                                  692 * Random security token used during SYN_ACK-SYN_ACK_ACK. For a given connection handshake, the SYN_ACK_ACK
                                                                                                                                  -
                                                                                                                                  693 * receiver ensures that `Syn_ack_ack_packet` `m_security_token` it receives is equal to the original
                                                                                                                                  -
                                                                                                                                  694 * one it had sent (this #m_security_token here).
                                                                                                                                  -
                                                                                                                                  695 */
                                                                                                                                  - -
                                                                                                                                  697
                                                                                                                                  -
                                                                                                                                  698 /**
                                                                                                                                  -
                                                                                                                                  699 * Number of DATA payload bytes the sender of this packet would accept into its Receive buffer,
                                                                                                                                  -
                                                                                                                                  700 * without dropping, at the moment this packet was generated to send. This information is
                                                                                                                                  -
                                                                                                                                  701 * piggybacked into ACK (and SYN_ACK/SYN_ACK_ACK) packets.
                                                                                                                                  -
                                                                                                                                  702 *
                                                                                                                                  -
                                                                                                                                  703 * @todo We could be similar to TCP by opportunistically sending rcv_wnd in other packet types,
                                                                                                                                  -
                                                                                                                                  704 * namely Data_packet. However this would only help in connections with heavy 2-way traffic.
                                                                                                                                  -
                                                                                                                                  705 * Personally I would then prefer to create a new packet type instead, Rcv_wnd_packet, and also
                                                                                                                                  -
                                                                                                                                  706 * implement some generalized "packet combo" scheme which would allow to piggy-back arbitrary
                                                                                                                                  -
                                                                                                                                  707 * packet types together into a single packet; and then we'd dissociate
                                                                                                                                  -
                                                                                                                                  708 * ACK/SYN_ACK/SYN_ACK_ACK from rcv_wnd.
                                                                                                                                  -
                                                                                                                                  709 */
                                                                                                                                  - - -
                                                                                                                                  712#pragma pack(pop)
                                                                                                                                  -
                                                                                                                                  713
                                                                                                                                  -
                                                                                                                                  714 // Type checks.
                                                                                                                                  -
                                                                                                                                  715 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  -
                                                                                                                                  716 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  717 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  718 static_assert(std::numeric_limits<security_token_t>::is_integer
                                                                                                                                  -
                                                                                                                                  719 && (!std::numeric_limits<security_token_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  720 "Security tokens are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  721 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  -
                                                                                                                                  722 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  723 "rcv_wnd values are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  724
                                                                                                                                  -
                                                                                                                                  725 /// In serialized packet, the type ID byte identifying this as a SYN_ACK. Must not equal any other packet type's.
                                                                                                                                  -
                                                                                                                                  726 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  -
                                                                                                                                  727
                                                                                                                                  -
                                                                                                                                  728 // Methods.
                                                                                                                                  -
                                                                                                                                  729
                                                                                                                                  -
                                                                                                                                  730 /**
                                                                                                                                  -
                                                                                                                                  731 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  732 *
                                                                                                                                  -
                                                                                                                                  733 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  734 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  735 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  736 */
                                                                                                                                  -
                                                                                                                                  737 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  738
                                                                                                                                  -
                                                                                                                                  739private:
                                                                                                                                  -
                                                                                                                                  740 // Friends.
                                                                                                                                  -
                                                                                                                                  741
                                                                                                                                  -
                                                                                                                                  742 /// Friend of Syn_ack_packet: For access to private constructor `Syn_ack_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  743 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  744 friend boost::shared_ptr<Syn_ack_packet> Low_lvl_packet::create_uninit_packet<Syn_ack_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  745
                                                                                                                                  -
                                                                                                                                  746 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  747
                                                                                                                                  -
                                                                                                                                  748 /**
                                                                                                                                  -
                                                                                                                                  749 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  750 *
                                                                                                                                  -
                                                                                                                                  751 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  752 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  753 */
                                                                                                                                  -
                                                                                                                                  754 explicit Syn_ack_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  755
                                                                                                                                  -
                                                                                                                                  756 // Methods.
                                                                                                                                  -
                                                                                                                                  757
                                                                                                                                  -
                                                                                                                                  758 /**
                                                                                                                                  -
                                                                                                                                  759 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  760 *
                                                                                                                                  -
                                                                                                                                  761 * @param os
                                                                                                                                  -
                                                                                                                                  762 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  763 * @param verbose
                                                                                                                                  -
                                                                                                                                  764 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  765 * @return `os`.
                                                                                                                                  -
                                                                                                                                  766 */
                                                                                                                                  -
                                                                                                                                  767 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  -
                                                                                                                                  768
                                                                                                                                  -
                                                                                                                                  769 /**
                                                                                                                                  -
                                                                                                                                  770 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  771 *
                                                                                                                                  -
                                                                                                                                  772 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  773 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  774 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  775 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  776 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  777 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  778 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  779 */
                                                                                                                                  - -
                                                                                                                                  781 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  782};
                                                                                                                                  -
                                                                                                                                  783
                                                                                                                                  -
                                                                                                                                  784/**
                                                                                                                                  -
                                                                                                                                  785 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  -
                                                                                                                                  786 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  787 *
                                                                                                                                  -
                                                                                                                                  788 * A SYN_ACK_ACK packet is sent by the original SYN sender in response to a valid received SYN_ACK,
                                                                                                                                  -
                                                                                                                                  789 * completing the 3-way handshake and establishing a Peer_socket to Peer_socket connection.
                                                                                                                                  -
                                                                                                                                  790 */
                                                                                                                                  - -
                                                                                                                                  792{
                                                                                                                                  -
                                                                                                                                  793 // Data.
                                                                                                                                  -
                                                                                                                                  794
                                                                                                                                  -
                                                                                                                                  795#pragma pack(push, 1)
                                                                                                                                  -
                                                                                                                                  796 /// Packed group affected by `#pragma pack`.
                                                                                                                                  -
                                                                                                                                  797 struct
                                                                                                                                  -
                                                                                                                                  798 {
                                                                                                                                  -
                                                                                                                                  799 /**
                                                                                                                                  -
                                                                                                                                  800 * This must equal `Syn_ack_packet` `m_security_token` received in the packet to which `*this` is
                                                                                                                                  -
                                                                                                                                  801 * replying. The other side will only proceed with the connection if the two are equal.
                                                                                                                                  -
                                                                                                                                  802 */
                                                                                                                                  - -
                                                                                                                                  804
                                                                                                                                  -
                                                                                                                                  805 /**
                                                                                                                                  -
                                                                                                                                  806 * Same meaning as in `Syn_ack_packet` but applied to the essentially independent opposite
                                                                                                                                  -
                                                                                                                                  807 * traffic direction of the full-duplex connection being established.
                                                                                                                                  -
                                                                                                                                  808 */
                                                                                                                                  - - -
                                                                                                                                  811#pragma pack(pop)
                                                                                                                                  -
                                                                                                                                  812
                                                                                                                                  -
                                                                                                                                  813 // Type checks.
                                                                                                                                  -
                                                                                                                                  814 static_assert(std::numeric_limits<security_token_t>::is_integer
                                                                                                                                  -
                                                                                                                                  815 && (!std::numeric_limits<security_token_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  816 "Security tokens are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  817 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  -
                                                                                                                                  818 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  819 "rcv_wnd values are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  820
                                                                                                                                  -
                                                                                                                                  821 /// In serialized packet, the type ID byte identifying this as a SYN_ACK_ACK. Must not equal any other packet type's.
                                                                                                                                  -
                                                                                                                                  822 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  -
                                                                                                                                  823
                                                                                                                                  -
                                                                                                                                  824 // Methods.
                                                                                                                                  -
                                                                                                                                  825
                                                                                                                                  -
                                                                                                                                  826 /**
                                                                                                                                  -
                                                                                                                                  827 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  828 *
                                                                                                                                  -
                                                                                                                                  829 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  830 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  831 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  832 */
                                                                                                                                  -
                                                                                                                                  833 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  834
                                                                                                                                  -
                                                                                                                                  835private:
                                                                                                                                  -
                                                                                                                                  836 // Friends.
                                                                                                                                  -
                                                                                                                                  837
                                                                                                                                  -
                                                                                                                                  838 /// Friend of Syn_ack_ack_packet: For access to private constructor `Syn_ack_ack_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  839 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  840 friend boost::shared_ptr<Syn_ack_ack_packet> Low_lvl_packet::create_uninit_packet<Syn_ack_ack_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  841
                                                                                                                                  -
                                                                                                                                  842 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  843
                                                                                                                                  -
                                                                                                                                  844 /**
                                                                                                                                  -
                                                                                                                                  845 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  846 *
                                                                                                                                  -
                                                                                                                                  847 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  848 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  849 */
                                                                                                                                  -
                                                                                                                                  850 explicit Syn_ack_ack_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  851
                                                                                                                                  -
                                                                                                                                  852 // Methods.
                                                                                                                                  -
                                                                                                                                  853
                                                                                                                                  -
                                                                                                                                  854 /**
                                                                                                                                  -
                                                                                                                                  855 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  856 *
                                                                                                                                  -
                                                                                                                                  857 * @param os
                                                                                                                                  -
                                                                                                                                  858 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  859 * @param verbose
                                                                                                                                  -
                                                                                                                                  860 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  861 * @return `os`.
                                                                                                                                  -
                                                                                                                                  862 */
                                                                                                                                  -
                                                                                                                                  863 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  -
                                                                                                                                  864
                                                                                                                                  -
                                                                                                                                  865 /**
                                                                                                                                  -
                                                                                                                                  866 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  867 *
                                                                                                                                  -
                                                                                                                                  868 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  869 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  870 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  871 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  872 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  873 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  874 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  875 */
                                                                                                                                  - -
                                                                                                                                  877 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  878}; // struct Syn_ack_ack_packet
                                                                                                                                  -
                                                                                                                                  879
                                                                                                                                  -
                                                                                                                                  880/**
                                                                                                                                  -
                                                                                                                                  881 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  -
                                                                                                                                  882 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  883 *
                                                                                                                                  -
                                                                                                                                  884 * Each DATA packet contains actual data payload packetized from the application-provided stream
                                                                                                                                  -
                                                                                                                                  885 * of bytes. It is identified by the sequence number (encoded in this object) of the first
                                                                                                                                  -
                                                                                                                                  886 * byte of that payload. An individual acknowledgment inside an Ack_packet refers to the Data_packet
                                                                                                                                  -
                                                                                                                                  887 * by that first sequence number. If Low_lvl_packet::m_opt_rexmit_on is `true`, then #m_rexmit_id
                                                                                                                                  -
                                                                                                                                  888 * identifies which attempt at sending the payload with this sequence number and payload this
                                                                                                                                  -
                                                                                                                                  889 * packet represents: 0 is 1st attempt, 1 is 1st retry, 2 is 2nd retry, etc. If that option is off,
                                                                                                                                  -
                                                                                                                                  890 * then a lost packet is never retransmitted; and therefore #m_rexmit_id is always 0.
                                                                                                                                  -
                                                                                                                                  891 */
                                                                                                                                  - -
                                                                                                                                  893{
                                                                                                                                  -
                                                                                                                                  894 // Types.
                                                                                                                                  -
                                                                                                                                  895
                                                                                                                                  -
                                                                                                                                  896 /**
                                                                                                                                  -
                                                                                                                                  897 * Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  -
                                                                                                                                  898 *
                                                                                                                                  -
                                                                                                                                  899 * Why 8 bits? This handles up 255 retransmissions, which is long after we'd kill the connection
                                                                                                                                  -
                                                                                                                                  900 * anyway.
                                                                                                                                  -
                                                                                                                                  901 */
                                                                                                                                  - -
                                                                                                                                  903
                                                                                                                                  -
                                                                                                                                  904 // Data.
                                                                                                                                  -
                                                                                                                                  905
                                                                                                                                  -
                                                                                                                                  906 /**
                                                                                                                                  -
                                                                                                                                  907 * The sequence number of the first byte in the payload; i.e., of `m_data.front()`, a/k/a `m_data[0]`.
                                                                                                                                  -
                                                                                                                                  908 * Note that #m_data cannot be empty, so #m_seq_num is always meaningful.
                                                                                                                                  -
                                                                                                                                  909 */
                                                                                                                                  - -
                                                                                                                                  911
                                                                                                                                  -
                                                                                                                                  912 /**
                                                                                                                                  -
                                                                                                                                  913 * Retransmit counter of the DATA packet being sent. Identifies which attempt we are acknowledging
                                                                                                                                  -
                                                                                                                                  914 * (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Always 0 if `!m_opt_rexmit_on`.
                                                                                                                                  -
                                                                                                                                  915 */
                                                                                                                                  - -
                                                                                                                                  917
                                                                                                                                  -
                                                                                                                                  918 /**
                                                                                                                                  -
                                                                                                                                  919 * This is the serialized version of `m_data.size()` (see #m_data). We send this value, even though it could
                                                                                                                                  -
                                                                                                                                  920 * be figured out from the overall serialized size, to ensure integrity (see the deserialization logic for details).
                                                                                                                                  -
                                                                                                                                  921 * This here is set to `m_data.size()`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  -
                                                                                                                                  922 * serialize that value. Outside serialization `m_data.size()` is used directly, and this
                                                                                                                                  -
                                                                                                                                  923 * value is meaningless.
                                                                                                                                  -
                                                                                                                                  924 */
                                                                                                                                  -
                                                                                                                                  925 mutable uint16_t m_data_size_raw;
                                                                                                                                  -
                                                                                                                                  926
                                                                                                                                  -
                                                                                                                                  927 /**
                                                                                                                                  -
                                                                                                                                  928 * The payload. Cannot be `empty()`.
                                                                                                                                  -
                                                                                                                                  929 *
                                                                                                                                  -
                                                                                                                                  930 * As of this writing there is an important (for performance) subtlety about how this is originally filled in
                                                                                                                                  -
                                                                                                                                  931 * when deserializing a wire-arrived packet. See Data_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  932 */
                                                                                                                                  - -
                                                                                                                                  934
                                                                                                                                  -
                                                                                                                                  935 // Type checks.
                                                                                                                                  -
                                                                                                                                  936 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  -
                                                                                                                                  937 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  938 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  939 static_assert(std::numeric_limits<rexmit_id_t>::is_integer
                                                                                                                                  -
                                                                                                                                  940 && (!std::numeric_limits<rexmit_id_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  941 "Retransmission IDs are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  942
                                                                                                                                  -
                                                                                                                                  943 /// In serialized packet, the type ID byte identifying this as a DATA packet. Must not equal any other packet type's.
                                                                                                                                  -
                                                                                                                                  944 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  -
                                                                                                                                  945
                                                                                                                                  -
                                                                                                                                  946 // Methods.
                                                                                                                                  -
                                                                                                                                  947
                                                                                                                                  -
                                                                                                                                  948 /**
                                                                                                                                  -
                                                                                                                                  949 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  950 *
                                                                                                                                  -
                                                                                                                                  951 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  952 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  953 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  954 */
                                                                                                                                  -
                                                                                                                                  955 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  956
                                                                                                                                  -
                                                                                                                                  957private:
                                                                                                                                  -
                                                                                                                                  958 // Friends.
                                                                                                                                  -
                                                                                                                                  959
                                                                                                                                  -
                                                                                                                                  960 /// Friend of Data_packet: For access to private constructor `Data_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  961 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  962 friend boost::shared_ptr<Data_packet> Low_lvl_packet::create_uninit_packet<Data_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  963
                                                                                                                                  -
                                                                                                                                  964 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  965
                                                                                                                                  -
                                                                                                                                  966 /**
                                                                                                                                  -
                                                                                                                                  967 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  968 *
                                                                                                                                  -
                                                                                                                                  969 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  970 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  971 */
                                                                                                                                  -
                                                                                                                                  972 explicit Data_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  973
                                                                                                                                  -
                                                                                                                                  974 // Methods.
                                                                                                                                  -
                                                                                                                                  975
                                                                                                                                  -
                                                                                                                                  976 /**
                                                                                                                                  -
                                                                                                                                  977 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  978 *
                                                                                                                                  -
                                                                                                                                  979 * @param os
                                                                                                                                  -
                                                                                                                                  980 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  981 * @param verbose
                                                                                                                                  -
                                                                                                                                  982 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  983 * @return `os`.
                                                                                                                                  -
                                                                                                                                  984 */
                                                                                                                                  -
                                                                                                                                  985 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  -
                                                                                                                                  986
                                                                                                                                  -
                                                                                                                                  987 /**
                                                                                                                                  -
                                                                                                                                  988 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  989 *
                                                                                                                                  -
                                                                                                                                  990 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  991 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  992 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  993 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  994 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  995 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  996 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  997 */
                                                                                                                                  - -
                                                                                                                                  999 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  1000}; // struct Data_packet
                                                                                                                                  -
                                                                                                                                  1001
                                                                                                                                  -
                                                                                                                                  1002/**
                                                                                                                                  -
                                                                                                                                  1003 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  -
                                                                                                                                  1004 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  1005 *
                                                                                                                                  -
                                                                                                                                  1006 * Each ACK packet encapsulates 0 or more individual acknowledgments, each acknowledging receipt of
                                                                                                                                  -
                                                                                                                                  1007 * a specific, distinct Data_packaet; and the current rcv_wnd (receive window state) on the ACK sender's
                                                                                                                                  -
                                                                                                                                  1008 * side. The latter datum is always present. If individual acks are present, then the rcv_wnd advertising
                                                                                                                                  -
                                                                                                                                  1009 * is merely opportunistic. If NO individual acks are present, then the rcv_wnd advertising is intentional
                                                                                                                                  -
                                                                                                                                  1010 * for its own sake. The algorithm for the latter is discussed elsewhere.
                                                                                                                                  -
                                                                                                                                  1011 *
                                                                                                                                  -
                                                                                                                                  1012 * The mechanics of individual acks are further explored in the doc header for Ack_packet::Individual_ack
                                                                                                                                  -
                                                                                                                                  1013 * nested `struct`.
                                                                                                                                  -
                                                                                                                                  1014 *
                                                                                                                                  -
                                                                                                                                  1015 * @todo Conceivably, since Ack_packet actually stores 1+ acknowledgments, it should become Acks_packet, of
                                                                                                                                  -
                                                                                                                                  1016 * type ACKS (not ACK). Many comments and log messages would become clearer, as no one would assume an individual
                                                                                                                                  -
                                                                                                                                  1017 * packet's acknowledgment when reading "an ACK" or similar phrase.
                                                                                                                                  -
                                                                                                                                  1018 */
                                                                                                                                  - -
                                                                                                                                  1020{
                                                                                                                                  -
                                                                                                                                  1021 // Types.
                                                                                                                                  -
                                                                                                                                  1022
                                                                                                                                  -
                                                                                                                                  1023 /**
                                                                                                                                  -
                                                                                                                                  1024 * Type used to store the ACK delay for a given individual acknowledged packet. The value
                                                                                                                                  -
                                                                                                                                  1025 * specifies the number of multiples of `Ack_delay_time_unit(1)` comprising a packet's ACK delay.
                                                                                                                                  -
                                                                                                                                  1026 *
                                                                                                                                  -
                                                                                                                                  1027 * An earlier version of `net_flow` used the unit milliseconds and the encoding type uint16_t. The
                                                                                                                                  -
                                                                                                                                  1028 * reasoning was that this allowed a maximum ACK delay of ~65 sec which should be plenty; and that
                                                                                                                                  -
                                                                                                                                  1029 * the 1-millisecond finegrainedness was acceptable. However when implementing queue delay-based
                                                                                                                                  -
                                                                                                                                  1030 * congestion control (like FAST or Vegas) we realized it is important for RTTs (which use the ACK
                                                                                                                                  -
                                                                                                                                  1031 * delay value) to be quite precise (microsecond level or so). Therefore, to be totally safe, we
                                                                                                                                  -
                                                                                                                                  1032 * choose to use the same units as #Fine_duration, which is how we compute all time periods. As
                                                                                                                                  -
                                                                                                                                  1033 * for the the encoding width, we use 64 bits just in case.
                                                                                                                                  -
                                                                                                                                  1034 *
                                                                                                                                  -
                                                                                                                                  1035 * @todo Reconsider the encoding width. If `Ack_delay_time_unit(1)` is a nanosecond, then 32 bits
                                                                                                                                  -
                                                                                                                                  1036 * would support a maximum delay of ~4.1 seconds which is likely fine for most real-world
                                                                                                                                  -
                                                                                                                                  1037 * scenarios. This would reduce the size of ACK packets quite a bit.
                                                                                                                                  -
                                                                                                                                  1038 */
                                                                                                                                  -
                                                                                                                                  1039 using ack_delay_t = uint64_t;
                                                                                                                                  -
                                                                                                                                  1040
                                                                                                                                  -
                                                                                                                                  1041 /// `Ack_delay_time_unit(1)` is the duration corresponding to the #ack_delay_t value 1; and proportionally further.
                                                                                                                                  - -
                                                                                                                                  1043
                                                                                                                                  -
                                                                                                                                  1044 struct Individual_ack;
                                                                                                                                  - - -
                                                                                                                                  1047
                                                                                                                                  -
                                                                                                                                  1048 // Data.
                                                                                                                                  -
                                                                                                                                  1049
                                                                                                                                  -
                                                                                                                                  1050 /// Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  - -
                                                                                                                                  1052
                                                                                                                                  -
                                                                                                                                  1053 /**
                                                                                                                                  -
                                                                                                                                  1054 * This is the serialized version of `m_rcv_acked_packets_rexmit_{on|off}_out.size()` and
                                                                                                                                  -
                                                                                                                                  1055 * `m_rcv_acked_packets.size()` (whichever is applicable in context).
                                                                                                                                  -
                                                                                                                                  1056 * We send this value, even though it could be figured out from the overall serialized
                                                                                                                                  -
                                                                                                                                  1057 * size, to ensure integrity (see the deserialization logic for details).
                                                                                                                                  -
                                                                                                                                  1058 * This here is set to `size()`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  -
                                                                                                                                  1059 * serialize that value. Outside serialization `size()` is used directly, and this
                                                                                                                                  -
                                                                                                                                  1060 * value is meaningless.
                                                                                                                                  -
                                                                                                                                  1061 */
                                                                                                                                  - -
                                                                                                                                  1063
                                                                                                                                  -
                                                                                                                                  1064 // Type checks.
                                                                                                                                  -
                                                                                                                                  1065 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  -
                                                                                                                                  1066 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  1067 "rcv_wnd values are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  1068
                                                                                                                                  -
                                                                                                                                  1069 /**
                                                                                                                                  -
                                                                                                                                  1070 * List of *incoming* (post-deserialization of ACK) acknowledgments of DATA packets,
                                                                                                                                  -
                                                                                                                                  1071 * each identified by its first datum's sequence number as
                                                                                                                                  -
                                                                                                                                  1072 * provided by the other side and ordered in the chronological order they were received.
                                                                                                                                  -
                                                                                                                                  1073 * This may also be empty, in which case the containing ACK acknowledges no DATA packets but only
                                                                                                                                  -
                                                                                                                                  1074 * advertises the current receive window size (#m_rcv_wnd). (Note that it advertises it if
                                                                                                                                  -
                                                                                                                                  1075 * #m_rcv_acked_packets is NOT empty as well.)
                                                                                                                                  -
                                                                                                                                  1076 *
                                                                                                                                  -
                                                                                                                                  1077 * This is used if and only if this Ack_packet is incoming. See #m_rcv_acked_packets_rexmit_on_out
                                                                                                                                  -
                                                                                                                                  1078 * and #m_rcv_acked_packets_rexmit_off_out for the outgoing scenario.
                                                                                                                                  -
                                                                                                                                  1079 *
                                                                                                                                  -
                                                                                                                                  1080 * Unlike vanilla TCP from RFC 793, which features cumulative acknowledgment (wherein only the
                                                                                                                                  -
                                                                                                                                  1081 * latest received segment BEFORE any unreceived gap is acknowledged, thus just one total number
                                                                                                                                  -
                                                                                                                                  1082 * in the ACK), and unlike later enhanced TCPs, which feature both cumulative acknowledgement
                                                                                                                                  -
                                                                                                                                  1083 * and individual ACKs (Selective ACKs), we use something similar to Selective ACKs only. That
                                                                                                                                  -
                                                                                                                                  1084 * is, we only acknowledge each packet individually (though we combine many such little
                                                                                                                                  -
                                                                                                                                  1085 * acknowledgments into one packet via delayed ACKs). Moreover, we do not piggy-back ACK info
                                                                                                                                  -
                                                                                                                                  1086 * onto DATA packets; ACK is its own type.
                                                                                                                                  -
                                                                                                                                  1087 *
                                                                                                                                  -
                                                                                                                                  1088 * Rationale for using SACKs only: Selective ACKs help greatly in giving accurate congestion
                                                                                                                                  -
                                                                                                                                  1089 * control data (e.g., ACK delay per packet, dropped packets) and remove complex ambiguities of
                                                                                                                                  -
                                                                                                                                  1090 * trying to interpret cumulative ACKs for that purpose. For retransmits, when enabled, Selective
                                                                                                                                  -
                                                                                                                                  1091 * ACKs also greatly simplify the design choices (since we know exactly what they don't have
                                                                                                                                  -
                                                                                                                                  1092 * [assuming no lost ACKs], we can send exactly what they want and no more).
                                                                                                                                  -
                                                                                                                                  1093 *
                                                                                                                                  -
                                                                                                                                  1094 * Rationale for keeping ACK and DATA separate: This is less clear-cut. It is easier to think
                                                                                                                                  -
                                                                                                                                  1095 * about, certainly, as the two types of traffic aren't really logically related in a full-duplex
                                                                                                                                  -
                                                                                                                                  1096 * connection. On the other hand it increases overhead. On the third hand that disadvantage is
                                                                                                                                  -
                                                                                                                                  1097 * not a big deal assuming mostly unidirectional traffic flow (which is typical), since most of
                                                                                                                                  -
                                                                                                                                  1098 * the time the ACKs would be data-less anyway in that situation. Delayed ACKs also help combat
                                                                                                                                  -
                                                                                                                                  1099 * overhead -- somewhat.
                                                                                                                                  -
                                                                                                                                  1100 *
                                                                                                                                  -
                                                                                                                                  1101 * Rationale for delayed ACKs a/k/a accumulating more than 1 acknowledgment into an ACK: Combat
                                                                                                                                  -
                                                                                                                                  1102 * overhead which can be a big deal for high bitrate streaming traffic for example (research
                                                                                                                                  -
                                                                                                                                  1103 * shows ACK flow can be 10% of data flow in the other direction). The cost is that the other
                                                                                                                                  -
                                                                                                                                  1104 * side gets somewhat delayed congestion control information, but the delay can be tuned. In
                                                                                                                                  -
                                                                                                                                  1105 * TCP implementations delayed ACKs appear to be universal since a long time ago.
                                                                                                                                  -
                                                                                                                                  1106 *
                                                                                                                                  -
                                                                                                                                  1107 * Any two packets represented by these `Individual_ack`s may be duplicates of each other (same
                                                                                                                                  -
                                                                                                                                  1108 * Sequence_number, possibly different delay values). It's up to the sender (receiver of ACK)
                                                                                                                                  -
                                                                                                                                  1109 * to sort it out. However, again, they MUST be ordered chronologicaly based on the time when
                                                                                                                                  -
                                                                                                                                  1110 * they were received; from earliest to latest.
                                                                                                                                  -
                                                                                                                                  1111 *
                                                                                                                                  -
                                                                                                                                  1112 * Storing shared pointers to avoid copying of `struct`s (however small) during internal
                                                                                                                                  -
                                                                                                                                  1113 * reshuffling; shared instead of raw pointers to not worry about `delete`.
                                                                                                                                  -
                                                                                                                                  1114 */
                                                                                                                                  -
                                                                                                                                  1115 std::vector<boost::shared_ptr<Individual_ack>> m_rcv_acked_packets;
                                                                                                                                  -
                                                                                                                                  1116
                                                                                                                                  -
                                                                                                                                  1117 /**
                                                                                                                                  -
                                                                                                                                  1118 * Equivalent of #m_rcv_acked_packets but used for *outgoing* (pre-serialization of ACK) acknowledgments
                                                                                                                                  -
                                                                                                                                  1119 * and only if retransmission is disabled. See notes in Individual_ack_rexmit_off doc header about how
                                                                                                                                  -
                                                                                                                                  1120 * this is used for efficient serialization of Ack_packet.
                                                                                                                                  -
                                                                                                                                  1121 *
                                                                                                                                  -
                                                                                                                                  1122 * This is used if and only if Ack_packet is outgoing, and retransmission is disabled.
                                                                                                                                  -
                                                                                                                                  1123 * See #m_rcv_acked_packets for the incoming scenario.
                                                                                                                                  -
                                                                                                                                  1124 */
                                                                                                                                  -
                                                                                                                                  1125 std::vector<Individual_ack_rexmit_off> m_rcv_acked_packets_rexmit_off_out;
                                                                                                                                  -
                                                                                                                                  1126
                                                                                                                                  -
                                                                                                                                  1127 /// Equivalent of #m_rcv_acked_packets_rexmit_off_out but for retransmission enabled.
                                                                                                                                  -
                                                                                                                                  1128 std::vector<Individual_ack_rexmit_on> m_rcv_acked_packets_rexmit_on_out;
                                                                                                                                  -
                                                                                                                                  1129
                                                                                                                                  -
                                                                                                                                  1130 /// In serialized packet, the type ID byte identifying this as an ACK packet. Must not equal any other packet type's.
                                                                                                                                  - -
                                                                                                                                  1132
                                                                                                                                  -
                                                                                                                                  1133 // Methods.
                                                                                                                                  -
                                                                                                                                  1134
                                                                                                                                  -
                                                                                                                                  1135 /**
                                                                                                                                  -
                                                                                                                                  1136 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  1137 *
                                                                                                                                  -
                                                                                                                                  1138 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  1139 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  1140 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  1141 */
                                                                                                                                  -
                                                                                                                                  1142 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  1143
                                                                                                                                  -
                                                                                                                                  1144private:
                                                                                                                                  -
                                                                                                                                  1145 // Friends.
                                                                                                                                  -
                                                                                                                                  1146
                                                                                                                                  -
                                                                                                                                  1147 /// Friend of Ack_packet: For access to private constructor `Ack_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  1148 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  1149 friend boost::shared_ptr<Ack_packet> Low_lvl_packet::create_uninit_packet<Ack_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  1150
                                                                                                                                  -
                                                                                                                                  1151 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  1152
                                                                                                                                  -
                                                                                                                                  1153 /**
                                                                                                                                  -
                                                                                                                                  1154 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  1155 *
                                                                                                                                  -
                                                                                                                                  1156 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  1157 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  1158 */
                                                                                                                                  -
                                                                                                                                  1159 explicit Ack_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  1160
                                                                                                                                  -
                                                                                                                                  1161 // Methods.
                                                                                                                                  -
                                                                                                                                  1162
                                                                                                                                  -
                                                                                                                                  1163 /**
                                                                                                                                  -
                                                                                                                                  1164 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  1165 *
                                                                                                                                  -
                                                                                                                                  1166 * @param os
                                                                                                                                  -
                                                                                                                                  1167 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  1168 * @param verbose
                                                                                                                                  -
                                                                                                                                  1169 * See Low_lvl_packet::to_ostream().
                                                                                                                                  -
                                                                                                                                  1170 * @return `os`.
                                                                                                                                  -
                                                                                                                                  1171 */
                                                                                                                                  -
                                                                                                                                  1172 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  -
                                                                                                                                  1173
                                                                                                                                  -
                                                                                                                                  1174 /**
                                                                                                                                  -
                                                                                                                                  1175 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  1176 *
                                                                                                                                  -
                                                                                                                                  1177 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  1178 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1179 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  1180 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1181 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  1182 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1183 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1184 */
                                                                                                                                  - -
                                                                                                                                  1186 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  1187}; // struct Ack_packet
                                                                                                                                  -
                                                                                                                                  1188
                                                                                                                                  -
                                                                                                                                  1189/**
                                                                                                                                  -
                                                                                                                                  1190 * Specifies the *incoming* (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  -
                                                                                                                                  1191 * It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged.
                                                                                                                                  -
                                                                                                                                  1192 * Construct this by direct member initialization.
                                                                                                                                  -
                                                                                                                                  1193 */
                                                                                                                                  - -
                                                                                                                                  1195 // Cannot use boost::noncopyable or Shared_ptr_alias_holder, because that turns off direct initialization.
                                                                                                                                  -
                                                                                                                                  1196{
                                                                                                                                  -
                                                                                                                                  1197 // Types.
                                                                                                                                  -
                                                                                                                                  1198
                                                                                                                                  -
                                                                                                                                  1199 /// Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  1200 using Ptr = boost::shared_ptr<Individual_ack>;
                                                                                                                                  -
                                                                                                                                  1201
                                                                                                                                  -
                                                                                                                                  1202 /// Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  1203 using Const_ptr = boost::shared_ptr<const Individual_ack>;
                                                                                                                                  -
                                                                                                                                  1204
                                                                                                                                  -
                                                                                                                                  1205 // Data.
                                                                                                                                  -
                                                                                                                                  1206
                                                                                                                                  -
                                                                                                                                  1207 /**
                                                                                                                                  -
                                                                                                                                  1208 * Sequence number of first datum in packet that we acknowledge.
                                                                                                                                  -
                                                                                                                                  1209 * This is non-`const` for a technical reason: one must be able to use Sequence_number::set_metadata().
                                                                                                                                  -
                                                                                                                                  1210 */
                                                                                                                                  - -
                                                                                                                                  1212
                                                                                                                                  -
                                                                                                                                  1213 /// The delay between when we received the acknowledged packet and when decided to send this ack.
                                                                                                                                  - -
                                                                                                                                  1215
                                                                                                                                  -
                                                                                                                                  1216 /**
                                                                                                                                  -
                                                                                                                                  1217 * Retransmit counter of the acknowledged Data_packet. Identifies which attempt we are acknowledging
                                                                                                                                  -
                                                                                                                                  1218 * (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Literally this equals the acked
                                                                                                                                  -
                                                                                                                                  1219 * Data_packet::m_rexmit_id. Always 0 if retransmission is disabled for the given socket.
                                                                                                                                  -
                                                                                                                                  1220 */
                                                                                                                                  -
                                                                                                                                  1221 const unsigned int m_rexmit_id;
                                                                                                                                  -
                                                                                                                                  1222
                                                                                                                                  -
                                                                                                                                  1223 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  1224
                                                                                                                                  -
                                                                                                                                  1225 /// Force direct member initialization even if no member is `const`.
                                                                                                                                  -
                                                                                                                                  1226 Individual_ack() = delete;
                                                                                                                                  -
                                                                                                                                  1227
                                                                                                                                  -
                                                                                                                                  1228 /// Forbid copy construction.
                                                                                                                                  - -
                                                                                                                                  1230
                                                                                                                                  -
                                                                                                                                  1231 // Methods.
                                                                                                                                  -
                                                                                                                                  1232
                                                                                                                                  -
                                                                                                                                  1233 /// Forbid copy assignment.
                                                                                                                                  -
                                                                                                                                  1234 void operator=(const Individual_ack&) = delete;
                                                                                                                                  -
                                                                                                                                  1235};
                                                                                                                                  -
                                                                                                                                  1236
                                                                                                                                  -
                                                                                                                                  1237#pragma pack(push, 1)
                                                                                                                                  -
                                                                                                                                  1238
                                                                                                                                  -
                                                                                                                                  1239/**
                                                                                                                                  -
                                                                                                                                  1240 * Specifies the *outgoing* (pre-serialization) acknowledgment of a single received Data_packet, when
                                                                                                                                  -
                                                                                                                                  1241 * retranmission is disabled on the socket. Assuming network byte order equals native byte order,
                                                                                                                                  -
                                                                                                                                  1242 * and given that tight `struct` field packing is enabled throughout this code, one can arrange a tight
                                                                                                                                  -
                                                                                                                                  1243 * array of these `struct`s and transmit that entire array over the network with no need for scatter/gather
                                                                                                                                  -
                                                                                                                                  1244 * or any additional transformation of data post-construction and pushing onto aforementioned array.
                                                                                                                                  -
                                                                                                                                  1245 * These are copy-constructible, for pushing onto containers and such, but not assignable to avoid unnecessary
                                                                                                                                  -
                                                                                                                                  1246 * copying. Update: A later version of clang does not like
                                                                                                                                  -
                                                                                                                                  1247 * this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff;
                                                                                                                                  -
                                                                                                                                  1248 * it's internal code; we should be fine.
                                                                                                                                  -
                                                                                                                                  1249 *
                                                                                                                                  -
                                                                                                                                  1250 * @see Historical note in Ack_packet::serialize_to_raw_data() explains why this and
                                                                                                                                  -
                                                                                                                                  1251 * Individual_ack_rexmit_on both exist, instead of simply using Individual_ack in both directions.
                                                                                                                                  -
                                                                                                                                  1252 */
                                                                                                                                  - -
                                                                                                                                  1254{
                                                                                                                                  -
                                                                                                                                  1255 // Data.
                                                                                                                                  +
                                                                                                                                  30#include <type_traits>
                                                                                                                                  +
                                                                                                                                  31
                                                                                                                                  +
                                                                                                                                  32namespace flow::net_flow
                                                                                                                                  +
                                                                                                                                  33{
                                                                                                                                  +
                                                                                                                                  34
                                                                                                                                  +
                                                                                                                                  35/**
                                                                                                                                  +
                                                                                                                                  36 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level packet structure and serves as
                                                                                                                                  +
                                                                                                                                  37 * the super-type for all specific packet types, represented by derived `struct`s like Ack_packet, Rst_packet,
                                                                                                                                  +
                                                                                                                                  38 * etc.
                                                                                                                                  +
                                                                                                                                  39 *
                                                                                                                                  +
                                                                                                                                  40 * This `struct` and its sub-`struct` hierarchy are not too complex but nevertheless are somewhat unorthodox,
                                                                                                                                  +
                                                                                                                                  41 * combining a few different paradigms. So it's worth explaining these paradigms.
                                                                                                                                  +
                                                                                                                                  42 *
                                                                                                                                  +
                                                                                                                                  43 * ### Paradigm: Data store ###
                                                                                                                                  +
                                                                                                                                  44 * This is a `struct` holding the conceptual contents of a packet. Low_lvl_packet stores common values like
                                                                                                                                  +
                                                                                                                                  45 * #m_opt_rexmit_on, #m_src_port, and a few more. Each sub-`struct` stores further values specific to each
                                                                                                                                  +
                                                                                                                                  46 * packet type; for example, as of this writing, Data_packet::m_data contains the data payload of a DATA
                                                                                                                                  +
                                                                                                                                  47 * packet; this would not apply, for example, to another sub-`struct` like Rst_packet, because an RST stores
                                                                                                                                  +
                                                                                                                                  48 * no binary blob like that.
                                                                                                                                  +
                                                                                                                                  49 *
                                                                                                                                  +
                                                                                                                                  50 * Since it's a simple data store, the applicable data members (in this `struct` and the sub-types) are
                                                                                                                                  +
                                                                                                                                  51 * both public AND non-`const`. They can be read and written at will, thus changing or reading the
                                                                                                                                  +
                                                                                                                                  52 * logical contents of the packet.
                                                                                                                                  +
                                                                                                                                  53 *
                                                                                                                                  +
                                                                                                                                  54 * ### Paradigm: Polymorphic type ###
                                                                                                                                  +
                                                                                                                                  55 * While a simple data store, it also represents a hierarchy of possible packet types, and indeed a number
                                                                                                                                  +
                                                                                                                                  56 * of important polymorphic operations are included. Some are private/internal, and some are public.
                                                                                                                                  +
                                                                                                                                  57 * A public method may not appear polymorphic by its signature, but in that case usually its implementation
                                                                                                                                  +
                                                                                                                                  58 * uses non-public `virtual` methods to accomplish its tasks. Specifically, the key APIs are:
                                                                                                                                  +
                                                                                                                                  59 *
                                                                                                                                  +
                                                                                                                                  60 * - `create_uninit_packet<T>()`: This creates an uninitialized sub-object of Low_lvl_packet, of actual
                                                                                                                                  +
                                                                                                                                  61 * type `T`, where `T` derives from Low_lvl_packet. This returns a `shared_ptr<T>`, and any actual
                                                                                                                                  +
                                                                                                                                  62 * constructor used to implement this factory method is non-public, so the only way for a user to
                                                                                                                                  +
                                                                                                                                  63 * create a Low_lvl_packet is to get at a ref-counted pointer to it -- not a raw, unprotected pointer. If storing
                                                                                                                                  +
                                                                                                                                  64 * only `shared_ptr<T>` or `Ptr` values, deletion is not something to worry about, as it will happen
                                                                                                                                  +
                                                                                                                                  65 * automatically.
                                                                                                                                  +
                                                                                                                                  66 * - Same with the other factory methods described just below. Direct access to `Low_lvl_packet*` or
                                                                                                                                  +
                                                                                                                                  67 * `T*`, where `T` derives from Low_lvl_packet, is not allowed (but this is not enforced at compile time
                                                                                                                                  +
                                                                                                                                  68 * and, at best, via `assert()`s at runtime).
                                                                                                                                  +
                                                                                                                                  69 * - create_from_raw_data_packet(): Given a raw serialized packet, this factory method constructs
                                                                                                                                  +
                                                                                                                                  70 * a Low_lvl_packet of the appropriate polymorphic sub-type, filling it at all levels with the data
                                                                                                                                  +
                                                                                                                                  71 * deserialized for the input binary blob. Internally, it uses some private, `virtual` action to get this
                                                                                                                                  +
                                                                                                                                  72 * to work. At any rate, this method is used to crete a logical representation of a packet off the wire.
                                                                                                                                  +
                                                                                                                                  73 * - serialize_to_raw_data(): The opposite operation: convert existing object to raw data sendable over the wire.
                                                                                                                                  +
                                                                                                                                  74 * This uses a high-performance scatter-gather paradigm of producing a sequence of pointers and lengths to
                                                                                                                                  +
                                                                                                                                  75 * already existing data areas, avoiding copying. This thing is `virtual` and applies to any Low_lvl_packet
                                                                                                                                  +
                                                                                                                                  76 * sub-object.
                                                                                                                                  +
                                                                                                                                  77 *
                                                                                                                                  +
                                                                                                                                  78 * (Reminder: As with all polymorphism and `shared_ptr`, you may need `static_pointer_cast<>` to up- and down-cast
                                                                                                                                  +
                                                                                                                                  79 * between Low_lvl_packet and subclasses. Also `Low_lvl_packet::ptr_cast()` up-casts even syntactically-sugarier-ly.)
                                                                                                                                  +
                                                                                                                                  80 *
                                                                                                                                  +
                                                                                                                                  81 * The two basic flows are:
                                                                                                                                  +
                                                                                                                                  82 * - Call `create_uninit_packet<T>()` to construct a sub-`struct` of Low_lvl_packet, returned as a ref-counted
                                                                                                                                  +
                                                                                                                                  83 * pointer to `T`. Fill out all the fields manually, accessing object via aforemetioned smart pointer.
                                                                                                                                  +
                                                                                                                                  84 * Call serialize_to_raw_data(). Pass result of latter to a boost.asio network-sending routine
                                                                                                                                  +
                                                                                                                                  85 * to send over wire. Ensure you pass a `Ptr` to the completion handler passed to that routine, so that
                                                                                                                                  +
                                                                                                                                  86 * the Low_lvl_packet survives while being sent. The handler can let the `Ptr` go out of scope, likely
                                                                                                                                  +
                                                                                                                                  87 * `delete`ing the Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  88 * - Receive raw packet over wire. Call create_from_raw_data_packet() to yield a Low_lvl_packet::Ptr pointing
                                                                                                                                  +
                                                                                                                                  89 * to new Low_lvl_packet sub-object with all fields filled out. Read the fields as needed to process the
                                                                                                                                  +
                                                                                                                                  90 * packet; store the `Ptr` if necessary; eventually removing it from all data structures will drop ref-count
                                                                                                                                  +
                                                                                                                                  91 * to zero, and it will be auto-`delete`d.
                                                                                                                                  +
                                                                                                                                  92 *
                                                                                                                                  +
                                                                                                                                  93 * ### Other utlities ###
                                                                                                                                  +
                                                                                                                                  94 * A number of (typically polymorphic) facilities exist, mainly to log these objects to `ostream`s, including
                                                                                                                                  +
                                                                                                                                  95 * when logging with FLOW_LOG_TRACE() and FLOW_LOG_DATA().
                                                                                                                                  +
                                                                                                                                  96 *
                                                                                                                                  +
                                                                                                                                  97 * - #m_verbose_ostream_manip and #m_concise_ostream_manip are `const` data members that can be output
                                                                                                                                  +
                                                                                                                                  98 * via the usual `<<` operator to `ostream`s in order to output verbose and concise descriptions
                                                                                                                                  +
                                                                                                                                  99 * of any Low_lvl_packet (of any sub-`struct` type, polymorphically).
                                                                                                                                  +
                                                                                                                                  100 * - #m_type_ostream_manip can be similarly used to output just the packet type of any given
                                                                                                                                  +
                                                                                                                                  101 * Low_lvl_packet (producing strings like `"ACK"` or `"RST"`).
                                                                                                                                  +
                                                                                                                                  102 *
                                                                                                                                  +
                                                                                                                                  103 * The implementation of these is typically some polymorphic `virtual` magic, but the use is straightforward using
                                                                                                                                  +
                                                                                                                                  104 * these `ostream` manipulator data members.
                                                                                                                                  +
                                                                                                                                  105 *
                                                                                                                                  +
                                                                                                                                  106 * Implementation notes
                                                                                                                                  +
                                                                                                                                  107 * --------------------
                                                                                                                                  +
                                                                                                                                  108 *
                                                                                                                                  +
                                                                                                                                  109 * ### History of approaches ###
                                                                                                                                  +
                                                                                                                                  110 * Originally the implementation used the boost.serialization library for packet serialization, but
                                                                                                                                  +
                                                                                                                                  111 * it turned out to consume way too much CPU time which consequently limited the maximum
                                                                                                                                  +
                                                                                                                                  112 * throughput at high speeds. The next implementation used the traditional approach based on
                                                                                                                                  +
                                                                                                                                  113 * "packed" structures (structures without any padding), in one big `struct Low_lvl_packet`.
                                                                                                                                  +
                                                                                                                                  114 * However, I deemed the latter setup too C-like (yet simultaneously
                                                                                                                                  +
                                                                                                                                  115 * not C-like enough, in that no unions were used, hence RAM was wasted despite the C-like approach).
                                                                                                                                  +
                                                                                                                                  116 * Ultimately, the current version of the implementation came about, with its polymorphic `struct` hierarchy
                                                                                                                                  +
                                                                                                                                  117 * and abstract Low_lvl_packet `struct` (which, in the previous iteration, simply contained everything
                                                                                                                                  +
                                                                                                                                  118 * about every type, complete with an `enum Type` instead of using C++'s built-in `typeid`, as the current
                                                                                                                                  +
                                                                                                                                  119 * version uses).
                                                                                                                                  +
                                                                                                                                  120 *
                                                                                                                                  +
                                                                                                                                  121 * While the above evolution was more about coding style philosophy (from a single type and a type selector
                                                                                                                                  +
                                                                                                                                  122 * `enum` to a polymorphic hierarchy and `typeid`), the other evolution concerned the way serialization
                                                                                                                                  +
                                                                                                                                  123 * (for sending over the write) worked. At first, as mentioned, there were the logical values (which were
                                                                                                                                  +
                                                                                                                                  124 * public and non-`const`), and there were private packed `struct`s into which the logical values were
                                                                                                                                  +
                                                                                                                                  125 * placed (with transformation for endianness and other things) at serialization time; finally then assembling
                                                                                                                                  +
                                                                                                                                  126 * a newly allocated single binary buffer, those packed `struct`s copied into it. Not bad -- rather verbose
                                                                                                                                  +
                                                                                                                                  127 * having all those types defined, but not bad -- but it did involve a new buffer and linear-time copying into
                                                                                                                                  +
                                                                                                                                  128 * that buffer. This seemed like a shame.
                                                                                                                                  +
                                                                                                                                  129 *
                                                                                                                                  +
                                                                                                                                  130 * This led to the final improvement, which was to turn the serialization function into one that generates
                                                                                                                                  +
                                                                                                                                  131 * a `boost::asio::const_buffer_sequence`, basically a sequence of pointers and associated lengths of areas
                                                                                                                                  +
                                                                                                                                  132 * already present in memory. In most cases (with a couple small exceptions), the stored public data members
                                                                                                                                  +
                                                                                                                                  133 * (e.g., #m_src_port and Data_packet::m_data) could simply have their addresses and lengths taken and placed
                                                                                                                                  +
                                                                                                                                  134 * into the `const_buffer_sequence` -- no buffer copying involved. This should achieve a nice performance
                                                                                                                                  +
                                                                                                                                  135 * improvement. The removal of things like `struct Common_header` and `struct Ack_header` is a good bonus
                                                                                                                                  +
                                                                                                                                  136 * coding-wise, too.
                                                                                                                                  +
                                                                                                                                  137 *
                                                                                                                                  +
                                                                                                                                  138 * (There is a caveat there. While no issue for the true performance culprits, namely Data_packet::m_data,
                                                                                                                                  +
                                                                                                                                  139 * the various multi-byte integer values like #m_src_port technically have to undergo endianness conversion
                                                                                                                                  +
                                                                                                                                  140 * during serialization. So technically simply taking an address and size is not enough; the value needs
                                                                                                                                  +
                                                                                                                                  141 * to be flipped *potentially*. In reality, though, all relevant architectures are such that we chose
                                                                                                                                  +
                                                                                                                                  142 * identical network byte order as memory byte order, making no flipping necessary in practice. Of course,
                                                                                                                                  +
                                                                                                                                  143 * if we spread to an architecture where this is not true, everything will explode. However, a compile-time
                                                                                                                                  +
                                                                                                                                  144 * assertion would warn us of this, and a nearby comment will instruct on how to deal with the problem, in the
                                                                                                                                  +
                                                                                                                                  145 * unlikely case it were to appear. [Little-endian is rather universal these days.])
                                                                                                                                  +
                                                                                                                                  146 *
                                                                                                                                  +
                                                                                                                                  147 * ### Packed structures, stored integers, and alignment ###
                                                                                                                                  +
                                                                                                                                  148 * When 2 or more contiguous data members are used in serializing (serialize_to_raw_data() or overridden
                                                                                                                                  +
                                                                                                                                  149 * version), they are packed together via `"#pragma pack"`. (Note that this affect entire `struct`s at a time
                                                                                                                                  +
                                                                                                                                  150 * only; hence we need to use some anonymously-typed grouping `struct`s named `m_packed`.)
                                                                                                                                  +
                                                                                                                                  151 *
                                                                                                                                  +
                                                                                                                                  152 * Numeric values are stored as unsigned integers, which is the most portable choice for serializing.
                                                                                                                                  +
                                                                                                                                  153 * Booleans are serialized as bytes for compactness.
                                                                                                                                  +
                                                                                                                                  154 *
                                                                                                                                  +
                                                                                                                                  155 * Some effort is made to keep fields aligned along word edges when serializing. There is not too much
                                                                                                                                  +
                                                                                                                                  156 * of that as of this writing, but we should remain vigilant as packet formats become more complex over time.
                                                                                                                                  +
                                                                                                                                  157 *
                                                                                                                                  +
                                                                                                                                  158 * @todo With C++11, some lines of code could be eliminated by using `using` for Low_lvl_packet sub-types
                                                                                                                                  +
                                                                                                                                  159 * to inherit the constructor(s) of Low_lvl_packet. (For some of the sub-types an explicit constructor
                                                                                                                                  +
                                                                                                                                  160 * would still be necessary, but it would just shadow the inherited one, which is fine and still saves lines
                                                                                                                                  +
                                                                                                                                  161 * in the other sub-types.) However, for now I've left it as-is, partially to be friendly to the Doxygen
                                                                                                                                  +
                                                                                                                                  162 * documentation generator, and partially to make the interface easy to read. Still, it may be better the other
                                                                                                                                  +
                                                                                                                                  163 * way.
                                                                                                                                  +
                                                                                                                                  164 */
                                                                                                                                  + + +
                                                                                                                                  167 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  +
                                                                                                                                  168 public util::Shared_ptr_alias_holder<boost::shared_ptr<Low_lvl_packet>>,
                                                                                                                                  +
                                                                                                                                  169 public log::Log_context,
                                                                                                                                  +
                                                                                                                                  170 private boost::noncopyable
                                                                                                                                  +
                                                                                                                                  171{
                                                                                                                                  +
                                                                                                                                  172 // Types.
                                                                                                                                  +
                                                                                                                                  173
                                                                                                                                  +
                                                                                                                                  174 /**
                                                                                                                                  +
                                                                                                                                  175 * Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory area.
                                                                                                                                  +
                                                                                                                                  176 *
                                                                                                                                  +
                                                                                                                                  177 * @todo Consider moving alias Low_lvl_packet::Const_buffer to `util` namespace or even outside it, as it is
                                                                                                                                  +
                                                                                                                                  178 * used commonly (or `boost::asio::const_buffer` is used where `Const_buffer` could be used for readability).
                                                                                                                                  +
                                                                                                                                  179 */
                                                                                                                                  +
                                                                                                                                  180 using Const_buffer = boost::asio::const_buffer;
                                                                                                                                  +
                                                                                                                                  181
                                                                                                                                  +
                                                                                                                                  182 /**
                                                                                                                                  +
                                                                                                                                  183 * Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory.
                                                                                                                                  +
                                                                                                                                  184 * This is a model of the `ConstBufferSequence` model in boost.asio, which means a `const` reference to this
                                                                                                                                  +
                                                                                                                                  185 * can be passed to boost.asio scatter-gathering send functions such as `Udp_socket::async_send_to()`;
                                                                                                                                  +
                                                                                                                                  186 * the scattered buffers represented by an instance of this type will be, at high performance, gathered
                                                                                                                                  +
                                                                                                                                  187 * into a single UDP datagram and sent over the wire if possible.
                                                                                                                                  +
                                                                                                                                  188 */
                                                                                                                                  +
                                                                                                                                  189 using Const_buffer_sequence = std::vector<Const_buffer>;
                                                                                                                                  +
                                                                                                                                  190
                                                                                                                                  +
                                                                                                                                  191 /// Type used for `m_security_token` member of a couple different packet types.
                                                                                                                                  +
                                                                                                                                  192 using security_token_t = uint64_t;
                                                                                                                                  +
                                                                                                                                  193
                                                                                                                                  +
                                                                                                                                  194 /**
                                                                                                                                  +
                                                                                                                                  195 * Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  196 *
                                                                                                                                  +
                                                                                                                                  197 * Why 8 bits? This handles up 255 retransmissions, which is long after we'd kill the connection
                                                                                                                                  +
                                                                                                                                  198 * anyway.
                                                                                                                                  +
                                                                                                                                  199 */
                                                                                                                                  + +
                                                                                                                                  201
                                                                                                                                  +
                                                                                                                                  202 /// Type used to store the size of `m_rcv_wnd` member in a couple of different packet types.
                                                                                                                                  +
                                                                                                                                  203 using rcv_wnd_t = uint32_t;
                                                                                                                                  +
                                                                                                                                  204
                                                                                                                                  +
                                                                                                                                  205 /* Data: These are actual Common Header payload.
                                                                                                                                  +
                                                                                                                                  206 *
                                                                                                                                  +
                                                                                                                                  207 * These are common to all packet types, since we are super-`struct` to all actual packet types.
                                                                                                                                  +
                                                                                                                                  208 *
                                                                                                                                  +
                                                                                                                                  209 * Note the implicit data field typeid(*this) which identifies the actual type of this packet.
                                                                                                                                  +
                                                                                                                                  210 * (C++ subtlety: typeid(this) will just yield typeid(Low_lvl_packet), which isn't that useful;
                                                                                                                                  +
                                                                                                                                  211 * but typeid(*this) will actually get you typeid(Data_packet), typeid(Ack_packet), etc. */
                                                                                                                                  +
                                                                                                                                  212
                                                                                                                                  +
                                                                                                                                  213 /**
                                                                                                                                  +
                                                                                                                                  214 * Option indicating whether this connection is using retransmission or not. This value must not
                                                                                                                                  +
                                                                                                                                  215 * change over the course of a connection and is provided in each packet for simpler
                                                                                                                                  +
                                                                                                                                  216 * deserialization (so that the latter can proceed completely without having to check the
                                                                                                                                  +
                                                                                                                                  217 * connection properties).
                                                                                                                                  +
                                                                                                                                  218 *
                                                                                                                                  +
                                                                                                                                  219 * For a given connection handshake, the SYN receiver should either disconnect/RST or respond with
                                                                                                                                  +
                                                                                                                                  220 * SYN_ACK. If it responds with SYN_ACK, it indicates agreement to abide by this option for the
                                                                                                                                  +
                                                                                                                                  221 * rest of the connection.
                                                                                                                                  +
                                                                                                                                  222 */
                                                                                                                                  + +
                                                                                                                                  224
                                                                                                                                  +
                                                                                                                                  225#pragma pack(push, 1)
                                                                                                                                  +
                                                                                                                                  226 /// Packed group affected by `#pragma pack`.
                                                                                                                                  +
                                                                                                                                  227 struct
                                                                                                                                  +
                                                                                                                                  228 {
                                                                                                                                  +
                                                                                                                                  229 // Data.
                                                                                                                                  +
                                                                                                                                  230
                                                                                                                                  +
                                                                                                                                  231 /// Flow-protocol port # of socket in sending Node.
                                                                                                                                  + +
                                                                                                                                  233 /// Flow-protocol port # of socket in receiving Node.
                                                                                                                                  + + +
                                                                                                                                  236#pragma pack(pop)
                                                                                                                                  +
                                                                                                                                  237
                                                                                                                                  +
                                                                                                                                  238 // Type checks.
                                                                                                                                  +
                                                                                                                                  239 static_assert(std::numeric_limits<flow_port_t>::is_integer
                                                                                                                                  +
                                                                                                                                  240 && (!std::numeric_limits<flow_port_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  241 "Ports are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  242
                                                                                                                                  +
                                                                                                                                  243 // Data: These are peripheral (not actual packet payload).
                                                                                                                                  +
                                                                                                                                  244
                                                                                                                                  +
                                                                                                                                  245 /// `ostream` manipulator (argument to `ostream <<`) that will output packet's type ("ACK", "RST", etc.).
                                                                                                                                  +
                                                                                                                                  246 const Function<std::ostream& (std::ostream&)> m_type_ostream_manip;
                                                                                                                                  +
                                                                                                                                  247
                                                                                                                                  +
                                                                                                                                  248 /// `ostream` manipulator (argument to `ostream <<`) that will output packet info suitable for DATA log level.
                                                                                                                                  +
                                                                                                                                  249 const Function<std::ostream& (std::ostream&)> m_verbose_ostream_manip;
                                                                                                                                  +
                                                                                                                                  250
                                                                                                                                  +
                                                                                                                                  251 /// `ostream` manipulator (argument to `ostream <<`) that will output packet info suitable for TRACE log level.
                                                                                                                                  +
                                                                                                                                  252 const Function<std::ostream& (std::ostream&)> m_concise_ostream_manip;
                                                                                                                                  +
                                                                                                                                  253
                                                                                                                                  +
                                                                                                                                  254 // Methods.
                                                                                                                                  +
                                                                                                                                  255
                                                                                                                                  +
                                                                                                                                  256 /**
                                                                                                                                  +
                                                                                                                                  257 * Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type specified
                                                                                                                                  +
                                                                                                                                  258 * as the template parameter (Ack_packet, Rst_packet, etc.). Since any constructor is not public, this is
                                                                                                                                  +
                                                                                                                                  259 * the only way to instantiate a blank Low_lvl_packet sub-object.
                                                                                                                                  +
                                                                                                                                  260 *
                                                                                                                                  +
                                                                                                                                  261 * Compiler template parameter inference should make the following work, so the template parameter can be omitted.:
                                                                                                                                  +
                                                                                                                                  262 *
                                                                                                                                  +
                                                                                                                                  263 * ~~~
                                                                                                                                  +
                                                                                                                                  264 * shared_ptr<Ack_packet> = create_uninit_packet(get_logger());
                                                                                                                                  +
                                                                                                                                  265 * // ^-- Low_lvl_packet_sub was inferred to be Ack_packet based on the left hand side of the assignment.
                                                                                                                                  +
                                                                                                                                  266 * ~~~
                                                                                                                                  +
                                                                                                                                  267 *
                                                                                                                                  +
                                                                                                                                  268 * @tparam Low_lvl_packet_sub
                                                                                                                                  +
                                                                                                                                  269 * Any type deriving from Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  270 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  271 * Logger to use subsequently in the new object.
                                                                                                                                  +
                                                                                                                                  272 * @return Ref-counted pointer to newly created object of the specified type.
                                                                                                                                  +
                                                                                                                                  273 * If you need an up-cast pointer, use create_uninit_packet_base().
                                                                                                                                  +
                                                                                                                                  274 */
                                                                                                                                  +
                                                                                                                                  275 template<typename Low_lvl_packet_sub>
                                                                                                                                  +
                                                                                                                                  276 static boost::shared_ptr<Low_lvl_packet_sub> create_uninit_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  277
                                                                                                                                  +
                                                                                                                                  278 /**
                                                                                                                                  +
                                                                                                                                  279 * A simple convenience method that casts the result of create_uninit_packet() from `shared_ptr<T>`, where `T` is a
                                                                                                                                  +
                                                                                                                                  280 * sub-type of Low_lvl_packet, to `shared_ptr<Low_lvl_packet>` a/k/a Ptr.
                                                                                                                                  +
                                                                                                                                  281 *
                                                                                                                                  +
                                                                                                                                  282 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  283 * See create_uninit_packet().
                                                                                                                                  +
                                                                                                                                  284 * @return See create_uninit_packet() (but cast to a type compatible with the polymorphic base type).
                                                                                                                                  +
                                                                                                                                  285 */
                                                                                                                                  +
                                                                                                                                  286 template<typename Low_lvl_packet_sub>
                                                                                                                                  +
                                                                                                                                  287 static Ptr create_uninit_packet_base(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  288
                                                                                                                                  +
                                                                                                                                  289 /**
                                                                                                                                  +
                                                                                                                                  290 * Constructs packet on the heap with values determined by the given raw binary data as presumably
                                                                                                                                  +
                                                                                                                                  291 * received from the wire and originally serialized by a compatible serializing Node. The returned
                                                                                                                                  +
                                                                                                                                  292 * value is a reference-counted pointer with a reference count of 1 (i.e., no other references to
                                                                                                                                  +
                                                                                                                                  293 * underlying object have been saved anywhere by the time method returns).
                                                                                                                                  +
                                                                                                                                  294 *
                                                                                                                                  +
                                                                                                                                  295 * It is the opposite of serialize_to_raw_data() but not symmetrically efficient; where the latter
                                                                                                                                  +
                                                                                                                                  296 * produces a sequence of pointers/lengths of already present areas of memory (no copying), the present method
                                                                                                                                  +
                                                                                                                                  297 * copies the raw data into a new structure and is thus less efficient.
                                                                                                                                  +
                                                                                                                                  298 *
                                                                                                                                  +
                                                                                                                                  299 * Suppose `ptr` is returned. Then `*ptr` is of polymorphic type `Low_lvl_packet*` but actually is
                                                                                                                                  +
                                                                                                                                  300 * of some specific sub-type (like `Ack_packet*`). `typeid(*ptr)` can be used to determine the exact type.
                                                                                                                                  +
                                                                                                                                  301 * In particular one can write things like: `bool is_ack = typeid(*ptr) == typeid(Ack_packet)`.
                                                                                                                                  +
                                                                                                                                  302 * Of course, in many cases one may call one of a number of virtual methods of Low_lvl_packet to get
                                                                                                                                  +
                                                                                                                                  303 * type-specific polymorphic behavior.
                                                                                                                                  +
                                                                                                                                  304 *
                                                                                                                                  +
                                                                                                                                  305 * @see m_type_ostream_manip() for easy way to output human-readable version of `typeid(*ptr).name()`, where
                                                                                                                                  +
                                                                                                                                  306 * `ptr` is the value returned.
                                                                                                                                  +
                                                                                                                                  307 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  308 * Pointer to entire packet raw buffer as received over the wire.
                                                                                                                                  +
                                                                                                                                  309 * Upon return, the state of `*raw_packet` is not known; and caller retains
                                                                                                                                  +
                                                                                                                                  310 * ownership of it (e.g., can read another datagram into it if desired). As of this writing it will either
                                                                                                                                  +
                                                                                                                                  311 * remain unchanged or be emptied (via a move elsewhere) -- but ideally code without relying on either specific
                                                                                                                                  +
                                                                                                                                  312 * outcome.
                                                                                                                                  +
                                                                                                                                  313 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  314 * If `true`, the method should (if at all reasonable) not alter `raw_packet->capacity()` (in particular
                                                                                                                                  +
                                                                                                                                  315 * it should not use move semantics to send its contents to another data structure); otherwise
                                                                                                                                  +
                                                                                                                                  316 * it should be free to do so (i.e., if it considers doing so beneficial for performance reasons).
                                                                                                                                  +
                                                                                                                                  317 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  318 * Will be used to log within this method as well as be saved as the
                                                                                                                                  +
                                                                                                                                  319 * `Logger*` in the new Low_lvl_packet created and returned (if any).
                                                                                                                                  +
                                                                                                                                  320 * @return A null pointer on failure; otherwise pointer to an object of some sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  321 */
                                                                                                                                  +
                                                                                                                                  322 static Ptr create_from_raw_data_packet(log::Logger* logger_ptr, util::Blob* raw_packet, bool prefer_no_move);
                                                                                                                                  +
                                                                                                                                  323
                                                                                                                                  +
                                                                                                                                  324 /**
                                                                                                                                  +
                                                                                                                                  325 * Serializes the current logical packet data from `*this` into the given `Const_buffer_sequence`,
                                                                                                                                  +
                                                                                                                                  326 * which is a sequence of pointers and lengths of existing scattered areas in memory, presumably
                                                                                                                                  +
                                                                                                                                  327 * for transmission over the wire to a compatible serializing Node.
                                                                                                                                  +
                                                                                                                                  328 *
                                                                                                                                  +
                                                                                                                                  329 * It is the opposite of create_from_raw_data_packet() but not symmetrically efficient; where the latter
                                                                                                                                  +
                                                                                                                                  330 * copies the raw data into a new structure, the present method produces a sequence of pointers/lengths
                                                                                                                                  +
                                                                                                                                  331 * of already present areas of memory (no copying) and is thus more efficient.
                                                                                                                                  +
                                                                                                                                  332 *
                                                                                                                                  +
                                                                                                                                  333 * The input `*raw_bufs` is appended to and is *not* cleared by this method. Thus one may use this
                                                                                                                                  +
                                                                                                                                  334 * method to produce a larger buffer sequence of which the serialization of `*this` is only a part
                                                                                                                                  +
                                                                                                                                  335 * (possibly in the middle somewhere).
                                                                                                                                  +
                                                                                                                                  336 *
                                                                                                                                  +
                                                                                                                                  337 * Behavior is undefined if one modifies `*this` after calling the present method. It is safer to
                                                                                                                                  +
                                                                                                                                  338 * run this on a `const Low_lvl_packet` rather than a mutable Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  339 *
                                                                                                                                  +
                                                                                                                                  340 * @warning This efficiency comes with an important caveat: the generated additions to `*raw_bufs` will
                                                                                                                                  +
                                                                                                                                  341 * remain valid *only* while `*this` exists. If its destructor runs, the buffers added here
                                                                                                                                  +
                                                                                                                                  342 * will become invalid, and accessing them will result in undefined behavior.
                                                                                                                                  +
                                                                                                                                  343 *
                                                                                                                                  +
                                                                                                                                  344 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  345 * Pointer to the sequence of `Const_buffer`s into which we will append pointers/lengths
                                                                                                                                  +
                                                                                                                                  346 * of serialized data.
                                                                                                                                  +
                                                                                                                                  347 * @return Size in bytes of the data references to which have been appended to `*raw_bufs`;
                                                                                                                                  +
                                                                                                                                  348 * Already present data are not included.
                                                                                                                                  +
                                                                                                                                  349 */
                                                                                                                                  +
                                                                                                                                  350 virtual size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const = 0;
                                                                                                                                  +
                                                                                                                                  351
                                                                                                                                  +
                                                                                                                                  352 /**
                                                                                                                                  +
                                                                                                                                  353 * Identical to serialize_to_raw_data() but adds log-level-appropriate logging after the operation.
                                                                                                                                  +
                                                                                                                                  354 *
                                                                                                                                  +
                                                                                                                                  355 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  356 * See serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  357 * @return See serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  358 */
                                                                                                                                  + +
                                                                                                                                  360
                                                                                                                                  +
                                                                                                                                  361 /**
                                                                                                                                  +
                                                                                                                                  362 * Returns a brief (a few characters) string description of the given packet type given as
                                                                                                                                  +
                                                                                                                                  363 * `type_index(typeid(p))`, where `p` is a reference to an instance of a concrete Low_lvl_packet sub-type.
                                                                                                                                  +
                                                                                                                                  364 *
                                                                                                                                  +
                                                                                                                                  365 * @param type_id
                                                                                                                                  +
                                                                                                                                  366 * See above. If the `p` points to a value of some other type, behavior is undefined.
                                                                                                                                  +
                                                                                                                                  367 * @return Reference to a string without newlines or other whitespace: "DATA", "ACK", "SYN_ACK_ACK", etc.
                                                                                                                                  +
                                                                                                                                  368 */
                                                                                                                                  +
                                                                                                                                  369 static const std::string& type_id_to_str(const std::type_index& type_id);
                                                                                                                                  +
                                                                                                                                  370
                                                                                                                                  +
                                                                                                                                  371protected:
                                                                                                                                  +
                                                                                                                                  372 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  373
                                                                                                                                  +
                                                                                                                                  374 /**
                                                                                                                                  +
                                                                                                                                  375 * Constructs packet with uninitialized (essentially random) values. This is not public, because
                                                                                                                                  +
                                                                                                                                  376 * a Low_lvl_packet is meaningless without being of some specific sub-type referring to an actual
                                                                                                                                  +
                                                                                                                                  377 * packet (e.g., Ack_packet, Rst_packet, etc.). (The presence of pure virtual methods would probably
                                                                                                                                  +
                                                                                                                                  378 * accomplish this too, but it's nice to be explicit.)
                                                                                                                                  +
                                                                                                                                  379 *
                                                                                                                                  +
                                                                                                                                  380 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  381 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  382 */
                                                                                                                                  +
                                                                                                                                  383 explicit Low_lvl_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  384
                                                                                                                                  +
                                                                                                                                  385 // Methods.
                                                                                                                                  +
                                                                                                                                  386
                                                                                                                                  +
                                                                                                                                  387 /**
                                                                                                                                  +
                                                                                                                                  388 * Helper for serialize_to_raw_data() implementations in sub-types that encodes the header common to all
                                                                                                                                  +
                                                                                                                                  389 * packet types, starting with the packet type ID leading that header.
                                                                                                                                  +
                                                                                                                                  390 *
                                                                                                                                  +
                                                                                                                                  391 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  392 * See serialize_to_raw_data(). Header fields are encoded and appended to this.
                                                                                                                                  +
                                                                                                                                  393 * @return See serialize_to_raw_data(). The total # of bytes encoded and appended to `*raw_bufs` by the call.
                                                                                                                                  +
                                                                                                                                  394 */
                                                                                                                                  + +
                                                                                                                                  396
                                                                                                                                  +
                                                                                                                                  397 /**
                                                                                                                                  +
                                                                                                                                  398 * Writes a multi-line representation of `*this` to an output stream.
                                                                                                                                  +
                                                                                                                                  399 *
                                                                                                                                  +
                                                                                                                                  400 * Unless the sub-type needs to add no information of its own (as of this writing, the case for Rst_packet),
                                                                                                                                  +
                                                                                                                                  401 * this implementation (of this virtual method) is only present as a utility for the sub-types.
                                                                                                                                  +
                                                                                                                                  402 * The sub-type is recommended to first call this implementation; then add type-specific lines
                                                                                                                                  +
                                                                                                                                  403 * afterwards, ending with a newline. Following this recommendation will result in uniform, decent-looking
                                                                                                                                  +
                                                                                                                                  404 * overall output.
                                                                                                                                  +
                                                                                                                                  405 *
                                                                                                                                  +
                                                                                                                                  406 * @note This is protected, because it is meant only to be used in the implementation of
                                                                                                                                  +
                                                                                                                                  407 * the `ostream` manipulators #m_verbose_ostream_manip and #m_concise_ostream_manip, which
                                                                                                                                  +
                                                                                                                                  408 * are public and to be used by users of this type.
                                                                                                                                  +
                                                                                                                                  409 * @param os
                                                                                                                                  +
                                                                                                                                  410 * The output stream to use. Normally I'd make this a pointer, but this non-constant reference is
                                                                                                                                  +
                                                                                                                                  411 * fairly typical in STL and the world in general, for `ostream` in particular.
                                                                                                                                  +
                                                                                                                                  412 * @param verbose
                                                                                                                                  +
                                                                                                                                  413 * If `false`, output suitable for TRACE level logging is produced; otherwise for DATA level logging.
                                                                                                                                  +
                                                                                                                                  414 * @return `os`.
                                                                                                                                  +
                                                                                                                                  415 */
                                                                                                                                  +
                                                                                                                                  416 virtual std::ostream& to_ostream(std::ostream& os, bool verbose = false) const;
                                                                                                                                  +
                                                                                                                                  417
                                                                                                                                  +
                                                                                                                                  418 /**
                                                                                                                                  +
                                                                                                                                  419 * Returns `true`, at compile time, if and only if the native memory representation is big-endian, meaning,
                                                                                                                                  +
                                                                                                                                  420 * for example, the value `uint32_t(1)` is stored as the bytes, in order, 0x00 0x00 0x00 0x01, and not the reverse.
                                                                                                                                  +
                                                                                                                                  421 * Can be used in a compile-time check such as `static_assert()`.
                                                                                                                                  +
                                                                                                                                  422 *
                                                                                                                                  +
                                                                                                                                  423 * @return See above.
                                                                                                                                  +
                                                                                                                                  424 */
                                                                                                                                  +
                                                                                                                                  425 static constexpr bool native_is_big_endian();
                                                                                                                                  +
                                                                                                                                  426
                                                                                                                                  +
                                                                                                                                  427private:
                                                                                                                                  +
                                                                                                                                  428 // Types.
                                                                                                                                  +
                                                                                                                                  429
                                                                                                                                  +
                                                                                                                                  430#pragma pack(push, 1)
                                                                                                                                  +
                                                                                                                                  431
                                                                                                                                  +
                                                                                                                                  432 /**
                                                                                                                                  +
                                                                                                                                  433 * Helper data store type for storing binary data needed by serialize_to_raw_data(), when certains bits
                                                                                                                                  +
                                                                                                                                  434 * are not already represented by the public data members present in `struct` Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  435 *
                                                                                                                                  +
                                                                                                                                  436 * The need for this is somewhat subtle and is explained fully inside Low_lvl_packet::serialize_to_raw_data(),
                                                                                                                                  +
                                                                                                                                  437 * so I won't go into it here. Also see each data member's doc header.
                                                                                                                                  +
                                                                                                                                  438 */
                                                                                                                                  + +
                                                                                                                                  440 private boost::noncopyable
                                                                                                                                  +
                                                                                                                                  441 {
                                                                                                                                  +
                                                                                                                                  442 /**
                                                                                                                                  +
                                                                                                                                  443 * This is the serialized version of the multi-byte `bool` Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  +
                                                                                                                                  444 * Since the latter is of a more civilized `bool` type, and we need a single byte version, this here
                                                                                                                                  +
                                                                                                                                  445 * is set to the obvious encoding of the `bool`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  +
                                                                                                                                  446 * serialize said `bool`.
                                                                                                                                  +
                                                                                                                                  447 */
                                                                                                                                  + +
                                                                                                                                  449
                                                                                                                                  +
                                                                                                                                  450 /**
                                                                                                                                  +
                                                                                                                                  451 * Unused space reserved for future use, ensuring correct alignment of other fields and
                                                                                                                                  +
                                                                                                                                  452 * headers. Currently it must be always set to zero. Since Low_lvl_packet has no need of a public
                                                                                                                                  +
                                                                                                                                  453 * data member like this, we keep it in here, as needed for Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  454 */
                                                                                                                                  +
                                                                                                                                  455 const uint16_t m_reserved2;
                                                                                                                                  +
                                                                                                                                  456
                                                                                                                                  +
                                                                                                                                  457 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  458
                                                                                                                                  +
                                                                                                                                  459 /// Constructs a mostly-uninitialized object, except for the `const` member(s), if any.
                                                                                                                                  +
                                                                                                                                  460 explicit Aux_raw_data();
                                                                                                                                  +
                                                                                                                                  461 };
                                                                                                                                  +
                                                                                                                                  462
                                                                                                                                  +
                                                                                                                                  463#pragma pack(pop)
                                                                                                                                  +
                                                                                                                                  464
                                                                                                                                  +
                                                                                                                                  465 /**
                                                                                                                                  +
                                                                                                                                  466 * A simple, unmodifiable data store that contains the properties unique to each packet type a/k/a
                                                                                                                                  +
                                                                                                                                  467 * concrete sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  468 */
                                                                                                                                  +
                                                                                                                                  469 struct Packet_type_info // Cannot use boost::noncopyable, as that disables direct member initialization.
                                                                                                                                  +
                                                                                                                                  470 {
                                                                                                                                  +
                                                                                                                                  471 /// The type ID value, in serialized order, to be used in each serialization of all packets of this type.
                                                                                                                                  + +
                                                                                                                                  473
                                                                                                                                  +
                                                                                                                                  474 /// The brief string representation of this packet type, suitable for Low_lvl_packet::type_id_to_str().
                                                                                                                                  +
                                                                                                                                  475 const std::string m_type_id_str;
                                                                                                                                  +
                                                                                                                                  476 };
                                                                                                                                  +
                                                                                                                                  477
                                                                                                                                  +
                                                                                                                                  478 // Methods.
                                                                                                                                  +
                                                                                                                                  479
                                                                                                                                  +
                                                                                                                                  480 /**
                                                                                                                                  +
                                                                                                                                  481 * Writes a brief representation of `typeid(*this)` -- i.e., the packet type (ACK, RST, etc.) --
                                                                                                                                  +
                                                                                                                                  482 * to an output stream. See also type_id_to_str().
                                                                                                                                  +
                                                                                                                                  483 *
                                                                                                                                  +
                                                                                                                                  484 * @note This is private, because it is meant only to be used in the implementation of
                                                                                                                                  +
                                                                                                                                  485 * the `ostream` manipulator #m_type_ostream_manip, which is public and to be used by users of this type.
                                                                                                                                  +
                                                                                                                                  486 * @param os
                                                                                                                                  +
                                                                                                                                  487 * The output stream to use. Normally I'd make this a pointer, but this non-constant reference is
                                                                                                                                  +
                                                                                                                                  488 * fairly typical in STL and the world in general, for `ostream` in particular.
                                                                                                                                  +
                                                                                                                                  489 * @return `os`.
                                                                                                                                  +
                                                                                                                                  490 */
                                                                                                                                  +
                                                                                                                                  491 std::ostream& type_to_ostream(std::ostream& os) const;
                                                                                                                                  +
                                                                                                                                  492
                                                                                                                                  +
                                                                                                                                  493 /**
                                                                                                                                  +
                                                                                                                                  494 * Helper that looks up the Packet_type_info::m_raw_type_id value for the given `typeid(p)`, where `p` refers
                                                                                                                                  +
                                                                                                                                  495 * to an instance of a concrete sub-type of Low_lvl_packet. Note that is returns a reference, and indeed the referred
                                                                                                                                  +
                                                                                                                                  496 * to memory will remain valid and unmodified throughout the program's runtime. Therefore, it can be used
                                                                                                                                  +
                                                                                                                                  497 * for serialization without copying.
                                                                                                                                  +
                                                                                                                                  498 *
                                                                                                                                  +
                                                                                                                                  499 * ### Implementation note ###
                                                                                                                                  +
                                                                                                                                  500 * It would be nice to make this `constexpr`, as then it can be used in `switch()` statement
                                                                                                                                  +
                                                                                                                                  501 * conditionals. Unfortunately, at least as of C++17, this is not possible with our current implementation:
                                                                                                                                  +
                                                                                                                                  502 * #S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO is an `unordered_map` (as of this writing), and that is not a "literal"
                                                                                                                                  +
                                                                                                                                  503 * type (in other words, lookups in it are not done at compile time, even when for a human it would seem clearly
                                                                                                                                  +
                                                                                                                                  504 * possible... iterators and such are involved, and that goes beyond what `constexpr` evaluation can do).
                                                                                                                                  +
                                                                                                                                  505 *
                                                                                                                                  +
                                                                                                                                  506 * @param type_id
                                                                                                                                  +
                                                                                                                                  507 * See type_id_to_str().
                                                                                                                                  +
                                                                                                                                  508 * @return Reference to a constant area of memory.
                                                                                                                                  +
                                                                                                                                  509 */
                                                                                                                                  +
                                                                                                                                  510 static const uint8_t& type_id_native_to_raw(const std::type_info& type_id);
                                                                                                                                  +
                                                                                                                                  511
                                                                                                                                  +
                                                                                                                                  512 /**
                                                                                                                                  +
                                                                                                                                  513 * `virtual` helper for create_from_raw_data_packet() that fills out the fields of `*this` that are *not*
                                                                                                                                  +
                                                                                                                                  514 * in Low_lvl_packet but rather in the sub-type.
                                                                                                                                  +
                                                                                                                                  515 *
                                                                                                                                  +
                                                                                                                                  516 * `*raw_buf` must represent the area of create_from_raw_data_packet()'s `*raw_buf` argument immediately
                                                                                                                                  +
                                                                                                                                  517 * following the Common Header, which is the area deserialized into Low_lvl_packet proper. Hence
                                                                                                                                  +
                                                                                                                                  518 * `*raw_buf` must point to and contain the length of the rest of that input buffer. The present method
                                                                                                                                  +
                                                                                                                                  519 * must then deserialize it into the sub-object's own fields.
                                                                                                                                  +
                                                                                                                                  520 *
                                                                                                                                  +
                                                                                                                                  521 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  522 * Pointer to immutable buffer just past the input raw packet data's Common Header area.
                                                                                                                                  +
                                                                                                                                  523 * Note that while the underlying area is immutable (hence the type #Const_buffer!),
                                                                                                                                  +
                                                                                                                                  524 * `*raw_buf` itself may be modified (i.e., the area to which it will refer on exit is undefined).
                                                                                                                                  +
                                                                                                                                  525 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  526 * See create_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  527 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  528 * See create_from_raw_data_packet(). `raw_buf` must start somewhere within it and be
                                                                                                                                  +
                                                                                                                                  529 * sized to go exactly to its end.
                                                                                                                                  +
                                                                                                                                  530 * @return `false` if create_from_raw_data_packet() should return `Ptr()` (error); `true` if
                                                                                                                                  +
                                                                                                                                  531 * deserialization successful.
                                                                                                                                  +
                                                                                                                                  532 */
                                                                                                                                  + +
                                                                                                                                  534 bool prefer_no_move, util::Blob* raw_packet) = 0;
                                                                                                                                  +
                                                                                                                                  535
                                                                                                                                  +
                                                                                                                                  536 // Constants.
                                                                                                                                  +
                                                                                                                                  537
                                                                                                                                  +
                                                                                                                                  538 /**
                                                                                                                                  +
                                                                                                                                  539 * Mapping from native `typeid()`, a/k/a packet type (for all possible packet types), to the set of properties of
                                                                                                                                  +
                                                                                                                                  540 * that packet type. The keys are every possible value of `type_index(typeid(p))`, where `p` is a reference
                                                                                                                                  +
                                                                                                                                  541 * to an instance of any concrete Low_lvl_packet sub-type.
                                                                                                                                  +
                                                                                                                                  542 *
                                                                                                                                  +
                                                                                                                                  543 * ### Implementation note ###
                                                                                                                                  +
                                                                                                                                  544 * An alternative way to implement this mechanism (as of this writing, raw type IDs and brief
                                                                                                                                  +
                                                                                                                                  545 * string descriptions per packet type) is to use `virtual` liberally, combined with a `switch` if needed. (Note,
                                                                                                                                  +
                                                                                                                                  546 * also, that a way to index -- such as in an `unordered` container -- by
                                                                                                                                  +
                                                                                                                                  547 * packet type is necessary elsewhere. We use `type_index(typeid()))` now, but a [worse] alternative is to have
                                                                                                                                  +
                                                                                                                                  548 * `virtual` type IDs returned for each Low_lvl_packet sub-type.) I could explain
                                                                                                                                  +
                                                                                                                                  549 * at length all the reasons why the chosen way is superior, but let me just give you the conclusion: I originally
                                                                                                                                  +
                                                                                                                                  550 * tried it the `virtual/switch` way. Instead of the raw type IDs and
                                                                                                                                  +
                                                                                                                                  551 * string descriptions being conveniently encapsulated in the present map (where there's little to no chance of
                                                                                                                                  +
                                                                                                                                  552 * conflicting values), they were distributed across `virtual` implementations. This was less maintainable; nor did
                                                                                                                                  +
                                                                                                                                  553 * it improve OO style, since the raw type ID values (at least) were
                                                                                                                                  +
                                                                                                                                  554 * still inter-dependent (were not allowed to conflict) in any case.
                                                                                                                                  +
                                                                                                                                  555 * The present solution does not pretend the actual contents of these values are of no interest to Low_lvl_packet
                                                                                                                                  +
                                                                                                                                  556 * itself (as opposed to the sub-types), and in not having to pretend this, all related code is quite a bit more
                                                                                                                                  +
                                                                                                                                  557 * compact and a bit more maintainable as well.
                                                                                                                                  +
                                                                                                                                  558 */
                                                                                                                                  +
                                                                                                                                  559 static const boost::unordered_map<std::type_index, Packet_type_info> S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO;
                                                                                                                                  +
                                                                                                                                  560
                                                                                                                                  +
                                                                                                                                  561 // Data.
                                                                                                                                  +
                                                                                                                                  562
                                                                                                                                  +
                                                                                                                                  563 /**
                                                                                                                                  +
                                                                                                                                  564 * Auxilliary data area necessary for serialize_to_raw_data() to work. This is explained in doc header
                                                                                                                                  +
                                                                                                                                  565 * for Aux_raw_data.
                                                                                                                                  +
                                                                                                                                  566 *
                                                                                                                                  +
                                                                                                                                  567 * It is declared `mutable`, because the conceptual state contained within a Low_lvl_packet is expressed
                                                                                                                                  +
                                                                                                                                  568 * via its public non-`const` data members. #m_aux_raw_data is merely a helper data store for
                                                                                                                                  +
                                                                                                                                  569 * the `const` method serialize_to_raw_data(). Since that method is `const`, this should be `mutable`,
                                                                                                                                  +
                                                                                                                                  570 * like a performance cache of sorts, only not exactly.
                                                                                                                                  +
                                                                                                                                  571 */
                                                                                                                                  + +
                                                                                                                                  573}; // struct Low_lvl_packet
                                                                                                                                  +
                                                                                                                                  574
                                                                                                                                  +
                                                                                                                                  575/**
                                                                                                                                  +
                                                                                                                                  576 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  +
                                                                                                                                  577 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  578 *
                                                                                                                                  +
                                                                                                                                  579 * A SYN packet is sent by the actively connecting peer to a passively listening server socket.
                                                                                                                                  +
                                                                                                                                  580 * Thus a SYN arises from the Node that performs `Node::connect...()`. In response, a Syn_ack_packet
                                                                                                                                  +
                                                                                                                                  581 * is expected.
                                                                                                                                  +
                                                                                                                                  582 */
                                                                                                                                  + +
                                                                                                                                  584{
                                                                                                                                  +
                                                                                                                                  585 // Data.
                                                                                                                                  +
                                                                                                                                  586
                                                                                                                                  +
                                                                                                                                  587 /**
                                                                                                                                  +
                                                                                                                                  588 * The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be
                                                                                                                                  +
                                                                                                                                  589 * using in `Data_packet`s over this connection, if it succeeds. All bytes actually sent by the
                                                                                                                                  +
                                                                                                                                  590 * SYN sender will start with this ISN + 1 and increment by 1 for each byte in the stream further.
                                                                                                                                  +
                                                                                                                                  591 * A retransmission of a given datum starting with sequence number S will still start with sequence number
                                                                                                                                  +
                                                                                                                                  592 * S.
                                                                                                                                  +
                                                                                                                                  593 */
                                                                                                                                  + +
                                                                                                                                  595
                                                                                                                                  +
                                                                                                                                  596 /**
                                                                                                                                  +
                                                                                                                                  597 * Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by
                                                                                                                                  +
                                                                                                                                  598 * the user on the other side.
                                                                                                                                  +
                                                                                                                                  599 *
                                                                                                                                  +
                                                                                                                                  600 * @todo Possibly eliminate this, since NetFlow is reliable; the metadata can just be sent explicitly by the
                                                                                                                                  +
                                                                                                                                  601 * user once the connection is established. However, for now reliability is optional.
                                                                                                                                  +
                                                                                                                                  602 */
                                                                                                                                  + +
                                                                                                                                  604
                                                                                                                                  +
                                                                                                                                  605 // Type checks.
                                                                                                                                  +
                                                                                                                                  606 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  +
                                                                                                                                  607 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  608 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  609
                                                                                                                                  +
                                                                                                                                  610 /// In serialized packet, the type ID byte identifying this as a SYN packet. Must not equal any other packet type's.
                                                                                                                                  +
                                                                                                                                  611 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  +
                                                                                                                                  612
                                                                                                                                  +
                                                                                                                                  613 // Methods.
                                                                                                                                  +
                                                                                                                                  614
                                                                                                                                  +
                                                                                                                                  615 /**
                                                                                                                                  +
                                                                                                                                  616 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  617 *
                                                                                                                                  +
                                                                                                                                  618 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  619 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  620 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  621 */
                                                                                                                                  +
                                                                                                                                  622 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  623
                                                                                                                                  +
                                                                                                                                  624private:
                                                                                                                                  +
                                                                                                                                  625 // Friends.
                                                                                                                                  +
                                                                                                                                  626
                                                                                                                                  +
                                                                                                                                  627 /// Friend of Syn_packet: For access to private constructor `Syn_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  628 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  629 friend boost::shared_ptr<Syn_packet> Low_lvl_packet::create_uninit_packet<Syn_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  630
                                                                                                                                  +
                                                                                                                                  631 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  632
                                                                                                                                  +
                                                                                                                                  633 /**
                                                                                                                                  +
                                                                                                                                  634 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  635 *
                                                                                                                                  +
                                                                                                                                  636 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  637 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  638 */
                                                                                                                                  +
                                                                                                                                  639 explicit Syn_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  640
                                                                                                                                  +
                                                                                                                                  641 // Methods.
                                                                                                                                  +
                                                                                                                                  642
                                                                                                                                  +
                                                                                                                                  643 /**
                                                                                                                                  +
                                                                                                                                  644 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  645 *
                                                                                                                                  +
                                                                                                                                  646 * @param os
                                                                                                                                  +
                                                                                                                                  647 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  648 * @param verbose
                                                                                                                                  +
                                                                                                                                  649 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  650 * @return `os`.
                                                                                                                                  +
                                                                                                                                  651 */
                                                                                                                                  +
                                                                                                                                  652 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  +
                                                                                                                                  653
                                                                                                                                  +
                                                                                                                                  654 /**
                                                                                                                                  +
                                                                                                                                  655 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  656 *
                                                                                                                                  +
                                                                                                                                  657 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  658 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  659 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  660 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  661 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  662 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  663 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  664 */
                                                                                                                                  + +
                                                                                                                                  666 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  667}; // struct Syn_packet
                                                                                                                                  +
                                                                                                                                  668
                                                                                                                                  +
                                                                                                                                  669/**
                                                                                                                                  +
                                                                                                                                  670 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  +
                                                                                                                                  671 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  672 *
                                                                                                                                  +
                                                                                                                                  673 * A SYN_ACK packet is sent by the passively listening server socket in response to a valid received SYN.
                                                                                                                                  +
                                                                                                                                  674 * Thus a SYN_ACK arises from the Node that performs Node::listen() and receives SYN. In response, a
                                                                                                                                  +
                                                                                                                                  675 * Syn_ack_ack_packet is expected to complete the 3-way handshake and establish a Peer_socket to Peer_socket
                                                                                                                                  +
                                                                                                                                  676 * connection.
                                                                                                                                  +
                                                                                                                                  677 */
                                                                                                                                  + +
                                                                                                                                  679{
                                                                                                                                  +
                                                                                                                                  680 // Data.
                                                                                                                                  +
                                                                                                                                  681
                                                                                                                                  +
                                                                                                                                  682 /**
                                                                                                                                  +
                                                                                                                                  683 * Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite
                                                                                                                                  +
                                                                                                                                  684 * traffic direction of the full-duplex connection being established.
                                                                                                                                  +
                                                                                                                                  685 */
                                                                                                                                  + +
                                                                                                                                  687
                                                                                                                                  +
                                                                                                                                  688#pragma pack(push, 1)
                                                                                                                                  +
                                                                                                                                  689 /// Packed group affected by `#pragma pack`.
                                                                                                                                  +
                                                                                                                                  690 struct
                                                                                                                                  +
                                                                                                                                  691 {
                                                                                                                                  +
                                                                                                                                  692 /**
                                                                                                                                  +
                                                                                                                                  693 * Random security token used during SYN_ACK-SYN_ACK_ACK. For a given connection handshake, the SYN_ACK_ACK
                                                                                                                                  +
                                                                                                                                  694 * receiver ensures that `Syn_ack_ack_packet` `m_security_token` it receives is equal to the original
                                                                                                                                  +
                                                                                                                                  695 * one it had sent (this #m_security_token here).
                                                                                                                                  +
                                                                                                                                  696 */
                                                                                                                                  + +
                                                                                                                                  698
                                                                                                                                  +
                                                                                                                                  699 /**
                                                                                                                                  +
                                                                                                                                  700 * Number of DATA payload bytes the sender of this packet would accept into its Receive buffer,
                                                                                                                                  +
                                                                                                                                  701 * without dropping, at the moment this packet was generated to send. This information is
                                                                                                                                  +
                                                                                                                                  702 * piggybacked into ACK (and SYN_ACK/SYN_ACK_ACK) packets.
                                                                                                                                  +
                                                                                                                                  703 *
                                                                                                                                  +
                                                                                                                                  704 * @todo We could be similar to TCP by opportunistically sending rcv_wnd in other packet types,
                                                                                                                                  +
                                                                                                                                  705 * namely Data_packet. However this would only help in connections with heavy 2-way traffic.
                                                                                                                                  +
                                                                                                                                  706 * Personally I would then prefer to create a new packet type instead, Rcv_wnd_packet, and also
                                                                                                                                  +
                                                                                                                                  707 * implement some generalized "packet combo" scheme which would allow to piggy-back arbitrary
                                                                                                                                  +
                                                                                                                                  708 * packet types together into a single packet; and then we'd dissociate
                                                                                                                                  +
                                                                                                                                  709 * ACK/SYN_ACK/SYN_ACK_ACK from rcv_wnd.
                                                                                                                                  +
                                                                                                                                  710 */
                                                                                                                                  + + +
                                                                                                                                  713#pragma pack(pop)
                                                                                                                                  +
                                                                                                                                  714
                                                                                                                                  +
                                                                                                                                  715 // Type checks.
                                                                                                                                  +
                                                                                                                                  716 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  +
                                                                                                                                  717 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  718 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  719 static_assert(std::numeric_limits<security_token_t>::is_integer
                                                                                                                                  +
                                                                                                                                  720 && (!std::numeric_limits<security_token_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  721 "Security tokens are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  722 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  +
                                                                                                                                  723 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  724 "rcv_wnd values are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  725
                                                                                                                                  +
                                                                                                                                  726 /// In serialized packet, the type ID byte identifying this as a SYN_ACK. Must not equal any other packet type's.
                                                                                                                                  +
                                                                                                                                  727 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  +
                                                                                                                                  728
                                                                                                                                  +
                                                                                                                                  729 // Methods.
                                                                                                                                  +
                                                                                                                                  730
                                                                                                                                  +
                                                                                                                                  731 /**
                                                                                                                                  +
                                                                                                                                  732 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  733 *
                                                                                                                                  +
                                                                                                                                  734 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  735 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  736 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  737 */
                                                                                                                                  +
                                                                                                                                  738 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  739
                                                                                                                                  +
                                                                                                                                  740private:
                                                                                                                                  +
                                                                                                                                  741 // Friends.
                                                                                                                                  +
                                                                                                                                  742
                                                                                                                                  +
                                                                                                                                  743 /// Friend of Syn_ack_packet: For access to private constructor `Syn_ack_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  744 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  745 friend boost::shared_ptr<Syn_ack_packet> Low_lvl_packet::create_uninit_packet<Syn_ack_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  746
                                                                                                                                  +
                                                                                                                                  747 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  748
                                                                                                                                  +
                                                                                                                                  749 /**
                                                                                                                                  +
                                                                                                                                  750 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  751 *
                                                                                                                                  +
                                                                                                                                  752 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  753 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  754 */
                                                                                                                                  +
                                                                                                                                  755 explicit Syn_ack_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  756
                                                                                                                                  +
                                                                                                                                  757 // Methods.
                                                                                                                                  +
                                                                                                                                  758
                                                                                                                                  +
                                                                                                                                  759 /**
                                                                                                                                  +
                                                                                                                                  760 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  761 *
                                                                                                                                  +
                                                                                                                                  762 * @param os
                                                                                                                                  +
                                                                                                                                  763 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  764 * @param verbose
                                                                                                                                  +
                                                                                                                                  765 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  766 * @return `os`.
                                                                                                                                  +
                                                                                                                                  767 */
                                                                                                                                  +
                                                                                                                                  768 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  +
                                                                                                                                  769
                                                                                                                                  +
                                                                                                                                  770 /**
                                                                                                                                  +
                                                                                                                                  771 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  772 *
                                                                                                                                  +
                                                                                                                                  773 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  774 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  775 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  776 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  777 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  778 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  779 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  780 */
                                                                                                                                  + +
                                                                                                                                  782 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  783};
                                                                                                                                  +
                                                                                                                                  784
                                                                                                                                  +
                                                                                                                                  785/**
                                                                                                                                  +
                                                                                                                                  786 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  +
                                                                                                                                  787 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  788 *
                                                                                                                                  +
                                                                                                                                  789 * A SYN_ACK_ACK packet is sent by the original SYN sender in response to a valid received SYN_ACK,
                                                                                                                                  +
                                                                                                                                  790 * completing the 3-way handshake and establishing a Peer_socket to Peer_socket connection.
                                                                                                                                  +
                                                                                                                                  791 */
                                                                                                                                  + +
                                                                                                                                  793{
                                                                                                                                  +
                                                                                                                                  794 // Data.
                                                                                                                                  +
                                                                                                                                  795
                                                                                                                                  +
                                                                                                                                  796#pragma pack(push, 1)
                                                                                                                                  +
                                                                                                                                  797 /// Packed group affected by `#pragma pack`.
                                                                                                                                  +
                                                                                                                                  798 struct
                                                                                                                                  +
                                                                                                                                  799 {
                                                                                                                                  +
                                                                                                                                  800 /**
                                                                                                                                  +
                                                                                                                                  801 * This must equal `Syn_ack_packet` `m_security_token` received in the packet to which `*this` is
                                                                                                                                  +
                                                                                                                                  802 * replying. The other side will only proceed with the connection if the two are equal.
                                                                                                                                  +
                                                                                                                                  803 */
                                                                                                                                  + +
                                                                                                                                  805
                                                                                                                                  +
                                                                                                                                  806 /**
                                                                                                                                  +
                                                                                                                                  807 * Same meaning as in `Syn_ack_packet` but applied to the essentially independent opposite
                                                                                                                                  +
                                                                                                                                  808 * traffic direction of the full-duplex connection being established.
                                                                                                                                  +
                                                                                                                                  809 */
                                                                                                                                  + + +
                                                                                                                                  812#pragma pack(pop)
                                                                                                                                  +
                                                                                                                                  813
                                                                                                                                  +
                                                                                                                                  814 // Type checks.
                                                                                                                                  +
                                                                                                                                  815 static_assert(std::numeric_limits<security_token_t>::is_integer
                                                                                                                                  +
                                                                                                                                  816 && (!std::numeric_limits<security_token_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  817 "Security tokens are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  818 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  +
                                                                                                                                  819 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  820 "rcv_wnd values are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  821
                                                                                                                                  +
                                                                                                                                  822 /// In serialized packet, the type ID byte identifying this as a SYN_ACK_ACK. Must not equal any other packet type's.
                                                                                                                                  +
                                                                                                                                  823 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  +
                                                                                                                                  824
                                                                                                                                  +
                                                                                                                                  825 // Methods.
                                                                                                                                  +
                                                                                                                                  826
                                                                                                                                  +
                                                                                                                                  827 /**
                                                                                                                                  +
                                                                                                                                  828 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  829 *
                                                                                                                                  +
                                                                                                                                  830 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  831 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  832 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  833 */
                                                                                                                                  +
                                                                                                                                  834 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  835
                                                                                                                                  +
                                                                                                                                  836private:
                                                                                                                                  +
                                                                                                                                  837 // Friends.
                                                                                                                                  +
                                                                                                                                  838
                                                                                                                                  +
                                                                                                                                  839 /// Friend of Syn_ack_ack_packet: For access to private constructor `Syn_ack_ack_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  840 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  841 friend boost::shared_ptr<Syn_ack_ack_packet> Low_lvl_packet::create_uninit_packet<Syn_ack_ack_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  842
                                                                                                                                  +
                                                                                                                                  843 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  844
                                                                                                                                  +
                                                                                                                                  845 /**
                                                                                                                                  +
                                                                                                                                  846 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  847 *
                                                                                                                                  +
                                                                                                                                  848 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  849 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  850 */
                                                                                                                                  +
                                                                                                                                  851 explicit Syn_ack_ack_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  852
                                                                                                                                  +
                                                                                                                                  853 // Methods.
                                                                                                                                  +
                                                                                                                                  854
                                                                                                                                  +
                                                                                                                                  855 /**
                                                                                                                                  +
                                                                                                                                  856 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  857 *
                                                                                                                                  +
                                                                                                                                  858 * @param os
                                                                                                                                  +
                                                                                                                                  859 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  860 * @param verbose
                                                                                                                                  +
                                                                                                                                  861 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  862 * @return `os`.
                                                                                                                                  +
                                                                                                                                  863 */
                                                                                                                                  +
                                                                                                                                  864 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  +
                                                                                                                                  865
                                                                                                                                  +
                                                                                                                                  866 /**
                                                                                                                                  +
                                                                                                                                  867 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  868 *
                                                                                                                                  +
                                                                                                                                  869 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  870 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  871 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  872 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  873 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  874 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  875 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  876 */
                                                                                                                                  + +
                                                                                                                                  878 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  879}; // struct Syn_ack_ack_packet
                                                                                                                                  +
                                                                                                                                  880
                                                                                                                                  +
                                                                                                                                  881/**
                                                                                                                                  +
                                                                                                                                  882 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  883 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  884 *
                                                                                                                                  +
                                                                                                                                  885 * Each DATA packet contains actual data payload packetized from the application-provided stream
                                                                                                                                  +
                                                                                                                                  886 * of bytes. It is identified by the sequence number (encoded in this object) of the first
                                                                                                                                  +
                                                                                                                                  887 * byte of that payload. An individual acknowledgment inside an Ack_packet refers to the Data_packet
                                                                                                                                  +
                                                                                                                                  888 * by that first sequence number. If Low_lvl_packet::m_opt_rexmit_on is `true`, then #m_rexmit_id
                                                                                                                                  +
                                                                                                                                  889 * identifies which attempt at sending the payload with this sequence number and payload this
                                                                                                                                  +
                                                                                                                                  890 * packet represents: 0 is 1st attempt, 1 is 1st retry, 2 is 2nd retry, etc. If that option is off,
                                                                                                                                  +
                                                                                                                                  891 * then a lost packet is never retransmitted; and therefore #m_rexmit_id is always 0.
                                                                                                                                  +
                                                                                                                                  892 */
                                                                                                                                  + +
                                                                                                                                  894{
                                                                                                                                  +
                                                                                                                                  895 // Types.
                                                                                                                                  +
                                                                                                                                  896
                                                                                                                                  +
                                                                                                                                  897 /**
                                                                                                                                  +
                                                                                                                                  898 * Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  899 *
                                                                                                                                  +
                                                                                                                                  900 * Why 8 bits? This handles up 255 retransmissions, which is long after we'd kill the connection
                                                                                                                                  +
                                                                                                                                  901 * anyway.
                                                                                                                                  +
                                                                                                                                  902 */
                                                                                                                                  + +
                                                                                                                                  904
                                                                                                                                  +
                                                                                                                                  905 // Data.
                                                                                                                                  +
                                                                                                                                  906
                                                                                                                                  +
                                                                                                                                  907 /**
                                                                                                                                  +
                                                                                                                                  908 * The sequence number of the first byte in the payload; i.e., of `m_data.front()`, a/k/a `m_data[0]`.
                                                                                                                                  +
                                                                                                                                  909 * Note that #m_data cannot be empty, so #m_seq_num is always meaningful.
                                                                                                                                  +
                                                                                                                                  910 */
                                                                                                                                  + +
                                                                                                                                  912
                                                                                                                                  +
                                                                                                                                  913 /**
                                                                                                                                  +
                                                                                                                                  914 * Retransmit counter of the DATA packet being sent. Identifies which attempt we are acknowledging
                                                                                                                                  +
                                                                                                                                  915 * (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Always 0 if `!m_opt_rexmit_on`.
                                                                                                                                  +
                                                                                                                                  916 */
                                                                                                                                  + +
                                                                                                                                  918
                                                                                                                                  +
                                                                                                                                  919 /**
                                                                                                                                  +
                                                                                                                                  920 * This is the serialized version of `m_data.size()` (see #m_data). We send this value, even though it could
                                                                                                                                  +
                                                                                                                                  921 * be figured out from the overall serialized size, to ensure integrity (see the deserialization logic for details).
                                                                                                                                  +
                                                                                                                                  922 * This here is set to `m_data.size()`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  +
                                                                                                                                  923 * serialize that value. Outside serialization `m_data.size()` is used directly, and this
                                                                                                                                  +
                                                                                                                                  924 * value is meaningless.
                                                                                                                                  +
                                                                                                                                  925 */
                                                                                                                                  +
                                                                                                                                  926 mutable uint16_t m_data_size_raw;
                                                                                                                                  +
                                                                                                                                  927
                                                                                                                                  +
                                                                                                                                  928 /**
                                                                                                                                  +
                                                                                                                                  929 * The payload. Cannot be `empty()`.
                                                                                                                                  +
                                                                                                                                  930 *
                                                                                                                                  +
                                                                                                                                  931 * As of this writing there is an important (for performance) subtlety about how this is originally filled in
                                                                                                                                  +
                                                                                                                                  932 * when deserializing a wire-arrived packet. See Data_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  933 */
                                                                                                                                  + +
                                                                                                                                  935
                                                                                                                                  +
                                                                                                                                  936 // Type checks.
                                                                                                                                  +
                                                                                                                                  937 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  +
                                                                                                                                  938 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  939 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  940 static_assert(std::numeric_limits<rexmit_id_t>::is_integer
                                                                                                                                  +
                                                                                                                                  941 && (!std::numeric_limits<rexmit_id_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  942 "Retransmission IDs are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  943
                                                                                                                                  +
                                                                                                                                  944 /// In serialized packet, the type ID byte identifying this as a DATA packet. Must not equal any other packet type's.
                                                                                                                                  +
                                                                                                                                  945 static const uint8_t S_RAW_TYPE_ID;
                                                                                                                                  +
                                                                                                                                  946
                                                                                                                                  +
                                                                                                                                  947 // Methods.
                                                                                                                                  +
                                                                                                                                  948
                                                                                                                                  +
                                                                                                                                  949 /**
                                                                                                                                  +
                                                                                                                                  950 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  951 *
                                                                                                                                  +
                                                                                                                                  952 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  953 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  954 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  955 */
                                                                                                                                  +
                                                                                                                                  956 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  957
                                                                                                                                  +
                                                                                                                                  958private:
                                                                                                                                  +
                                                                                                                                  959 // Friends.
                                                                                                                                  +
                                                                                                                                  960
                                                                                                                                  +
                                                                                                                                  961 /// Friend of Data_packet: For access to private constructor `Data_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  962 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  963 friend boost::shared_ptr<Data_packet> Low_lvl_packet::create_uninit_packet<Data_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  964
                                                                                                                                  +
                                                                                                                                  965 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  966
                                                                                                                                  +
                                                                                                                                  967 /**
                                                                                                                                  +
                                                                                                                                  968 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  969 *
                                                                                                                                  +
                                                                                                                                  970 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  971 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  972 */
                                                                                                                                  +
                                                                                                                                  973 explicit Data_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  974
                                                                                                                                  +
                                                                                                                                  975 // Methods.
                                                                                                                                  +
                                                                                                                                  976
                                                                                                                                  +
                                                                                                                                  977 /**
                                                                                                                                  +
                                                                                                                                  978 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  979 *
                                                                                                                                  +
                                                                                                                                  980 * @param os
                                                                                                                                  +
                                                                                                                                  981 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  982 * @param verbose
                                                                                                                                  +
                                                                                                                                  983 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  984 * @return `os`.
                                                                                                                                  +
                                                                                                                                  985 */
                                                                                                                                  +
                                                                                                                                  986 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  +
                                                                                                                                  987
                                                                                                                                  +
                                                                                                                                  988 /**
                                                                                                                                  +
                                                                                                                                  989 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  990 *
                                                                                                                                  +
                                                                                                                                  991 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  992 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  993 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  994 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  995 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  996 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  997 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  998 */
                                                                                                                                  + +
                                                                                                                                  1000 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  1001}; // struct Data_packet
                                                                                                                                  +
                                                                                                                                  1002
                                                                                                                                  +
                                                                                                                                  1003/**
                                                                                                                                  +
                                                                                                                                  1004 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  +
                                                                                                                                  1005 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  1006 *
                                                                                                                                  +
                                                                                                                                  1007 * Each ACK packet encapsulates 0 or more individual acknowledgments, each acknowledging receipt of
                                                                                                                                  +
                                                                                                                                  1008 * a specific, distinct Data_packaet; and the current rcv_wnd (receive window state) on the ACK sender's
                                                                                                                                  +
                                                                                                                                  1009 * side. The latter datum is always present. If individual acks are present, then the rcv_wnd advertising
                                                                                                                                  +
                                                                                                                                  1010 * is merely opportunistic. If NO individual acks are present, then the rcv_wnd advertising is intentional
                                                                                                                                  +
                                                                                                                                  1011 * for its own sake. The algorithm for the latter is discussed elsewhere.
                                                                                                                                  +
                                                                                                                                  1012 *
                                                                                                                                  +
                                                                                                                                  1013 * The mechanics of individual acks are further explored in the doc header for Ack_packet::Individual_ack
                                                                                                                                  +
                                                                                                                                  1014 * nested `struct`.
                                                                                                                                  +
                                                                                                                                  1015 *
                                                                                                                                  +
                                                                                                                                  1016 * @todo Conceivably, since Ack_packet actually stores 1+ acknowledgments, it should become Acks_packet, of
                                                                                                                                  +
                                                                                                                                  1017 * type ACKS (not ACK). Many comments and log messages would become clearer, as no one would assume an individual
                                                                                                                                  +
                                                                                                                                  1018 * packet's acknowledgment when reading "an ACK" or similar phrase.
                                                                                                                                  +
                                                                                                                                  1019 */
                                                                                                                                  + +
                                                                                                                                  1021{
                                                                                                                                  +
                                                                                                                                  1022 // Types.
                                                                                                                                  +
                                                                                                                                  1023
                                                                                                                                  +
                                                                                                                                  1024 /**
                                                                                                                                  +
                                                                                                                                  1025 * Type used to store the ACK delay for a given individual acknowledged packet. The value
                                                                                                                                  +
                                                                                                                                  1026 * specifies the number of multiples of `Ack_delay_time_unit(1)` comprising a packet's ACK delay.
                                                                                                                                  +
                                                                                                                                  1027 *
                                                                                                                                  +
                                                                                                                                  1028 * An earlier version of `net_flow` used the unit milliseconds and the encoding type uint16_t. The
                                                                                                                                  +
                                                                                                                                  1029 * reasoning was that this allowed a maximum ACK delay of ~65 sec which should be plenty; and that
                                                                                                                                  +
                                                                                                                                  1030 * the 1-millisecond finegrainedness was acceptable. However when implementing queue delay-based
                                                                                                                                  +
                                                                                                                                  1031 * congestion control (like FAST or Vegas) we realized it is important for RTTs (which use the ACK
                                                                                                                                  +
                                                                                                                                  1032 * delay value) to be quite precise (microsecond level or so). Therefore, to be totally safe, we
                                                                                                                                  +
                                                                                                                                  1033 * choose to use the same units as #Fine_duration, which is how we compute all time periods. As
                                                                                                                                  +
                                                                                                                                  1034 * for the the encoding width, we use 64 bits just in case.
                                                                                                                                  +
                                                                                                                                  1035 *
                                                                                                                                  +
                                                                                                                                  1036 * @todo Reconsider the encoding width. If `Ack_delay_time_unit(1)` is a nanosecond, then 32 bits
                                                                                                                                  +
                                                                                                                                  1037 * would support a maximum delay of ~4.1 seconds which is likely fine for most real-world
                                                                                                                                  +
                                                                                                                                  1038 * scenarios. This would reduce the size of ACK packets quite a bit.
                                                                                                                                  +
                                                                                                                                  1039 */
                                                                                                                                  +
                                                                                                                                  1040 using ack_delay_t = uint64_t;
                                                                                                                                  +
                                                                                                                                  1041
                                                                                                                                  +
                                                                                                                                  1042 /// `Ack_delay_time_unit(1)` is the duration corresponding to the #ack_delay_t value 1; and proportionally further.
                                                                                                                                  + +
                                                                                                                                  1044
                                                                                                                                  +
                                                                                                                                  1045 struct Individual_ack;
                                                                                                                                  + + +
                                                                                                                                  1048
                                                                                                                                  +
                                                                                                                                  1049 // Data.
                                                                                                                                  +
                                                                                                                                  1050
                                                                                                                                  +
                                                                                                                                  1051 /// Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  + +
                                                                                                                                  1053
                                                                                                                                  +
                                                                                                                                  1054 /**
                                                                                                                                  +
                                                                                                                                  1055 * This is the serialized version of `m_rcv_acked_packets_rexmit_{on|off}_out.size()` and
                                                                                                                                  +
                                                                                                                                  1056 * `m_rcv_acked_packets.size()` (whichever is applicable in context).
                                                                                                                                  +
                                                                                                                                  1057 * We send this value, even though it could be figured out from the overall serialized
                                                                                                                                  +
                                                                                                                                  1058 * size, to ensure integrity (see the deserialization logic for details).
                                                                                                                                  +
                                                                                                                                  1059 * This here is set to `size()`, when Low_lvl_packet::serialize_to_raw_data() needs to
                                                                                                                                  +
                                                                                                                                  1060 * serialize that value. Outside serialization `size()` is used directly, and this
                                                                                                                                  +
                                                                                                                                  1061 * value is meaningless.
                                                                                                                                  +
                                                                                                                                  1062 */
                                                                                                                                  + +
                                                                                                                                  1064
                                                                                                                                  +
                                                                                                                                  1065 // Type checks.
                                                                                                                                  +
                                                                                                                                  1066 static_assert(std::numeric_limits<rcv_wnd_t>::is_integer
                                                                                                                                  +
                                                                                                                                  1067 && (!std::numeric_limits<rcv_wnd_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  1068 "rcv_wnd values are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  1069
                                                                                                                                  +
                                                                                                                                  1070 /**
                                                                                                                                  +
                                                                                                                                  1071 * List of *incoming* (post-deserialization of ACK) acknowledgments of DATA packets,
                                                                                                                                  +
                                                                                                                                  1072 * each identified by its first datum's sequence number as
                                                                                                                                  +
                                                                                                                                  1073 * provided by the other side and ordered in the chronological order they were received.
                                                                                                                                  +
                                                                                                                                  1074 * This may also be empty, in which case the containing ACK acknowledges no DATA packets but only
                                                                                                                                  +
                                                                                                                                  1075 * advertises the current receive window size (#m_rcv_wnd). (Note that it advertises it if
                                                                                                                                  +
                                                                                                                                  1076 * #m_rcv_acked_packets is NOT empty as well.)
                                                                                                                                  +
                                                                                                                                  1077 *
                                                                                                                                  +
                                                                                                                                  1078 * This is used if and only if this Ack_packet is incoming. See #m_rcv_acked_packets_rexmit_on_out
                                                                                                                                  +
                                                                                                                                  1079 * and #m_rcv_acked_packets_rexmit_off_out for the outgoing scenario.
                                                                                                                                  +
                                                                                                                                  1080 *
                                                                                                                                  +
                                                                                                                                  1081 * Unlike vanilla TCP from RFC 793, which features cumulative acknowledgment (wherein only the
                                                                                                                                  +
                                                                                                                                  1082 * latest received segment BEFORE any unreceived gap is acknowledged, thus just one total number
                                                                                                                                  +
                                                                                                                                  1083 * in the ACK), and unlike later enhanced TCPs, which feature both cumulative acknowledgement
                                                                                                                                  +
                                                                                                                                  1084 * and individual ACKs (Selective ACKs), we use something similar to Selective ACKs only. That
                                                                                                                                  +
                                                                                                                                  1085 * is, we only acknowledge each packet individually (though we combine many such little
                                                                                                                                  +
                                                                                                                                  1086 * acknowledgments into one packet via delayed ACKs). Moreover, we do not piggy-back ACK info
                                                                                                                                  +
                                                                                                                                  1087 * onto DATA packets; ACK is its own type.
                                                                                                                                  +
                                                                                                                                  1088 *
                                                                                                                                  +
                                                                                                                                  1089 * Rationale for using SACKs only: Selective ACKs help greatly in giving accurate congestion
                                                                                                                                  +
                                                                                                                                  1090 * control data (e.g., ACK delay per packet, dropped packets) and remove complex ambiguities of
                                                                                                                                  +
                                                                                                                                  1091 * trying to interpret cumulative ACKs for that purpose. For retransmits, when enabled, Selective
                                                                                                                                  +
                                                                                                                                  1092 * ACKs also greatly simplify the design choices (since we know exactly what they don't have
                                                                                                                                  +
                                                                                                                                  1093 * [assuming no lost ACKs], we can send exactly what they want and no more).
                                                                                                                                  +
                                                                                                                                  1094 *
                                                                                                                                  +
                                                                                                                                  1095 * Rationale for keeping ACK and DATA separate: This is less clear-cut. It is easier to think
                                                                                                                                  +
                                                                                                                                  1096 * about, certainly, as the two types of traffic aren't really logically related in a full-duplex
                                                                                                                                  +
                                                                                                                                  1097 * connection. On the other hand it increases overhead. On the third hand that disadvantage is
                                                                                                                                  +
                                                                                                                                  1098 * not a big deal assuming mostly unidirectional traffic flow (which is typical), since most of
                                                                                                                                  +
                                                                                                                                  1099 * the time the ACKs would be data-less anyway in that situation. Delayed ACKs also help combat
                                                                                                                                  +
                                                                                                                                  1100 * overhead -- somewhat.
                                                                                                                                  +
                                                                                                                                  1101 *
                                                                                                                                  +
                                                                                                                                  1102 * Rationale for delayed ACKs a/k/a accumulating more than 1 acknowledgment into an ACK: Combat
                                                                                                                                  +
                                                                                                                                  1103 * overhead which can be a big deal for high bitrate streaming traffic for example (research
                                                                                                                                  +
                                                                                                                                  1104 * shows ACK flow can be 10% of data flow in the other direction). The cost is that the other
                                                                                                                                  +
                                                                                                                                  1105 * side gets somewhat delayed congestion control information, but the delay can be tuned. In
                                                                                                                                  +
                                                                                                                                  1106 * TCP implementations delayed ACKs appear to be universal since a long time ago.
                                                                                                                                  +
                                                                                                                                  1107 *
                                                                                                                                  +
                                                                                                                                  1108 * Any two packets represented by these `Individual_ack`s may be duplicates of each other (same
                                                                                                                                  +
                                                                                                                                  1109 * Sequence_number, possibly different delay values). It's up to the sender (receiver of ACK)
                                                                                                                                  +
                                                                                                                                  1110 * to sort it out. However, again, they MUST be ordered chronologicaly based on the time when
                                                                                                                                  +
                                                                                                                                  1111 * they were received; from earliest to latest.
                                                                                                                                  +
                                                                                                                                  1112 *
                                                                                                                                  +
                                                                                                                                  1113 * Storing shared pointers to avoid copying of `struct`s (however small) during internal
                                                                                                                                  +
                                                                                                                                  1114 * reshuffling; shared instead of raw pointers to not worry about `delete`.
                                                                                                                                  +
                                                                                                                                  1115 */
                                                                                                                                  +
                                                                                                                                  1116 std::vector<boost::shared_ptr<Individual_ack>> m_rcv_acked_packets;
                                                                                                                                  +
                                                                                                                                  1117
                                                                                                                                  +
                                                                                                                                  1118 /**
                                                                                                                                  +
                                                                                                                                  1119 * Equivalent of #m_rcv_acked_packets but used for *outgoing* (pre-serialization of ACK) acknowledgments
                                                                                                                                  +
                                                                                                                                  1120 * and only if retransmission is disabled. See notes in Individual_ack_rexmit_off doc header about how
                                                                                                                                  +
                                                                                                                                  1121 * this is used for efficient serialization of Ack_packet.
                                                                                                                                  +
                                                                                                                                  1122 *
                                                                                                                                  +
                                                                                                                                  1123 * This is used if and only if Ack_packet is outgoing, and retransmission is disabled.
                                                                                                                                  +
                                                                                                                                  1124 * See #m_rcv_acked_packets for the incoming scenario.
                                                                                                                                  +
                                                                                                                                  1125 */
                                                                                                                                  +
                                                                                                                                  1126 std::vector<Individual_ack_rexmit_off> m_rcv_acked_packets_rexmit_off_out;
                                                                                                                                  +
                                                                                                                                  1127
                                                                                                                                  +
                                                                                                                                  1128 /// Equivalent of #m_rcv_acked_packets_rexmit_off_out but for retransmission enabled.
                                                                                                                                  +
                                                                                                                                  1129 std::vector<Individual_ack_rexmit_on> m_rcv_acked_packets_rexmit_on_out;
                                                                                                                                  +
                                                                                                                                  1130
                                                                                                                                  +
                                                                                                                                  1131 /// In serialized packet, the type ID byte identifying this as an ACK packet. Must not equal any other packet type's.
                                                                                                                                  + +
                                                                                                                                  1133
                                                                                                                                  +
                                                                                                                                  1134 // Methods.
                                                                                                                                  +
                                                                                                                                  1135
                                                                                                                                  +
                                                                                                                                  1136 /**
                                                                                                                                  +
                                                                                                                                  1137 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  1138 *
                                                                                                                                  +
                                                                                                                                  1139 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  1140 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  1141 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  1142 */
                                                                                                                                  +
                                                                                                                                  1143 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  1144
                                                                                                                                  +
                                                                                                                                  1145private:
                                                                                                                                  +
                                                                                                                                  1146 // Friends.
                                                                                                                                  +
                                                                                                                                  1147
                                                                                                                                  +
                                                                                                                                  1148 /// Friend of Ack_packet: For access to private constructor `Ack_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  1149 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  1150 friend boost::shared_ptr<Ack_packet> Low_lvl_packet::create_uninit_packet<Ack_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  1151
                                                                                                                                  +
                                                                                                                                  1152 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  1153
                                                                                                                                  +
                                                                                                                                  1154 /**
                                                                                                                                  +
                                                                                                                                  1155 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  1156 *
                                                                                                                                  +
                                                                                                                                  1157 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  1158 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  1159 */
                                                                                                                                  +
                                                                                                                                  1160 explicit Ack_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  1161
                                                                                                                                  +
                                                                                                                                  1162 // Methods.
                                                                                                                                  +
                                                                                                                                  1163
                                                                                                                                  +
                                                                                                                                  1164 /**
                                                                                                                                  +
                                                                                                                                  1165 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  1166 *
                                                                                                                                  +
                                                                                                                                  1167 * @param os
                                                                                                                                  +
                                                                                                                                  1168 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  1169 * @param verbose
                                                                                                                                  +
                                                                                                                                  1170 * See Low_lvl_packet::to_ostream().
                                                                                                                                  +
                                                                                                                                  1171 * @return `os`.
                                                                                                                                  +
                                                                                                                                  1172 */
                                                                                                                                  +
                                                                                                                                  1173 std::ostream& to_ostream(std::ostream& os, bool verbose) const override;
                                                                                                                                  +
                                                                                                                                  1174
                                                                                                                                  +
                                                                                                                                  1175 /**
                                                                                                                                  +
                                                                                                                                  1176 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  1177 *
                                                                                                                                  +
                                                                                                                                  1178 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  1179 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1180 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  1181 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1182 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  1183 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1184 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1185 */
                                                                                                                                  + +
                                                                                                                                  1187 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  1188}; // struct Ack_packet
                                                                                                                                  +
                                                                                                                                  1189
                                                                                                                                  +
                                                                                                                                  1190/**
                                                                                                                                  +
                                                                                                                                  1191 * Specifies the *incoming* (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  +
                                                                                                                                  1192 * It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged.
                                                                                                                                  +
                                                                                                                                  1193 * Construct this by direct member initialization.
                                                                                                                                  +
                                                                                                                                  1194 */
                                                                                                                                  + +
                                                                                                                                  1196 // Cannot use boost::noncopyable or Shared_ptr_alias_holder, because that turns off direct initialization.
                                                                                                                                  +
                                                                                                                                  1197{
                                                                                                                                  +
                                                                                                                                  1198 // Types.
                                                                                                                                  +
                                                                                                                                  1199
                                                                                                                                  +
                                                                                                                                  1200 /// Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  1201 using Ptr = boost::shared_ptr<Individual_ack>;
                                                                                                                                  +
                                                                                                                                  1202
                                                                                                                                  +
                                                                                                                                  1203 /// Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  1204 using Const_ptr = boost::shared_ptr<const Individual_ack>;
                                                                                                                                  +
                                                                                                                                  1205
                                                                                                                                  +
                                                                                                                                  1206 // Data.
                                                                                                                                  +
                                                                                                                                  1207
                                                                                                                                  +
                                                                                                                                  1208 /**
                                                                                                                                  +
                                                                                                                                  1209 * Sequence number of first datum in packet that we acknowledge.
                                                                                                                                  +
                                                                                                                                  1210 * This is non-`const` for a technical reason: one must be able to use Sequence_number::set_metadata().
                                                                                                                                  +
                                                                                                                                  1211 */
                                                                                                                                  + +
                                                                                                                                  1213
                                                                                                                                  +
                                                                                                                                  1214 /// The delay between when we received the acknowledged packet and when decided to send this ack.
                                                                                                                                  + +
                                                                                                                                  1216
                                                                                                                                  +
                                                                                                                                  1217 /**
                                                                                                                                  +
                                                                                                                                  1218 * Retransmit counter of the acknowledged Data_packet. Identifies which attempt we are acknowledging
                                                                                                                                  +
                                                                                                                                  1219 * (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Literally this equals the acked
                                                                                                                                  +
                                                                                                                                  1220 * Data_packet::m_rexmit_id. Always 0 if retransmission is disabled for the given socket.
                                                                                                                                  +
                                                                                                                                  1221 */
                                                                                                                                  +
                                                                                                                                  1222 const unsigned int m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  1223
                                                                                                                                  +
                                                                                                                                  1224 /// Make us noncopyable without breaking aggregateness (direct-init).
                                                                                                                                  +
                                                                                                                                  1225 [[no_unique_address]] util::Noncopyable m_nc{};
                                                                                                                                  +
                                                                                                                                  1226}; // struct Ack_packet::Individual_ack
                                                                                                                                  +
                                                                                                                                  1227
                                                                                                                                  +
                                                                                                                                  1228static_assert(std::is_aggregate_v<Ack_packet::Individual_ack>,
                                                                                                                                  +
                                                                                                                                  1229 "We want it to be direct-initializable.");
                                                                                                                                  +
                                                                                                                                  1230static_assert((!std::is_copy_constructible_v<Ack_packet::Individual_ack>)
                                                                                                                                  +
                                                                                                                                  1231 && (!std::is_copy_assignable_v<Ack_packet::Individual_ack>),
                                                                                                                                  +
                                                                                                                                  1232 "We want it to be noncopyable but rather passed-around via its ::Ptr.");
                                                                                                                                  +
                                                                                                                                  1233
                                                                                                                                  +
                                                                                                                                  1234#pragma pack(push, 1)
                                                                                                                                  +
                                                                                                                                  1235
                                                                                                                                  +
                                                                                                                                  1236/**
                                                                                                                                  +
                                                                                                                                  1237 * Specifies the *outgoing* (pre-serialization) acknowledgment of a single received Data_packet, when
                                                                                                                                  +
                                                                                                                                  1238 * retranmission is disabled on the socket. Assuming network byte order equals native byte order,
                                                                                                                                  +
                                                                                                                                  1239 * and given that tight `struct` field packing is enabled throughout this code, one can arrange a tight
                                                                                                                                  +
                                                                                                                                  1240 * array of these `struct`s and transmit that entire array over the network with no need for scatter/gather
                                                                                                                                  +
                                                                                                                                  1241 * or any additional transformation of data post-construction and pushing onto aforementioned array.
                                                                                                                                  +
                                                                                                                                  1242 * These are copy-constructible, for pushing onto containers and such, but not assignable to avoid unnecessary
                                                                                                                                  +
                                                                                                                                  1243 * copying. Update: A later version of clang does not like
                                                                                                                                  +
                                                                                                                                  1244 * this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff;
                                                                                                                                  +
                                                                                                                                  1245 * it's internal code; we should be fine.
                                                                                                                                  +
                                                                                                                                  1246 *
                                                                                                                                  +
                                                                                                                                  1247 * @see Historical note in Ack_packet::serialize_to_raw_data() explains why this and
                                                                                                                                  +
                                                                                                                                  1248 * Individual_ack_rexmit_on both exist, instead of simply using Individual_ack in both directions.
                                                                                                                                  +
                                                                                                                                  1249 */
                                                                                                                                  + +
                                                                                                                                  1251{
                                                                                                                                  +
                                                                                                                                  1252 // Data.
                                                                                                                                  +
                                                                                                                                  1253
                                                                                                                                  +
                                                                                                                                  1254 /// See Individual_ack::m_seq_num and Sequence_number::raw_num_ref().
                                                                                                                                  +
                                                                                                                                  1256
                                                                                                                                  -
                                                                                                                                  1257 /// See Individual_ack::m_seq_num and Sequence_number::raw_num_ref().
                                                                                                                                  - -
                                                                                                                                  1259
                                                                                                                                  -
                                                                                                                                  1260 /// See Individual_ack::m_delay; this is in `Ack_delay_time_unit(1)` multiples.
                                                                                                                                  - -
                                                                                                                                  1262
                                                                                                                                  -
                                                                                                                                  1263 // Type checks.
                                                                                                                                  -
                                                                                                                                  1264 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  -
                                                                                                                                  1265 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  1266 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  1267 static_assert(std::numeric_limits<ack_delay_t>::is_integer
                                                                                                                                  -
                                                                                                                                  1268 && (!std::numeric_limits<ack_delay_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  1269 "Time periods are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  1270
                                                                                                                                  -
                                                                                                                                  1271 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  1272
                                                                                                                                  -
                                                                                                                                  1273 /**
                                                                                                                                  -
                                                                                                                                  1274 * Constructs object.
                                                                                                                                  -
                                                                                                                                  1275 *
                                                                                                                                  -
                                                                                                                                  1276 * @param seq_num
                                                                                                                                  -
                                                                                                                                  1277 * `seq_num.raw_num_ref()` is copied to #m_seq_num_raw.
                                                                                                                                  -
                                                                                                                                  1278 * @param delay
                                                                                                                                  -
                                                                                                                                  1279 * #m_delay.
                                                                                                                                  -
                                                                                                                                  1280 */
                                                                                                                                  -
                                                                                                                                  1281 explicit Individual_ack_rexmit_off(const Sequence_number& seq_num, ack_delay_t delay);
                                                                                                                                  -
                                                                                                                                  1282};
                                                                                                                                  -
                                                                                                                                  1283
                                                                                                                                  -
                                                                                                                                  1284/// Equivalent of `Individual_ack_rexmit_off` but for sockets with retransmission enabled.
                                                                                                                                  - -
                                                                                                                                  1286{
                                                                                                                                  -
                                                                                                                                  1287 // Data.
                                                                                                                                  +
                                                                                                                                  1257 /// See Individual_ack::m_delay; this is in `Ack_delay_time_unit(1)` multiples.
                                                                                                                                  + +
                                                                                                                                  1259
                                                                                                                                  +
                                                                                                                                  1260 // Type checks.
                                                                                                                                  +
                                                                                                                                  1261 static_assert(std::numeric_limits<Sequence_number::seq_num_t>::is_integer
                                                                                                                                  +
                                                                                                                                  1262 && (!std::numeric_limits<Sequence_number::seq_num_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  1263 "Raw sequence numbers are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  1264 static_assert(std::numeric_limits<ack_delay_t>::is_integer
                                                                                                                                  +
                                                                                                                                  1265 && (!std::numeric_limits<ack_delay_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  1266 "Time periods are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  1267
                                                                                                                                  +
                                                                                                                                  1268 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  1269
                                                                                                                                  +
                                                                                                                                  1270 /**
                                                                                                                                  +
                                                                                                                                  1271 * Constructs object.
                                                                                                                                  +
                                                                                                                                  1272 *
                                                                                                                                  +
                                                                                                                                  1273 * @param seq_num
                                                                                                                                  +
                                                                                                                                  1274 * `seq_num.raw_num_ref()` is copied to #m_seq_num_raw.
                                                                                                                                  +
                                                                                                                                  1275 * @param delay
                                                                                                                                  +
                                                                                                                                  1276 * #m_delay.
                                                                                                                                  +
                                                                                                                                  1277 */
                                                                                                                                  +
                                                                                                                                  1278 explicit Individual_ack_rexmit_off(const Sequence_number& seq_num, ack_delay_t delay);
                                                                                                                                  +
                                                                                                                                  1279};
                                                                                                                                  +
                                                                                                                                  1280
                                                                                                                                  +
                                                                                                                                  1281/// Equivalent of `Individual_ack_rexmit_off` but for sockets with retransmission enabled.
                                                                                                                                  + +
                                                                                                                                  1283{
                                                                                                                                  +
                                                                                                                                  1284 // Data.
                                                                                                                                  +
                                                                                                                                  1285
                                                                                                                                  +
                                                                                                                                  1286 /// Stores the values applicable to both Individual_ack_rexmit_off and Individual_ack_rexmit_on.
                                                                                                                                  +
                                                                                                                                  1288
                                                                                                                                  -
                                                                                                                                  1289 /// Stores the values applicable to both Individual_ack_rexmit_off and Individual_ack_rexmit_on.
                                                                                                                                  - -
                                                                                                                                  1291
                                                                                                                                  -
                                                                                                                                  1292 /// See Individual_ack::m_rexmit_id but note the type difference.
                                                                                                                                  - -
                                                                                                                                  1294
                                                                                                                                  -
                                                                                                                                  1295 // Type checks.
                                                                                                                                  -
                                                                                                                                  1296 static_assert(std::numeric_limits<rexmit_id_t>::is_integer
                                                                                                                                  -
                                                                                                                                  1297 && (!std::numeric_limits<rexmit_id_t>::is_signed),
                                                                                                                                  -
                                                                                                                                  1298 "Retransmission IDs are non-negative integers.");
                                                                                                                                  -
                                                                                                                                  1299
                                                                                                                                  -
                                                                                                                                  1300 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  1301
                                                                                                                                  -
                                                                                                                                  1302 /**
                                                                                                                                  -
                                                                                                                                  1303 * Constructs object.
                                                                                                                                  -
                                                                                                                                  1304 *
                                                                                                                                  -
                                                                                                                                  1305 * @param seq_num
                                                                                                                                  -
                                                                                                                                  1306 * Individual_ack_rexmit_off::m_seq_num.
                                                                                                                                  -
                                                                                                                                  1307 * @param rexmit_id
                                                                                                                                  -
                                                                                                                                  1308 * #m_rexmit_id.
                                                                                                                                  -
                                                                                                                                  1309 * @param delay
                                                                                                                                  -
                                                                                                                                  1310 * Individual_ack_rexmit_off::m_delay.
                                                                                                                                  -
                                                                                                                                  1311 */
                                                                                                                                  -
                                                                                                                                  1312 explicit Individual_ack_rexmit_on(const Sequence_number& seq_num, unsigned int rexmit_id, ack_delay_t delay);
                                                                                                                                  -
                                                                                                                                  1313};
                                                                                                                                  -
                                                                                                                                  1314
                                                                                                                                  -
                                                                                                                                  1315#pragma pack(pop)
                                                                                                                                  -
                                                                                                                                  1316
                                                                                                                                  -
                                                                                                                                  1317/**
                                                                                                                                  -
                                                                                                                                  1318 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  -
                                                                                                                                  1319 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  -
                                                                                                                                  1320 *
                                                                                                                                  -
                                                                                                                                  1321 * An RST means the sender is immediately shutting down the connection without waiting for any
                                                                                                                                  -
                                                                                                                                  1322 * feedback from the receiver and is recommending that the latter do the same ASAP. This is sent in
                                                                                                                                  -
                                                                                                                                  1323 * a variety of error situations.
                                                                                                                                  -
                                                                                                                                  1324 *
                                                                                                                                  -
                                                                                                                                  1325 * Implemementation notes
                                                                                                                                  -
                                                                                                                                  1326 * ----------------------
                                                                                                                                  -
                                                                                                                                  1327 * The one peculiar thing about Rst_packet is it contains no data beyond the super-`struct` Low_lvl_packet,
                                                                                                                                  -
                                                                                                                                  1328 * other than the fact it *is* an Rst_packet (i.e., its `typeid()` identifies it as such). Thus its
                                                                                                                                  -
                                                                                                                                  1329 * various `virtual` methods are typically either simple or even don't exist and defer to the Low_lvl_packet
                                                                                                                                  -
                                                                                                                                  1330 * implementation.
                                                                                                                                  -
                                                                                                                                  1331 */
                                                                                                                                  - -
                                                                                                                                  1333{
                                                                                                                                  -
                                                                                                                                  1334
                                                                                                                                  -
                                                                                                                                  1335 // Methods.
                                                                                                                                  -
                                                                                                                                  1336
                                                                                                                                  -
                                                                                                                                  1337 /**
                                                                                                                                  -
                                                                                                                                  1338 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  1339 *
                                                                                                                                  -
                                                                                                                                  1340 * @param raw_bufs
                                                                                                                                  -
                                                                                                                                  1341 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  1342 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  -
                                                                                                                                  1343 */
                                                                                                                                  -
                                                                                                                                  1344 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  -
                                                                                                                                  1345
                                                                                                                                  -
                                                                                                                                  1346 // Data.
                                                                                                                                  -
                                                                                                                                  1347
                                                                                                                                  -
                                                                                                                                  1348 /// In serialized packet, the type ID byte identifying this as an RST packet. Must not equal any other packet type's.
                                                                                                                                  - -
                                                                                                                                  1350
                                                                                                                                  -
                                                                                                                                  1351private:
                                                                                                                                  -
                                                                                                                                  1352 // Friends.
                                                                                                                                  -
                                                                                                                                  1353
                                                                                                                                  -
                                                                                                                                  1354 /// Friend of Rst_packet: For access to private constructor `Rst_packet(Logger*)`.
                                                                                                                                  -
                                                                                                                                  1355 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  -
                                                                                                                                  1356 friend boost::shared_ptr<Rst_packet> Low_lvl_packet::create_uninit_packet<Rst_packet>(log::Logger*);
                                                                                                                                  -
                                                                                                                                  1357
                                                                                                                                  -
                                                                                                                                  1358 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  1359
                                                                                                                                  -
                                                                                                                                  1360 /**
                                                                                                                                  -
                                                                                                                                  1361 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  1362 *
                                                                                                                                  -
                                                                                                                                  1363 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  1364 * Logger to use subsequently.
                                                                                                                                  -
                                                                                                                                  1365 */
                                                                                                                                  -
                                                                                                                                  1366 explicit Rst_packet(log::Logger* logger_ptr);
                                                                                                                                  -
                                                                                                                                  1367
                                                                                                                                  -
                                                                                                                                  1368 // Methods.
                                                                                                                                  -
                                                                                                                                  1369
                                                                                                                                  -
                                                                                                                                  1370 /**
                                                                                                                                  -
                                                                                                                                  1371 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  -
                                                                                                                                  1372 *
                                                                                                                                  -
                                                                                                                                  1373 * @param raw_buf
                                                                                                                                  -
                                                                                                                                  1374 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1375 * @param prefer_no_move
                                                                                                                                  -
                                                                                                                                  1376 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1377 * @param raw_packet
                                                                                                                                  -
                                                                                                                                  1378 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1379 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  -
                                                                                                                                  1380 */
                                                                                                                                  - -
                                                                                                                                  1382 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  -
                                                                                                                                  1383}; // struct Rst_packet
                                                                                                                                  -
                                                                                                                                  1384
                                                                                                                                  -
                                                                                                                                  1385// Template and constexpr implementations.
                                                                                                                                  -
                                                                                                                                  1386
                                                                                                                                  -
                                                                                                                                  1387template<typename Low_lvl_packet_sub>
                                                                                                                                  -
                                                                                                                                  1388boost::shared_ptr<Low_lvl_packet_sub> Low_lvl_packet::create_uninit_packet(log::Logger* logger) // Static.
                                                                                                                                  -
                                                                                                                                  1389{
                                                                                                                                  -
                                                                                                                                  1390 using boost::shared_ptr;
                                                                                                                                  -
                                                                                                                                  1391
                                                                                                                                  -
                                                                                                                                  1392 // Note: Low_lvl_packet_sub is not Low_lvl_packet. It is a sub-type: Syn_packet, Ack_packet, etc. We're a template.
                                                                                                                                  -
                                                                                                                                  1393
                                                                                                                                  -
                                                                                                                                  1394 // `friend` relation required to be able to call this private constructor.
                                                                                                                                  -
                                                                                                                                  1395 return shared_ptr<Low_lvl_packet_sub>(new Low_lvl_packet_sub(logger));
                                                                                                                                  -
                                                                                                                                  1396}
                                                                                                                                  -
                                                                                                                                  1397
                                                                                                                                  -
                                                                                                                                  1398template<typename Low_lvl_packet_sub>
                                                                                                                                  - -
                                                                                                                                  1400{
                                                                                                                                  -
                                                                                                                                  1401 return Low_lvl_packet::ptr_cast(create_uninit_packet<Low_lvl_packet_sub>(logger));
                                                                                                                                  -
                                                                                                                                  1402}
                                                                                                                                  -
                                                                                                                                  1403
                                                                                                                                  -
                                                                                                                                  1404constexpr bool Low_lvl_packet::native_is_big_endian() // Static.
                                                                                                                                  -
                                                                                                                                  1405{
                                                                                                                                  -
                                                                                                                                  1406 using boost::endian::native_to_big;
                                                                                                                                  -
                                                                                                                                  1407
                                                                                                                                  -
                                                                                                                                  1408 constexpr uint16_t TEST_VAL = 0x0102;
                                                                                                                                  -
                                                                                                                                  1409 return native_to_big(TEST_VAL) == TEST_VAL;
                                                                                                                                  -
                                                                                                                                  1410}
                                                                                                                                  -
                                                                                                                                  1411
                                                                                                                                  -
                                                                                                                                  1412} // namespace flow::net_flow
                                                                                                                                  +
                                                                                                                                  1289 /// See Individual_ack::m_rexmit_id but note the type difference.
                                                                                                                                  + +
                                                                                                                                  1291
                                                                                                                                  +
                                                                                                                                  1292 // Type checks.
                                                                                                                                  +
                                                                                                                                  1293 static_assert(std::numeric_limits<rexmit_id_t>::is_integer
                                                                                                                                  +
                                                                                                                                  1294 && (!std::numeric_limits<rexmit_id_t>::is_signed),
                                                                                                                                  +
                                                                                                                                  1295 "Retransmission IDs are non-negative integers.");
                                                                                                                                  +
                                                                                                                                  1296
                                                                                                                                  +
                                                                                                                                  1297 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  1298
                                                                                                                                  +
                                                                                                                                  1299 /**
                                                                                                                                  +
                                                                                                                                  1300 * Constructs object.
                                                                                                                                  +
                                                                                                                                  1301 *
                                                                                                                                  +
                                                                                                                                  1302 * @param seq_num
                                                                                                                                  +
                                                                                                                                  1303 * Individual_ack_rexmit_off::m_seq_num.
                                                                                                                                  +
                                                                                                                                  1304 * @param rexmit_id
                                                                                                                                  +
                                                                                                                                  1305 * #m_rexmit_id.
                                                                                                                                  +
                                                                                                                                  1306 * @param delay
                                                                                                                                  +
                                                                                                                                  1307 * Individual_ack_rexmit_off::m_delay.
                                                                                                                                  +
                                                                                                                                  1308 */
                                                                                                                                  +
                                                                                                                                  1309 explicit Individual_ack_rexmit_on(const Sequence_number& seq_num, unsigned int rexmit_id, ack_delay_t delay);
                                                                                                                                  +
                                                                                                                                  1310};
                                                                                                                                  +
                                                                                                                                  1311
                                                                                                                                  +
                                                                                                                                  1312#pragma pack(pop)
                                                                                                                                  +
                                                                                                                                  1313
                                                                                                                                  +
                                                                                                                                  1314/**
                                                                                                                                  +
                                                                                                                                  1315 * Internal `net_flow` `struct` that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  +
                                                                                                                                  1316 * See Low_lvl_packet doc header for information common to all low-level packets including this one.
                                                                                                                                  +
                                                                                                                                  1317 *
                                                                                                                                  +
                                                                                                                                  1318 * An RST means the sender is immediately shutting down the connection without waiting for any
                                                                                                                                  +
                                                                                                                                  1319 * feedback from the receiver and is recommending that the latter do the same ASAP. This is sent in
                                                                                                                                  +
                                                                                                                                  1320 * a variety of error situations.
                                                                                                                                  +
                                                                                                                                  1321 *
                                                                                                                                  +
                                                                                                                                  1322 * Implemementation notes
                                                                                                                                  +
                                                                                                                                  1323 * ----------------------
                                                                                                                                  +
                                                                                                                                  1324 * The one peculiar thing about Rst_packet is it contains no data beyond the super-`struct` Low_lvl_packet,
                                                                                                                                  +
                                                                                                                                  1325 * other than the fact it *is* an Rst_packet (i.e., its `typeid()` identifies it as such). Thus its
                                                                                                                                  +
                                                                                                                                  1326 * various `virtual` methods are typically either simple or even don't exist and defer to the Low_lvl_packet
                                                                                                                                  +
                                                                                                                                  1327 * implementation.
                                                                                                                                  +
                                                                                                                                  1328 */
                                                                                                                                  + +
                                                                                                                                  1330{
                                                                                                                                  +
                                                                                                                                  1331
                                                                                                                                  +
                                                                                                                                  1332 // Methods.
                                                                                                                                  +
                                                                                                                                  1333
                                                                                                                                  +
                                                                                                                                  1334 /**
                                                                                                                                  +
                                                                                                                                  1335 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  1336 *
                                                                                                                                  +
                                                                                                                                  1337 * @param raw_bufs
                                                                                                                                  +
                                                                                                                                  1338 * See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  1339 * @return See Low_lvl_packet::serialize_to_raw_data().
                                                                                                                                  +
                                                                                                                                  1340 */
                                                                                                                                  +
                                                                                                                                  1341 size_t serialize_to_raw_data(Const_buffer_sequence* raw_bufs) const override;
                                                                                                                                  +
                                                                                                                                  1342
                                                                                                                                  +
                                                                                                                                  1343 // Data.
                                                                                                                                  +
                                                                                                                                  1344
                                                                                                                                  +
                                                                                                                                  1345 /// In serialized packet, the type ID byte identifying this as an RST packet. Must not equal any other packet type's.
                                                                                                                                  + +
                                                                                                                                  1347
                                                                                                                                  +
                                                                                                                                  1348private:
                                                                                                                                  +
                                                                                                                                  1349 // Friends.
                                                                                                                                  +
                                                                                                                                  1350
                                                                                                                                  +
                                                                                                                                  1351 /// Friend of Rst_packet: For access to private constructor `Rst_packet(Logger*)`.
                                                                                                                                  +
                                                                                                                                  1352 // @todo Doxygen complains unless I make the above a Doxygen comment. In other places it doesn't complain. Fix...?
                                                                                                                                  +
                                                                                                                                  1353 friend boost::shared_ptr<Rst_packet> Low_lvl_packet::create_uninit_packet<Rst_packet>(log::Logger*);
                                                                                                                                  +
                                                                                                                                  1354
                                                                                                                                  +
                                                                                                                                  1355 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  1356
                                                                                                                                  +
                                                                                                                                  1357 /**
                                                                                                                                  +
                                                                                                                                  1358 * The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  +
                                                                                                                                  1359 *
                                                                                                                                  +
                                                                                                                                  1360 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  1361 * Logger to use subsequently.
                                                                                                                                  +
                                                                                                                                  1362 */
                                                                                                                                  +
                                                                                                                                  1363 explicit Rst_packet(log::Logger* logger_ptr);
                                                                                                                                  +
                                                                                                                                  1364
                                                                                                                                  +
                                                                                                                                  1365 // Methods.
                                                                                                                                  +
                                                                                                                                  1366
                                                                                                                                  +
                                                                                                                                  1367 /**
                                                                                                                                  +
                                                                                                                                  1368 * Implements Low_lvl_packet API. See that super-method's doc header.
                                                                                                                                  +
                                                                                                                                  1369 *
                                                                                                                                  +
                                                                                                                                  1370 * @param raw_buf
                                                                                                                                  +
                                                                                                                                  1371 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1372 * @param prefer_no_move
                                                                                                                                  +
                                                                                                                                  1373 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1374 * @param raw_packet
                                                                                                                                  +
                                                                                                                                  1375 * See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1376 * @return See Low_lvl_packet::deserialize_type_specific_data_from_raw_data_packet().
                                                                                                                                  +
                                                                                                                                  1377 */
                                                                                                                                  + +
                                                                                                                                  1379 bool prefer_no_move, util::Blob* raw_packet) override;
                                                                                                                                  +
                                                                                                                                  1380}; // struct Rst_packet
                                                                                                                                  +
                                                                                                                                  1381
                                                                                                                                  +
                                                                                                                                  1382// Template and constexpr implementations.
                                                                                                                                  +
                                                                                                                                  1383
                                                                                                                                  +
                                                                                                                                  1384template<typename Low_lvl_packet_sub>
                                                                                                                                  +
                                                                                                                                  1385boost::shared_ptr<Low_lvl_packet_sub> Low_lvl_packet::create_uninit_packet(log::Logger* logger) // Static.
                                                                                                                                  +
                                                                                                                                  1386{
                                                                                                                                  +
                                                                                                                                  1387 using boost::shared_ptr;
                                                                                                                                  +
                                                                                                                                  1388
                                                                                                                                  +
                                                                                                                                  1389 // Note: Low_lvl_packet_sub is not Low_lvl_packet. It is a sub-type: Syn_packet, Ack_packet, etc. We're a template.
                                                                                                                                  +
                                                                                                                                  1390
                                                                                                                                  +
                                                                                                                                  1391 // `friend` relation required to be able to call this private constructor.
                                                                                                                                  +
                                                                                                                                  1392 return shared_ptr<Low_lvl_packet_sub>(new Low_lvl_packet_sub(logger));
                                                                                                                                  +
                                                                                                                                  1393}
                                                                                                                                  +
                                                                                                                                  1394
                                                                                                                                  +
                                                                                                                                  1395template<typename Low_lvl_packet_sub>
                                                                                                                                  + +
                                                                                                                                  1397{
                                                                                                                                  +
                                                                                                                                  1398 return Low_lvl_packet::ptr_cast(create_uninit_packet<Low_lvl_packet_sub>(logger));
                                                                                                                                  +
                                                                                                                                  1399}
                                                                                                                                  +
                                                                                                                                  1400
                                                                                                                                  +
                                                                                                                                  1401constexpr bool Low_lvl_packet::native_is_big_endian() // Static.
                                                                                                                                  +
                                                                                                                                  1402{
                                                                                                                                  +
                                                                                                                                  1403 using boost::endian::native_to_big;
                                                                                                                                  +
                                                                                                                                  1404
                                                                                                                                  +
                                                                                                                                  1405 constexpr uint16_t TEST_VAL = 0x0102;
                                                                                                                                  +
                                                                                                                                  1406 return native_to_big(TEST_VAL) == TEST_VAL;
                                                                                                                                  +
                                                                                                                                  1407}
                                                                                                                                  +
                                                                                                                                  1408
                                                                                                                                  +
                                                                                                                                  1409} // namespace flow::net_flow
                                                                                                                                  - +
                                                                                                                                  Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
                                                                                                                                  Definition: log.hpp:1619
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  An internal net_flow sequence number identifying a piece of data.
                                                                                                                                  Definition: seq_num.hpp:126
                                                                                                                                  @@ -1497,124 +1494,123 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:386
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:391
                                                                                                                                  -
                                                                                                                                  Specifies the outgoing (pre-serialization) acknowledgment of a single received Data_packet,...
                                                                                                                                  -
                                                                                                                                  const Sequence_number::seq_num_t m_seq_num_raw
                                                                                                                                  See Individual_ack::m_seq_num and Sequence_number::raw_num_ref().
                                                                                                                                  -
                                                                                                                                  const ack_delay_t m_delay
                                                                                                                                  See Individual_ack::m_delay; this is in Ack_delay_time_unit(1) multiples.
                                                                                                                                  +
                                                                                                                                  Specifies the outgoing (pre-serialization) acknowledgment of a single received Data_packet,...
                                                                                                                                  +
                                                                                                                                  const Sequence_number::seq_num_t m_seq_num_raw
                                                                                                                                  See Individual_ack::m_seq_num and Sequence_number::raw_num_ref().
                                                                                                                                  +
                                                                                                                                  const ack_delay_t m_delay
                                                                                                                                  See Individual_ack::m_delay; this is in Ack_delay_time_unit(1) multiples.
                                                                                                                                  Individual_ack_rexmit_off(const Sequence_number &seq_num, ack_delay_t delay)
                                                                                                                                  Constructs object.
                                                                                                                                  -
                                                                                                                                  Equivalent of Individual_ack_rexmit_off but for sockets with retransmission enabled.
                                                                                                                                  -
                                                                                                                                  Data_packet::rexmit_id_t m_rexmit_id
                                                                                                                                  See Individual_ack::m_rexmit_id but note the type difference.
                                                                                                                                  -
                                                                                                                                  Individual_ack_rexmit_off m_basic_ack
                                                                                                                                  Stores the values applicable to both Individual_ack_rexmit_off and Individual_ack_rexmit_on.
                                                                                                                                  +
                                                                                                                                  Equivalent of Individual_ack_rexmit_off but for sockets with retransmission enabled.
                                                                                                                                  +
                                                                                                                                  Data_packet::rexmit_id_t m_rexmit_id
                                                                                                                                  See Individual_ack::m_rexmit_id but note the type difference.
                                                                                                                                  +
                                                                                                                                  Individual_ack_rexmit_off m_basic_ack
                                                                                                                                  Stores the values applicable to both Individual_ack_rexmit_off and Individual_ack_rexmit_on.
                                                                                                                                  Individual_ack_rexmit_on(const Sequence_number &seq_num, unsigned int rexmit_id, ack_delay_t delay)
                                                                                                                                  Constructs object.
                                                                                                                                  -
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  -
                                                                                                                                  Individual_ack()=delete
                                                                                                                                  Force direct member initialization even if no member is const.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  Sequence number of first datum in packet that we acknowledge.
                                                                                                                                  -
                                                                                                                                  void operator=(const Individual_ack &)=delete
                                                                                                                                  Forbid copy assignment.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  const Fine_duration m_delay
                                                                                                                                  The delay between when we received the acknowledged packet and when decided to send this ack.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  const unsigned int m_rexmit_id
                                                                                                                                  Retransmit counter of the acknowledged Data_packet.
                                                                                                                                  -
                                                                                                                                  Individual_ack(const Individual_ack &)=delete
                                                                                                                                  Forbid copy construction.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  -
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_acked_packets
                                                                                                                                  List of incoming (post-deserialization of ACK) acknowledgments of DATA packets, each identified by it...
                                                                                                                                  -
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  +
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  Sequence number of first datum in packet that we acknowledge.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  util::Noncopyable m_nc
                                                                                                                                  Make us noncopyable without breaking aggregateness (direct-init).
                                                                                                                                  +
                                                                                                                                  const Fine_duration m_delay
                                                                                                                                  The delay between when we received the acknowledged packet and when decided to send this ack.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  const unsigned int m_rexmit_id
                                                                                                                                  Retransmit counter of the acknowledged Data_packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  +
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_acked_packets
                                                                                                                                  List of incoming (post-deserialization of ACK) acknowledgments of DATA packets, each identified by it...
                                                                                                                                  +
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  +
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Current receive window (remaining Receive buffer size) of the ACK sender.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as an ACK packet. Must not equal any other pa...
                                                                                                                                  -
                                                                                                                                  uint16_t m_rcv_acked_packets_rexmit_out_size
                                                                                                                                  This is the serialized version of m_rcv_acked_packets_rexmit_{on|off}_out.size() and m_rcv_acked_pack...
                                                                                                                                  -
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  -
                                                                                                                                  std::vector< Individual_ack_rexmit_on > m_rcv_acked_packets_rexmit_on_out
                                                                                                                                  Equivalent of m_rcv_acked_packets_rexmit_off_out but for retransmission enabled.
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as an ACK packet. Must not equal any other pa...
                                                                                                                                  +
                                                                                                                                  uint16_t m_rcv_acked_packets_rexmit_out_size
                                                                                                                                  This is the serialized version of m_rcv_acked_packets_rexmit_{on|off}_out.size() and m_rcv_acked_pack...
                                                                                                                                  +
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  +
                                                                                                                                  std::vector< Individual_ack_rexmit_on > m_rcv_acked_packets_rexmit_on_out
                                                                                                                                  Equivalent of m_rcv_acked_packets_rexmit_off_out but for retransmission enabled.
                                                                                                                                  Ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  std::vector< Individual_ack_rexmit_off > m_rcv_acked_packets_rexmit_off_out
                                                                                                                                  Equivalent of m_rcv_acked_packets but used for outgoing (pre-serialization of ACK) acknowledgments an...
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  -
                                                                                                                                  uint16_t m_data_size_raw
                                                                                                                                  This is the serialized version of m_data.size() (see m_data).
                                                                                                                                  +
                                                                                                                                  std::vector< Individual_ack_rexmit_off > m_rcv_acked_packets_rexmit_off_out
                                                                                                                                  Equivalent of m_rcv_acked_packets but used for outgoing (pre-serialization of ACK) acknowledgments an...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  uint16_t m_data_size_raw
                                                                                                                                  This is the serialized version of m_data.size() (see m_data).
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Data_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a DATA packet. Must not equal any other pa...
                                                                                                                                  -
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  The sequence number of the first byte in the payload; i.e., of m_data.front(), a/k/a m_data[0].
                                                                                                                                  -
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  -
                                                                                                                                  rexmit_id_t m_rexmit_id
                                                                                                                                  Retransmit counter of the DATA packet being sent.
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a DATA packet. Must not equal any other pa...
                                                                                                                                  +
                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  The sequence number of the first byte in the payload; i.e., of m_data.front(), a/k/a m_data[0].
                                                                                                                                  +
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  rexmit_id_t m_rexmit_id
                                                                                                                                  Retransmit counter of the DATA packet being sent.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  util::Blob m_data
                                                                                                                                  The payload.
                                                                                                                                  +
                                                                                                                                  util::Blob m_data
                                                                                                                                  The payload.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  Helper data store type for storing binary data needed by serialize_to_raw_data(), when certains bits ...
                                                                                                                                  -
                                                                                                                                  uint8_t m_opt_rexmit_on_raw
                                                                                                                                  This is the serialized version of the multi-byte bool Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  -
                                                                                                                                  const uint16_t m_reserved2
                                                                                                                                  Unused space reserved for future use, ensuring correct alignment of other fields and headers.
                                                                                                                                  +
                                                                                                                                  Helper data store type for storing binary data needed by serialize_to_raw_data(), when certains bits ...
                                                                                                                                  +
                                                                                                                                  uint8_t m_opt_rexmit_on_raw
                                                                                                                                  This is the serialized version of the multi-byte bool Low_lvl_packet::m_opt_rexmit_on.
                                                                                                                                  +
                                                                                                                                  const uint16_t m_reserved2
                                                                                                                                  Unused space reserved for future use, ensuring correct alignment of other fields and headers.
                                                                                                                                  Aux_raw_data()
                                                                                                                                  Constructs a mostly-uninitialized object, except for the const member(s), if any.
                                                                                                                                  -
                                                                                                                                  A simple, unmodifiable data store that contains the properties unique to each packet type a/k/a concr...
                                                                                                                                  -
                                                                                                                                  const uint8_t m_raw_type_id
                                                                                                                                  The type ID value, in serialized order, to be used in each serialization of all packets of this type.
                                                                                                                                  -
                                                                                                                                  const std::string m_type_id_str
                                                                                                                                  The brief string representation of this packet type, suitable for Low_lvl_packet::type_id_to_str().
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as...
                                                                                                                                  -
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  -
                                                                                                                                  static boost::shared_ptr< Low_lvl_packet_sub > create_uninit_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type spec...
                                                                                                                                  -
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  -
                                                                                                                                  Aux_raw_data m_aux_raw_data
                                                                                                                                  Auxilliary data area necessary for serialize_to_raw_data() to work.
                                                                                                                                  +
                                                                                                                                  A simple, unmodifiable data store that contains the properties unique to each packet type a/k/a concr...
                                                                                                                                  +
                                                                                                                                  const uint8_t m_raw_type_id
                                                                                                                                  The type ID value, in serialized order, to be used in each serialization of all packets of this type.
                                                                                                                                  +
                                                                                                                                  const std::string m_type_id_str
                                                                                                                                  The brief string representation of this packet type, suitable for Low_lvl_packet::type_id_to_str().
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level packet structure and serves as...
                                                                                                                                  +
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  +
                                                                                                                                  static boost::shared_ptr< Low_lvl_packet_sub > create_uninit_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type spec...
                                                                                                                                  +
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  Aux_raw_data m_aux_raw_data
                                                                                                                                  Auxilliary data area necessary for serialize_to_raw_data() to work.
                                                                                                                                  static Ptr create_from_raw_data_packet(log::Logger *logger_ptr, util::Blob *raw_packet, bool prefer_no_move)
                                                                                                                                  Constructs packet on the heap with values determined by the given raw binary data as presumably recei...
                                                                                                                                  static const std::string & type_id_to_str(const std::type_index &type_id)
                                                                                                                                  Returns a brief (a few characters) string description of the given packet type given as type_index(ty...
                                                                                                                                  struct flow::net_flow::Low_lvl_packet::@7 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  virtual std::ostream & to_ostream(std::ostream &os, bool verbose=false) const
                                                                                                                                  Writes a multi-line representation of *this to an output stream.
                                                                                                                                  Low_lvl_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values.
                                                                                                                                  -
                                                                                                                                  static const boost::unordered_map< std::type_index, Packet_type_info > S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO
                                                                                                                                  Mapping from native typeid(), a/k/a packet type (for all possible packet types), to the set of proper...
                                                                                                                                  -
                                                                                                                                  static constexpr bool native_is_big_endian()
                                                                                                                                  Returns true, at compile time, if and only if the native memory representation is big-endian,...
                                                                                                                                  +
                                                                                                                                  static const boost::unordered_map< std::type_index, Packet_type_info > S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO
                                                                                                                                  Mapping from native typeid(), a/k/a packet type (for all possible packet types), to the set of proper...
                                                                                                                                  +
                                                                                                                                  static constexpr bool native_is_big_endian()
                                                                                                                                  Returns true, at compile time, if and only if the native memory representation is big-endian,...
                                                                                                                                  size_t serialize_to_raw_data_and_log(Const_buffer_sequence *raw_bufs) const
                                                                                                                                  Identical to serialize_to_raw_data() but adds log-level-appropriate logging after the operation.
                                                                                                                                  virtual bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet)=0
                                                                                                                                  virtual helper for create_from_raw_data_packet() that fills out the fields of *this that are not in L...
                                                                                                                                  -
                                                                                                                                  static Ptr create_uninit_packet_base(log::Logger *logger_ptr)
                                                                                                                                  A simple convenience method that casts the result of create_uninit_packet() from shared_ptr<T>,...
                                                                                                                                  +
                                                                                                                                  static Ptr create_uninit_packet_base(log::Logger *logger_ptr)
                                                                                                                                  A simple convenience method that casts the result of create_uninit_packet() from shared_ptr<T>,...
                                                                                                                                  static const uint8_t & type_id_native_to_raw(const std::type_info &type_id)
                                                                                                                                  Helper that looks up the Packet_type_info::m_raw_type_id value for the given typeid(p),...
                                                                                                                                  -
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  +
                                                                                                                                  std::vector< Const_buffer > Const_buffer_sequence
                                                                                                                                  Short-hand for sequence of immutable buffers; i.e., a sequence of 1 or more scattered areas in memory...
                                                                                                                                  std::ostream & type_to_ostream(std::ostream &os) const
                                                                                                                                  Writes a brief representation of typeid(*this) – i.e., the packet type (ACK, RST, etc....
                                                                                                                                  -
                                                                                                                                  flow_port_t m_dst_port
                                                                                                                                  Flow-protocol port # of socket in receiving Node.
                                                                                                                                  -
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_type_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet's type ("ACK",...
                                                                                                                                  -
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token member of a couple different packet types.
                                                                                                                                  -
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_concise_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet info suitable for TRACE log leve...
                                                                                                                                  +
                                                                                                                                  flow_port_t m_dst_port
                                                                                                                                  Flow-protocol port # of socket in receiving Node.
                                                                                                                                  +
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_type_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet's type ("ACK",...
                                                                                                                                  +
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token member of a couple different packet types.
                                                                                                                                  +
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_concise_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet info suitable for TRACE log leve...
                                                                                                                                  virtual size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const =0
                                                                                                                                  Serializes the current logical packet data from *this into the given Const_buffer_sequence,...
                                                                                                                                  -
                                                                                                                                  boost::asio::const_buffer Const_buffer
                                                                                                                                  Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory ...
                                                                                                                                  +
                                                                                                                                  boost::asio::const_buffer Const_buffer
                                                                                                                                  Short-hand for boost.asio immutable buffer, which essentially is a pointer to and length of a memory ...
                                                                                                                                  size_t serialize_common_header_to_raw_data(Const_buffer_sequence *raw_bufs) const
                                                                                                                                  Helper for serialize_to_raw_data() implementations in sub-types that encodes the header common to all...
                                                                                                                                  -
                                                                                                                                  bool m_opt_rexmit_on
                                                                                                                                  Option indicating whether this connection is using retransmission or not.
                                                                                                                                  -
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_verbose_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet info suitable for DATA log level...
                                                                                                                                  -
                                                                                                                                  flow_port_t m_src_port
                                                                                                                                  Flow-protocol port # of socket in sending Node.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  +
                                                                                                                                  bool m_opt_rexmit_on
                                                                                                                                  Option indicating whether this connection is using retransmission or not.
                                                                                                                                  +
                                                                                                                                  const Function< std::ostream &(std::ostream &)> m_verbose_ostream_manip
                                                                                                                                  ostream manipulator (argument to ostream <<) that will output packet info suitable for DATA log level...
                                                                                                                                  +
                                                                                                                                  flow_port_t m_src_port
                                                                                                                                  Flow-protocol port # of socket in sending Node.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Rst_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as an RST packet. Must not equal any other pa...
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as an RST packet. Must not equal any other pa...
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  struct flow::net_flow::Syn_ack_ack_packet::@9 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  -
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Same meaning as in Syn_ack_packet but applied to the essentially independent opposite traffic directi...
                                                                                                                                  +
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Same meaning as in Syn_ack_packet but applied to the essentially independent opposite traffic directi...
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  Syn_ack_ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  This must equal Syn_ack_packet m_security_token received in the packet to which *this is replying.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN_ACK_ACK. Must not equal any other pa...
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite traffi...
                                                                                                                                  +
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  This must equal Syn_ack_packet m_security_token received in the packet to which *this is replying.
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN_ACK_ACK. Must not equal any other pa...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  Same meaning as Syn_packet::m_init_seq_num but applied to the essentially independent opposite traffi...
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Number of DATA payload bytes the sender of this packet would accept into its Receive buffer,...
                                                                                                                                  +
                                                                                                                                  rcv_wnd_t m_rcv_wnd
                                                                                                                                  Number of DATA payload bytes the sender of this packet would accept into its Receive buffer,...
                                                                                                                                  Syn_ack_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  Random security token used during SYN_ACK-SYN_ACK_ACK.
                                                                                                                                  +
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  Random security token used during SYN_ACK-SYN_ACK_ACK.
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  struct flow::net_flow::Syn_ack_packet::@8 m_packed
                                                                                                                                  Packed group affected by #pragma pack.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN_ACK. Must not equal any other packet...
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN_ACK. Must not equal any other packet...
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  std::ostream & to_ostream(std::ostream &os, bool verbose) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN packet. Must not equal any other pac...
                                                                                                                                  +
                                                                                                                                  static const uint8_t S_RAW_TYPE_ID
                                                                                                                                  In serialized packet, the type ID byte identifying this as a SYN packet. Must not equal any other pac...
                                                                                                                                  Syn_packet(log::Logger *logger_ptr)
                                                                                                                                  The implementation of Low_lvl_packet::create_uninit_packet() for this sub-type of Low_lvl_packet.
                                                                                                                                  -
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by the user ...
                                                                                                                                  +
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  Arbitrary serialized user-supplied metadata to send in SYN, where it can be deserialized by the user ...
                                                                                                                                  bool deserialize_type_specific_data_from_raw_data_packet(Const_buffer *raw_buf, bool prefer_no_move, util::Blob *raw_packet) override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be usi...
                                                                                                                                  +
                                                                                                                                  Sequence_number m_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) of the sequence number line that the sender of this SYN will be usi...
                                                                                                                                  size_t serialize_to_raw_data(Const_buffer_sequence *raw_bufs) const override
                                                                                                                                  Implements Low_lvl_packet API.
                                                                                                                                  +
                                                                                                                                  Useful as a no-unique-address private member to make a type noncopyable while keeping that type an ag...
                                                                                                                                  Definition: util.hpp:74
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceboost_1_1filesystem.html b/doc/flow_doc/generated/html_full/namespaceboost_1_1filesystem.html index b9bd9a45c..2dd57d98d 100644 --- a/doc/flow_doc/generated/html_full/namespaceboost_1_1filesystem.html +++ b/doc/flow_doc/generated/html_full/namespaceboost_1_1filesystem.html @@ -148,7 +148,7 @@

                                                                                                                                  Rationale

                                                                                                                                  Definition at line 106 of file option_set.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::ostream_op_string().

                                                                                                                                  +

                                                                                                                                  References flow::util::ostream_op_string().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -161,7 +161,7 @@

                                                                                                                                  Rationale

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceboost_1_1system.html b/doc/flow_doc/generated/html_full/namespaceboost_1_1system.html index a6eaedff1..c4a12c1cc 100644 --- a/doc/flow_doc/generated/html_full/namespaceboost_1_1system.html +++ b/doc/flow_doc/generated/html_full/namespaceboost_1_1system.html @@ -87,7 +87,7 @@ diff --git a/doc/flow_doc/generated/html_full/namespaceflow.html b/doc/flow_doc/generated/html_full/namespaceflow.html index 2d638c38b..65022eb00 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow.html +++ b/doc/flow_doc/generated/html_full/namespaceflow.html @@ -219,7 +219,7 @@

                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508

                                                                                                                                  Then, there are two possibilities. If you pass in non-null err_code, then after return *err_code is success (falsy) or a truthy enum-like value, representing a specific error. If, instead, you pass in null, then a flow::error::Runtime_error() exc is thrown if and only if *err_code would have been set to truthy value e_c had a non-null err_code been passed in. If such an exception is thrown, Error_code e_c is encapsulated in exception object exc. If and only if no exception is thrown, there was no error (*err_code would have been falsy).

                                                                                                                                  Thus, you get the best of both worlds: you can get the simplicity and performance of an error code; or the various features of an exception (including access to the error code via exc.code() if desired), with the same API signature. (boost.asio follows a similar concept, though it requires two API signatures for each operation, one without an Error_code argument, and one with non-const Error_code& out-arg. The above convention is more compact; plus we provide certain tools to reduce boiler-plate in connection with this.)

                                                                                                                                  Intro to Error_code, a/k/a boost.system error_code

                                                                                                                                  @@ -245,7 +245,7 @@

                                                                                                                                  Intro to Error_code, a/k/a
                                                                                                                                  See also
                                                                                                                                  The doc header (and code inside) namespace flow::net_flow::error is a good primer showing how to create an Error_code-compatible set of error codes. This is easier to understand than boost.asio's counterpart for example.
                                                                                                                                  Note
                                                                                                                                  boost.system at some point – I (ygoldfel) am fairly sure after I designed the above ages ago – introduced an alternate idiom for passing an Error_code out-arg that is to be ignored in favor of throwing an exception if omitted. We use the idiom: Error_code* out-arg, throw if null. They, instead propose: Error_code& out-arg, throw if it equals boost::system::throws(). That's great, too, but actually our idiom hews to another bit of the Flow coding style/guide, wherein out-args should be pointers, not non-const references – and is otherwise very similar. So it's fine. Note that their idiom vs. ours = orthogonal to the main difficulty which is the boiler-plate associated with actually throwing vs. non-throwing; this would be required regardless of the API idiom chosen. The above (involving FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(), etc.) is really the main crux of it.
                                                                                                                                  -

                                                                                                                                  Definition at line 503 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 508 of file common.hpp.

                                                                                                                                  @@ -269,7 +269,7 @@

                                                                                                                                  Definition at line 405 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 410 of file common.hpp.

                                                                                                                                  @@ -287,7 +287,7 @@

                                                                                                                                  Definition at line 411 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 416 of file common.hpp.

                                                                                                                                  @@ -305,7 +305,7 @@

                                                                                                                                  Definition at line 408 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 413 of file common.hpp.

                                                                                                                                  @@ -323,7 +323,7 @@

                                                                                                                                  Definition at line 388 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 393 of file common.hpp.

                                                                                                                                  @@ -341,7 +341,7 @@

                                                                                                                                  Definition at line 386 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 391 of file common.hpp.

                                                                                                                                  @@ -396,7 +396,7 @@

                                                                                                                                  Details regarding overall log system init in user program

                                                                                                                                  -

                                                                                                                                  Definition at line 632 of file common.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 637 of file common.hpp.

                                                                                                                                  @@ -431,7 +431,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1async.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1async.html index f213b943a..9be1c2c14 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1async.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1async.html @@ -494,7 +494,7 @@

                                                                                                                                  References cpu_idx(), FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, S_ASYNC, S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION, S_ASYNC_AND_AWAIT_CONCURRENT_START, S_OPPORTUNISTIC_SYNC_ELSE_ASYNC, and flow::log::Logger::should_log().

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::close_abruptly(), flow::net_flow::Node::connect_with_metadata(), flow::net_flow::Node::event_set_close(), flow::net_flow::Node::event_set_create(), flow::net_flow::Node::listen(), and flow::net_flow::Node::sock_info().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::close_abruptly(), flow::net_flow::Node::connect_with_metadata(), flow::net_flow::Node::event_set_close(), flow::net_flow::Node::event_set_create(), flow::net_flow::Node::listen(), and flow::net_flow::Node::sock_info().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -979,7 +979,7 @@

                                                                                                                                  Definition at line 78 of file concurrent_task_loop.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, optimal_worker_thread_count_per_pool(), and flow::util::ostream_op_string().

                                                                                                                                  +

                                                                                                                                  References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_INFO, FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, optimal_worker_thread_count_per_pool(), and flow::util::ostream_op_string().

                                                                                                                                  Referenced by flow::async::Segregated_thread_task_loop::start(), and flow::async::Cross_thread_task_loop::start().

                                                                                                                                  @@ -1000,7 +1000,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg.html index 8d61faa38..95df5cc1b 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg.html @@ -530,7 +530,7 @@

                                                                                                                                  Definition at line 2237 of file option_set.hpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::ostream_op_string(), value_set_member_id_to_opt_name(), and VALUE_SET_MEMBER_ID_TO_OPT_NAME_KEYED_REGEX.

                                                                                                                                  +

                                                                                                                                  References flow::util::ostream_op_string(), value_set_member_id_to_opt_name(), and VALUE_SET_MEMBER_ID_TO_OPT_NAME_KEYED_REGEX.

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -587,7 +587,7 @@

                                                                                                                                  Definition at line 2166 of file option_set.hpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::ostream_op_string().

                                                                                                                                  +

                                                                                                                                  References flow::util::ostream_op_string().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -704,7 +704,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1fs.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1fs.html index 3209b79fc..ba259c04a 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1fs.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1fs.html @@ -78,7 +78,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1opts.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1opts.html index b1de98483..6cef9408c 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1opts.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1cfg_1_1opts.html @@ -78,7 +78,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1error.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1error.html index 51df05a74..8273a9f91 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1error.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1error.html @@ -234,7 +234,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1log.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1log.html index f2f6f3a3b..d87aa2890 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1log.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1log.html @@ -623,7 +623,7 @@

                                                                                                                                  Definition at line 270 of file log.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::istream_to_enum(), S_END_SENTINEL, and S_NONE.

                                                                                                                                  +

                                                                                                                                  References flow::util::istream_to_enum(), S_END_SENTINEL, and S_NONE.

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -752,7 +752,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1log_1_1fs.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1log_1_1fs.html index 33fff2327..89f8e1410 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1log_1_1fs.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1log_1_1fs.html @@ -78,7 +78,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow.html index d10275eca..8d1aac554 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow.html @@ -471,7 +471,7 @@

                                                                                                                                  Some_class some_instance;
                                                                                                                                  flow::Function<ostream& (ostream&)> print_something_to_stream
                                                                                                                                  = [some_instance](ostream& os) -> ostream& { return some_instance->func(os, false); };
                                                                                                                                  - +
                                                                                                                                  Warning
                                                                                                                                  It is important for this to be in namespace flow::net_flow, not higher (such as flow) or lower. Otherwise the places needing this overload to be used won't, and it will either not compile; or compile but invoke some other, useless overload. Unfortunately placing it into a containing namespace makes it not work from within a contained namespace.
                                                                                                                                  Note
                                                                                                                                  You may note the above technique is not used for argument-bearing std stream manipulators; for example std::setw(). The technique used to make that work is that setw() would return some internal struct (of unknown-to-user type T), in which it has stored the argument to setw(); and an operator<<(ostream, T) overload is defined; this overload would actually set the field width (or whatever setw() is supposed to do) on the ostream – using the arg value stored in the T. That works, and it may be somewhat more performant than our solution; but our solution is much more elegant and concise; it lets one build stream manipulators out of any function at all, the only requirements on it being that it returns an ostream& and takes same as an argument. The std technique allows the same, but we can do it with a single and expressive bind() call instead of a hidden internal struct type, explicitly storing arguments, documenting that stuff, etc. (We can change individual cases to use the std-style solution, if performance needs call for it, but so far there has been no such needs.) To be fair, the std solution is ALSO easier/more expressive at the actual call site. That is, in the above examples, one could just do: cout << func(false) << ":" << xyz; or cout << some_instance.func(false) << ":" << xyz;, respectively. That's easier to read than the bind() constructs above; but the code elsewhere that makes those func()s work is a huge mess that our solution completely avoids. For us, all that is needed behind the scenes is the present operator<< overload.
                                                                                                                                  Parameters
                                                                                                                                  @@ -565,7 +565,7 @@

                                                                                                                                  Returns
                                                                                                                                  os.

                                                                                                                                  -

                                                                                                                                  Definition at line 6508 of file peer_socket.cpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 6514 of file peer_socket.cpp.

                                                                                                                                  @@ -1053,7 +1053,7 @@

                                                                                                                                  Returns
                                                                                                                                  os.
                                                                                                                                  -

                                                                                                                                  Definition at line 6531 of file peer_socket.cpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 6537 of file peer_socket.cpp.

                                                                                                                                  @@ -1237,14 +1237,14 @@

                                                                                                                                  Definition at line 33 of file port_space.cpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::connect_worker(), flow::net_flow::Node::handle_incoming(), flow::net_flow::Node::listen_worker(), flow::net_flow::Port_space::Port_space(), flow::net_flow::Port_space::reserve_ephemeral_port(), and flow::net_flow::Port_space::reserve_port().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::connect_worker(), flow::net_flow::Node::handle_incoming(), flow::net_flow::Node::listen_worker(), flow::net_flow::Port_space::Port_space(), flow::net_flow::Port_space::reserve_ephemeral_port(), and flow::net_flow::Port_space::reserve_port().

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1asio.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1asio.html index b9b1d6fd0..dbbe5909a 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1asio.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1asio.html @@ -189,7 +189,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1error.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1error.html index df0ce947a..d691ffd7a 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1error.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1net__flow_1_1error.html @@ -149,7 +149,7 @@

                                                                                                                                  Synopsis

                                                                                                                                  throw flow::error::Runtime_error(code, "Additional context info here!");
                                                                                                                                  An std::runtime_error (which is an std::exception) that stores an Error_code.
                                                                                                                                  Definition: error.hpp:49
                                                                                                                                  @ S_CONN_REFUSED
                                                                                                                                  Other side refused connection.
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508

                                                                                                                                  Discussion

                                                                                                                                  The contents of this namespace is one instance (and model example) for how one can easily create their own simple error code set enum (and corresponding string messages) and hook it into the flexible, yet maximally fast, boost.system error facility. Another example (a peer of ours) would be boost.asio's error code set. See flow::Error_code doc header for a top-down summary of the Flow-used-and-recommended error reporting system.

                                                                                                                                  For boost.system experts wondering whether there is support for error_condition equivalence (i.e., the ability to compare a given flow::error::error_code to a more general boost::system::error_condition), currently the answer is no, there isn't. We may add error_conditions as Error_code usage patterns emerge over time.

                                                                                                                                  @@ -298,7 +298,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1perf.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1perf.html index 9e206df10..a5ef4be60 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1perf.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1perf.html @@ -1014,7 +1014,7 @@

                                                                                                                                  Synopsis/examples

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1util.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1util.html index 7c6b72ebe..83e214611 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1util.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1util.html @@ -126,6 +126,9 @@ class  Linked_hash_set  An object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<>. More...
                                                                                                                                    +struct  Noncopyable + Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). More...
                                                                                                                                  +  class  Null_interface  An empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor. More...
                                                                                                                                    @@ -1146,9 +1149,9 @@

                                                                                                                                  Returns
                                                                                                                                  Result string.
                                                                                                                                  -

                                                                                                                                  Definition at line 481 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 506 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  References buffers_to_ostream(), and flow::util::String_ostream::os().

                                                                                                                                  +

                                                                                                                                  References buffers_to_ostream(), and flow::util::String_ostream::os().

                                                                                                                                  Referenced by flow::net_flow::Socket_buffer::consume_buf_move(), flow::net_flow::Socket_buffer::consume_bufs_copy(), flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), flow::net_flow::Socket_buffer::feed_buf_move(), flow::net_flow::Socket_buffer::feed_bufs_copy(), flow::net_flow::Node::handle_data_to_established(), and flow::net_flow::Low_lvl_packet::serialize_to_raw_data_and_log().

                                                                                                                                  " ");
                                                                                                                                  << "]."; // This will be on its own line at the end.
                                                                                                                                  -
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:388
                                                                                                                                  +
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:413

                                                                                                                                  See also buffers_dump_string() which returns a string and can thus be more easily used directly inside FLOW_LOG_DATA() and similar log macros.

                                                                                                                                  Performance

                                                                                                                                  This thing is slow... it's not trying to be fast and can't be all that fast anyway. As usual, though, if used in FLOW_LOG_DATA() (etc.) its slowness will only come into play if the log filter passes which (esp. for log::Severity::S_DATA) it usually won't.

                                                                                                                                  @@ -1241,9 +1244,9 @@

                                                                                                                                  Performance

                                                                                                                                  << buffers_dump_string(boost::asio::buffer(bytes), " ") // Intermediate+copy, slow....
                                                                                                                                  << "].");
                                                                                                                                  // flow::util::ostream_op_string() is a bit of an improvement but still. :-)
                                                                                                                                  - +
                                                                                                                                  #define FLOW_LOG_INFO(ARG_stream_fragment)
                                                                                                                                  Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
                                                                                                                                  Definition: log.hpp:197
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506

                                                                                                                                  Rationale

                                                                                                                                  The reason it returns os and takes a reference-to-mutable instead of the customary (for this project's style, to indicate modification potential at call sites) pointer-to-mutable is in order to be bind()able in such a way as to make an ostream manipulator. In the example above we use a lambda instead of bind() however.

                                                                                                                                  Template Parameters
                                                                                                                                  @@ -1263,9 +1266,9 @@

                                                                                                                                  Performance

                                                                                                                                  Returns
                                                                                                                                  os.
                                                                                                                                  -

                                                                                                                                  Definition at line 388 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 413 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by buffers_dump_string(), flow::net_flow::Syn_packet::to_ostream(), and flow::net_flow::Data_packet::to_ostream().

                                                                                                                                  +

                                                                                                                                  Referenced by buffers_dump_string(), flow::net_flow::Syn_packet::to_ostream(), and flow::net_flow::Data_packet::to_ostream().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -1320,7 +1323,7 @@

                                                                                                                                  Returns
                                                                                                                                  Ceiling of (dividend / divisor).
                                                                                                                                  -

                                                                                                                                  Definition at line 233 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 258 of file util.hpp.

                                                                                                                                  Referenced by flow::net_flow::Peer_socket::max_block_size_multiple().

                                                                                                                                  @@ -1571,11 +1574,11 @@

                                                                                                                                  Definition at line 327 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 352 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  References feed_args_to_ostream().

                                                                                                                                  +

                                                                                                                                  References feed_args_to_ostream().

                                                                                                                                  -

                                                                                                                                  Referenced by feed_args_to_ostream(), and ostream_op_to_string().

                                                                                                                                  +

                                                                                                                                  Referenced by feed_args_to_ostream(), and ostream_op_to_string().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -1680,7 +1683,7 @@

                                                                                                                                  Definition at line 27 of file util.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_UTIL_WHERE_AM_I_FROM_ARGS_TO_ARGS, and ostream_op_to_string().

                                                                                                                                  +

                                                                                                                                  References FLOW_UTIL_WHERE_AM_I_FROM_ARGS_TO_ARGS, and ostream_op_to_string().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -1741,7 +1744,7 @@

                                                                                                                                  Returns
                                                                                                                                  true if and only if val is in [min_val, max_val), i.e., min_val <= val < max_val.
                                                                                                                                  -

                                                                                                                                  Definition at line 262 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 287 of file util.hpp.

                                                                                                                                  Referenced by flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >::derefable_iterator(), flow::net_flow::Port_space::is_service_port(), and flow::net_flow::Port_space::return_port().

                                                                                                                                  @@ -1804,9 +1807,9 @@

                                                                                                                                  Returns
                                                                                                                                  true if and only if val is in [min_val, max_val].
                                                                                                                                  -

                                                                                                                                  Definition at line 246 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 271 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Peer_socket_info::output(), flow::net_flow::Node::sock_validate_options(), and flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >::valid_iterator().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Peer_socket_info::output(), flow::net_flow::Node::sock_validate_options(), and flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >::valid_iterator().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -1867,9 +1870,9 @@

                                                                                                                                  Returns
                                                                                                                                  true if and only if val is in (min_val, max_val], i.e., min_val < val <= max_val.
                                                                                                                                  -

                                                                                                                                  Definition at line 254 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 279 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::sock_validate_options().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -1930,9 +1933,9 @@

                                                                                                                                  Returns
                                                                                                                                  true if and only if val is in (min_val, max_val), i.e., min_val < val < max_val.
                                                                                                                                  -

                                                                                                                                  Definition at line 270 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 295 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2021,7 +2024,7 @@

                                                                                                                                  Returns
                                                                                                                                  See above.
                                                                                                                                  -

                                                                                                                                  Definition at line 498 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 523 of file util.hpp.

                                                                                                                                  Referenced by flow::log::operator>>().

                                                                                                                                  @@ -2077,9 +2080,9 @@

                                                                                                                                  Returns
                                                                                                                                  See above.
                                                                                                                                  -

                                                                                                                                  Definition at line 276 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 301 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::cfg::Option_set< Value_set >::canonicalize_candidate(), flow::net_flow::Node::connect_worker(), flow::net_flow::Drop_timer::end_contemporaneous_events(), flow::net_flow::Node::event_set_all_check_delta(), flow::net_flow::Node::handle_syn_to_listening_server(), flow::log::Config::init_component_names(), flow::log::Config::init_component_to_union_idx_mapping(), flow::net_flow::Node::listen_worker(), flow::net_flow::Drop_timer::on_ack(), and flow::cfg::Option_set< Value_set >::parse_config_file().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::cfg::Option_set< Value_set >::canonicalize_candidate(), flow::net_flow::Node::connect_worker(), flow::net_flow::Drop_timer::end_contemporaneous_events(), flow::net_flow::Node::event_set_all_check_delta(), flow::net_flow::Node::handle_syn_to_listening_server(), flow::log::Config::init_component_names(), flow::log::Config::init_component_to_union_idx_mapping(), flow::net_flow::Node::listen_worker(), flow::net_flow::Drop_timer::on_ack(), and flow::cfg::Option_set< Value_set >::parse_config_file().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2124,9 +2127,9 @@

                                                                                                                                  Returns
                                                                                                                                  Resulting std::string.
                                                                                                                                  -

                                                                                                                                  Definition at line 356 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 381 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  References ostream_op_to_string().

                                                                                                                                  +

                                                                                                                                  References ostream_op_to_string().

                                                                                                                                  Referenced by flow::log::Verbosity_config::apply_to_config(), flow::perf::Checkpointing_timer::Checkpointing_timer(), flow::cfg::Config_manager< S_d_value_set >::Config_manager(), flow::async::optimize_pinning_in_thread_pool(), flow::log::Verbosity_config::parse(), flow::cfg::Option_set< Value_set >::parse_config_file(), flow::async::Segregated_thread_task_loop::start(), flow::async::Cross_thread_task_loop::start(), flow::log::Logger::this_thread_set_logged_nickname(), boost::filesystem::validate(), flow::cfg::value_set_member_id_to_opt_name_keyed(), and flow::cfg::value_to_ostream().

                                                                                                                                  @@ -2189,11 +2192,11 @@

                                                                                                                                  Definition at line 342 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 367 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  References feed_args_to_ostream(), and flow::util::String_ostream::os().

                                                                                                                                  +

                                                                                                                                  References feed_args_to_ostream(), and flow::util::String_ostream::os().

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Event_set::ev_type_to_socks_map_sizes_to_str(), get_where_am_i_str(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::error::Category::message(), flow::perf::Duration_set::operator<<(), ostream_op_string(), flow::net_flow::Event_set::sock_as_any_to_str(), and flow::net_flow::Node::this_thread_init_logger_setup().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Event_set::ev_type_to_socks_map_sizes_to_str(), get_where_am_i_str(), flow::net_flow::Node::log_rcv_window(), flow::net_flow::Node::log_snd_window(), flow::net_flow::error::Category::message(), flow::perf::Duration_set::operator<<(), ostream_op_string(), flow::net_flow::Event_set::sock_as_any_to_str(), and flow::net_flow::Node::this_thread_init_logger_setup().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -2406,7 +2409,7 @@

                                                                                                                                  Features lost vs. References flow::util::Unique_id_holder::create_unique_id(), FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, and FLOW_LOG_WARNING.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::async_rcv_wnd_recovery(), flow::net_flow::Node::async_wait_latency_then_handle_incoming(), flow::net_flow::Node::perform_regular_infrequent_tasks(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::net_flow::Node::setup_connection_timers(), and flow::net_flow::Node::worker_run().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::async_rcv_wnd_recovery(), flow::net_flow::Node::async_wait_latency_then_handle_incoming(), flow::net_flow::Node::perform_regular_infrequent_tasks(), flow::async::Cross_thread_task_loop::schedule_from_now(), flow::async::Segregated_thread_task_loop::schedule_from_now_impl(), flow::net_flow::Node::setup_connection_timers(), and flow::net_flow::Node::worker_run().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -2463,7 +2466,7 @@

                                                                                                                                  References FLOW_ERROR_SYS_ERROR_LOG_WARNING, FLOW_LOG_SET_CONTEXT, and FLOW_LOG_TRACE.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::asio::Node::async_op(), flow::net_flow::Node::cancel_timers(), and flow::net_flow::Node::receive_wnd_recovery_data_received().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::asio::Node::async_op(), flow::net_flow::Node::cancel_timers(), and flow::net_flow::Node::receive_wnd_recovery_data_received().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2559,7 +2562,7 @@

                                                                                                                                  References FLOW_LOG_SET_CONTEXT, and FLOW_LOG_TRACE.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::setup_connection_timers().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::setup_connection_timers().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2610,7 +2613,7 @@

                                                                                                                                  References FLOW_LOG_SET_CONTEXT, and FLOW_LOG_TRACE.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::setup_connection_timers().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::setup_connection_timers().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2709,9 +2712,9 @@

                                                                                                                                  Definition at line 379 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 404 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  References sequence_to_inverted_lookup_map().

                                                                                                                                  +

                                                                                                                                  References sequence_to_inverted_lookup_map().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -2773,9 +2776,9 @@

                                                                                                                                  Definition at line 366 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 391 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by sequence_to_inverted_lookup_map().

                                                                                                                                  +

                                                                                                                                  Referenced by sequence_to_inverted_lookup_map().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  // ...
                                                                                                                                  }
                                                                                                                                  -
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:282
                                                                                                                                  +
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:307

                                                                                                                                  Todo:
                                                                                                                                  setup_auto_cleanup() should take a function via move semantics.
                                                                                                                                  Template Parameters
                                                                                                                                  @@ -2827,9 +2830,9 @@

                                                                                                                                  Returns
                                                                                                                                  A light-weight object that, when it goes out of scope, will cause func() to be called.
                                                                                                                                  -

                                                                                                                                  Definition at line 282 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 307 of file util.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::handle_accumulated_acks(), flow::net_flow::Node::sync_connect_impl(), and flow::net_flow::Node::sync_op().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::handle_accumulated_acks(), flow::net_flow::Node::sync_connect_impl(), and flow::net_flow::Node::sync_op().

                                                                                                                                  Here is the caller graph for this function:
                                                                                                                                  @@ -2921,7 +2924,7 @@

                                                                                                                                  subtract_with_floor(&t, x) &&
                                                                                                                                  subtract_with_floor(&t, long_computation()) &&
                                                                                                                                  subtract_with_floor(&t, another_long_computation());
                                                                                                                                  -
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:299
                                                                                                                                  +
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:324
                                                                                                                                  Template Parameters

                                                                                                                                  @@ -2939,7 +2942,7 @@

                                                                                                                                  Returns
                                                                                                                                  true if *minuend == floor at function exit; false if *minuend > floor.
                                                                                                                                  -

                                                                                                                                  Definition at line 299 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 324 of file util.hpp.

                                                                                                                                  Referenced by flow::net_flow::Node::sock_data_to_reassembly_q_unless_overflow().

                                                                                                                                  @@ -3256,14 +3259,14 @@

                                                                                                                                  Returns
                                                                                                                                  See above.
                                                                                                                                  -

                                                                                                                                  Definition at line 212 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 237 of file util.hpp.

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1bind__ns.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1bind__ns.html index 749c52b87..3fc334089 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1bind__ns.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1bind__ns.html @@ -83,7 +83,7 @@ diff --git a/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1this__thread.html b/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1this__thread.html index e8407fed6..5ec1edff1 100644 --- a/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1this__thread.html +++ b/doc/flow_doc/generated/html_full/namespaceflow_1_1util_1_1this__thread.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/namespacemembers.html b/doc/flow_doc/generated/html_full/namespacemembers.html index 70ab3e65b..963298f1f 100644 --- a/doc/flow_doc/generated/html_full/namespacemembers.html +++ b/doc/flow_doc/generated/html_full/namespacemembers.html @@ -263,7 +263,7 @@

                                                                                                                                  - x -

                                                                                                                                    diff --git a/doc/flow_doc/generated/html_full/namespacemembers_enum.html b/doc/flow_doc/generated/html_full/namespacemembers_enum.html index 37a24111b..1c1556abe 100644 --- a/doc/flow_doc/generated/html_full/namespacemembers_enum.html +++ b/doc/flow_doc/generated/html_full/namespacemembers_enum.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_full/namespacemembers_func.html b/doc/flow_doc/generated/html_full/namespacemembers_func.html index f26f09f6e..2eb366bee 100644 --- a/doc/flow_doc/generated/html_full/namespacemembers_func.html +++ b/doc/flow_doc/generated/html_full/namespacemembers_func.html @@ -193,7 +193,7 @@

                                                                                                                                    - v -

                                                                                                                                      diff --git a/doc/flow_doc/generated/html_full/namespacemembers_type.html b/doc/flow_doc/generated/html_full/namespacemembers_type.html index 474b2e2e9..217baf349 100644 --- a/doc/flow_doc/generated/html_full/namespacemembers_type.html +++ b/doc/flow_doc/generated/html_full/namespacemembers_type.html @@ -165,7 +165,7 @@

                                                                                                                                      - u -

                                                                                                                                        diff --git a/doc/flow_doc/generated/html_full/namespacemembers_vars.html b/doc/flow_doc/generated/html_full/namespacemembers_vars.html index 32d25f0af..86b742ef2 100644 --- a/doc/flow_doc/generated/html_full/namespacemembers_vars.html +++ b/doc/flow_doc/generated/html_full/namespacemembers_vars.html @@ -72,7 +72,7 @@ diff --git a/doc/flow_doc/generated/html_full/namespaces.html b/doc/flow_doc/generated/html_full/namespaces.html index 433dfdcbd..50b26bf09 100644 --- a/doc/flow_doc/generated/html_full/namespaces.html +++ b/doc/flow_doc/generated/html_full/namespaces.html @@ -186,15 +186,16 @@

                                                                                                                                  - - - - - - - - - + + + + + + + + + +
                                                                                                                                  MinuendNumeric type.
                                                                                                                                   CFunction
                                                                                                                                   CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function
                                                                                                                                  @@ -202,7 +203,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__env__simulator_8cpp.html b/doc/flow_doc/generated/html_full/net__env__simulator_8cpp.html index 802794301..183eedc77 100644 --- a/doc/flow_doc/generated/html_full/net__env__simulator_8cpp.html +++ b/doc/flow_doc/generated/html_full/net__env__simulator_8cpp.html @@ -88,7 +88,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__env__simulator_8cpp_source.html b/doc/flow_doc/generated/html_full/net__env__simulator_8cpp_source.html index 6de2b9c9d..5fbc96840 100644 --- a/doc/flow_doc/generated/html_full/net__env__simulator_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/net__env__simulator_8cpp_source.html @@ -189,13 +189,13 @@
                                                                                                                                  #define FLOW_LOG_INFO(ARG_stream_fragment)
                                                                                                                                  Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
                                                                                                                                  Definition: log.hpp:197
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  boost::chrono::microseconds time_since_posix_epoch()
                                                                                                                                  Get the current POSIX (Unix) time as a duration from the Epoch time point.
                                                                                                                                  Definition: util.cpp:147
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__env__simulator_8hpp.html b/doc/flow_doc/generated/html_full/net__env__simulator_8hpp.html index f4c29305a..1ec251477 100644 --- a/doc/flow_doc/generated/html_full/net__env__simulator_8hpp.html +++ b/doc/flow_doc/generated/html_full/net__env__simulator_8hpp.html @@ -101,7 +101,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__env__simulator_8hpp_source.html b/doc/flow_doc/generated/html_full/net__env__simulator_8hpp_source.html index b2060a8f5..30ede931d 100644 --- a/doc/flow_doc/generated/html_full/net__env__simulator_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/net__env__simulator_8hpp_source.html @@ -311,13 +311,13 @@
                                                                                                                                  boost::random::mt19937 Random_generator
                                                                                                                                  The random generator engine; it is public for the reason explained in Usability section of the Rnd_ge...
                                                                                                                                  Definition: random.hpp:41
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp.html b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp.html index c154ad53d..5fa4dd7ce 100644 --- a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp.html +++ b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp.html @@ -107,7 +107,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp_source.html b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp_source.html index 9a3b40768..cb7d4b25b 100644 --- a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8cpp_source.html @@ -303,15 +303,15 @@
                                                                                                                                  @ S_INTERNAL_ERROR_PORT_COLLISION
                                                                                                                                  Internal error: Ephemeral port double reservation allowed.
                                                                                                                                  @ S_NODE_NOT_RUNNING
                                                                                                                                  Node not running.
                                                                                                                                  Error_code make_error_code(Code err_code)
                                                                                                                                  Given a Code enum value, creates a lightweight flow::Error_code (a/k/a boost.system error_code) repre...
                                                                                                                                  Definition: error.cpp:93
                                                                                                                                  -
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:342
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp.html b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp.html index adfe83b92..7f0e18fd0 100644 --- a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp.html +++ b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp.html @@ -153,7 +153,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp_source.html b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp_source.html index 5f0b59177..c4117b357 100644 --- a/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/net__flow_2error_2error_8hpp_source.html @@ -356,11 +356,11 @@
                                                                                                                                  @ S_INTERNAL_ERROR_PORT_COLLISION
                                                                                                                                  Internal error: Ephemeral port double reservation allowed.
                                                                                                                                  @ S_NODE_NOT_RUNNING
                                                                                                                                  Node not running.
                                                                                                                                  Error_code make_error_code(Code err_code)
                                                                                                                                  Given a Code enum value, creates a lightweight flow::Error_code (a/k/a boost.system error_code) repre...
                                                                                                                                  Definition: error.cpp:93
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp.html b/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp.html index b33b1d8a0..17f83f5b0 100644 --- a/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp.html @@ -149,7 +149,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp_source.html index 05cff036e..9ca931505 100644 --- a/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/net__flow__fwd_8hpp_source.html @@ -327,7 +327,7 @@
                                                                                                                                  255
                                                                                                                                  256} // namespace flow::net_flow::asio
                                                                                                                                  A data store that keeps stats about the outgoing direction of a Peer_socket connection to another Flo...
                                                                                                                                  Definition: info.hpp:286
                                                                                                                                  -
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  +
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  A server socket able to listen on a single Flow port for incoming connections and return peer sockets...
                                                                                                                                  Contains classes that add boost.asio integration to the main Flow-protocol classes such as net_flow::...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  @@ -349,7 +349,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/net__flow__util_8cpp.html b/doc/flow_doc/generated/html_full/net__flow__util_8cpp.html index f95b7aa93..da7dab722 100644 --- a/doc/flow_doc/generated/html_full/net__flow__util_8cpp.html +++ b/doc/flow_doc/generated/html_full/net__flow__util_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/net__flow__util_8cpp_source.html b/doc/flow_doc/generated/html_full/net__flow__util_8cpp_source.html index e52ffffe3..f940d70b1 100644 --- a/doc/flow_doc/generated/html_full/net__flow__util_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/net__flow__util_8cpp_source.html @@ -101,14 +101,14 @@
                                                                                                                                  29}
                                                                                                                                  30
                                                                                                                                  31} // namespace flow::net_flow
                                                                                                                                  - +
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/node_8cpp.html b/doc/flow_doc/generated/html_full/node_8cpp.html index d85bf9b60..9b63a7ad6 100644 --- a/doc/flow_doc/generated/html_full/node_8cpp.html +++ b/doc/flow_doc/generated/html_full/node_8cpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_full/node_8cpp_source.html b/doc/flow_doc/generated/html_full/node_8cpp_source.html index 29752d433..87d8fb368 100644 --- a/doc/flow_doc/generated/html_full/node_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/node_8cpp_source.html @@ -1247,7 +1247,7 @@
                                                                                                                                  An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
                                                                                                                                  Definition: node.hpp:937
                                                                                                                                  void handle_data_to_established(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet, bool syn_rcvd_qd_packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  void perform_accumulated_on_recv_tasks()
                                                                                                                                  Performs all tasks to be performed at the end of low_lvl_recv_and_handle() or async part of async_wai...
                                                                                                                                  Definition: node.cpp:375
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  Node_options options() const
                                                                                                                                  Copies this Node's option set and returns that copy.
                                                                                                                                  Definition: node.cpp:1107
                                                                                                                                  void handle_incoming(util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Handles a just-received, not-yet-deserialized low-level packet.
                                                                                                                                  Definition: node.cpp:426
                                                                                                                                  ~Node() override
                                                                                                                                  Destroys Node.
                                                                                                                                  Definition: node.cpp:139
                                                                                                                                  @@ -1258,16 +1258,16 @@
                                                                                                                                  void handle_syn_ack_ack_to_syn_rcvd(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_ack_packet > syn_ack_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN_ACK_ACK packet delivered to the given p...
                                                                                                                                  static const Fine_duration S_REGULAR_INFREQUENT_TASKS_PERIOD
                                                                                                                                  Time interval between performing "infrequent periodic tasks," such as stat logging.
                                                                                                                                  Definition: node.hpp:3693
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Obtain a copy of the value of a given option in a thread-safe manner.
                                                                                                                                  Definition: node.hpp:4180
                                                                                                                                  -
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  +
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  Definition: node.hpp:3707
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  size_t max_block_size() const
                                                                                                                                  The maximum number of bytes of user data per received or sent block on connections generated from thi...
                                                                                                                                  Definition: node.cpp:1112
                                                                                                                                  const util::Udp_endpoint & local_low_lvl_endpoint() const
                                                                                                                                  Return the UDP endpoint (IP address and UDP port) which will be used for receiving incoming and sendi...
                                                                                                                                  Definition: node.cpp:369
                                                                                                                                  void worker_run(const util::Udp_endpoint low_lvl_endpoint)
                                                                                                                                  Worker thread W (main event loop) body.
                                                                                                                                  Definition: node.cpp:151
                                                                                                                                  boost::unique_future< Error_code > m_event_loop_ready_result
                                                                                                                                  The future object through which the non-W thread waits for m_event_loop_ready to be set to success/fa...
                                                                                                                                  Definition: node.hpp:3883
                                                                                                                                  void event_set_close_worker(Event_set::Ptr event_set)
                                                                                                                                  The guts of event_set_close_worker_check_state(): same thing, but assumes Event_set::state() == Event...
                                                                                                                                  Definition: event_set.cpp:1332
                                                                                                                                  void async_no_sock_low_lvl_rst_send(Low_lvl_packet::Const_ptr causing_packet, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Sends an RST to the given UDP endpoint in response to the given incoming low-level packet that came f...
                                                                                                                                  Definition: low_lvl_io.cpp:586
                                                                                                                                  -
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  +
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  static const size_t & S_NUM_EPHEMERAL_PORTS
                                                                                                                                  Total number of Flow "ephemeral" ports (ones reserved locally at random with Node::listen(S_PORT_ANY)...
                                                                                                                                  Definition: node.hpp:951
                                                                                                                                  boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_pending_acks
                                                                                                                                  Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() (...
                                                                                                                                  Definition: node.hpp:3849
                                                                                                                                  boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_acks
                                                                                                                                  Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() c...
                                                                                                                                  Definition: node.hpp:3867
                                                                                                                                  @@ -1279,7 +1279,7 @@
                                                                                                                                  static const flow_port_t & S_FIRST_SERVICE_PORT
                                                                                                                                  The port number of the lowest service port, making the range of service ports [S_FIRST_SERVICE_PORT,...
                                                                                                                                  Definition: node.hpp:957
                                                                                                                                  Peer_socket::Options_lock Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  Definition: node.hpp:1439
                                                                                                                                  friend bool operator==(const Socket_id &lhs, const Socket_id &rhs)
                                                                                                                                  Definition: node.cpp:1157
                                                                                                                                  -
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  +
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  Udp_socket m_low_lvl_sock
                                                                                                                                  The UDP socket used to receive low-level packets (to assemble into application layer data) and send t...
                                                                                                                                  Definition: node.hpp:3753
                                                                                                                                  void handle_syn_ack_to_syn_sent(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN_ACK packet delivered to the given peer ...
                                                                                                                                  static const size_t & S_NUM_SERVICE_PORTS
                                                                                                                                  Total number of Flow "service" ports (ones that can be reserved by number with Node::listen()).
                                                                                                                                  Definition: node.hpp:945
                                                                                                                                  @@ -1290,7 +1290,7 @@
                                                                                                                                  bool running() const
                                                                                                                                  Returns true if and only if the Node is operating.
                                                                                                                                  Definition: node.cpp:420
                                                                                                                                  Port_to_server_map m_servs
                                                                                                                                  The server sockets this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3798
                                                                                                                                  const Node_options & validate_options(const Node_options &opts, bool init, Error_code *err_code) const
                                                                                                                                  Given a new set of Node_options intended to replace (or initialize) a Node's m_opts,...
                                                                                                                                  Definition: node.cpp:980
                                                                                                                                  -
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  +
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  void handle_syn_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, duplicate (equal to already-received SYN_ACK) low-le...
                                                                                                                                  Signal_set m_signal_set
                                                                                                                                  Signal set which we may or may not be using to trap SIGINT and SIGTERM in order to auto-fire interrup...
                                                                                                                                  Definition: node.hpp:3890
                                                                                                                                  void handle_data_to_syn_rcvd(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  @@ -1298,14 +1298,14 @@
                                                                                                                                  void async_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
                                                                                                                                  Sends an RST to the other side of the given socket asynchronously when possible.
                                                                                                                                  Node_options m_opts
                                                                                                                                  This Node's global set of options.
                                                                                                                                  Definition: node.hpp:3704
                                                                                                                                  void async_low_lvl_recv()
                                                                                                                                  Registers so that during the current or next m_task_engine.run(), the latter will wait for a receivab...
                                                                                                                                  Definition: low_lvl_io.cpp:31
                                                                                                                                  -
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  +
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  void close_empty_server_immediately(const flow_port_t local_port, Server_socket::Ptr serv, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Handles the transition of the given server socket from S_LISTENING/S_CLOSING to S_CLOSED (including e...
                                                                                                                                  Event_sets m_event_sets
                                                                                                                                  Every Event_set to have been returned by event_set_create() and not subsequently reached Event_set::S...
                                                                                                                                  Definition: node.hpp:3804
                                                                                                                                  void interrupt_all_waits_internal_sig_handler(const Error_code &sys_err_code, int sig_number)
                                                                                                                                  signal_set handler, executed on SIGINT and SIGTERM, if user has enabled this feature: causes interrup...
                                                                                                                                  Definition: event_set.cpp:1456
                                                                                                                                  void perform_regular_infrequent_tasks(bool reschedule)
                                                                                                                                  Performs low-priority tasks that should be run on an infrequent, regular basis, such as stat logging ...
                                                                                                                                  Definition: node.cpp:1117
                                                                                                                                  util::Udp_endpoint m_low_lvl_endpoint
                                                                                                                                  After we bind m_low_lvl_sock to a UDP endpoint, this is a copy of that endpoint.
                                                                                                                                  Definition: node.hpp:3764
                                                                                                                                  util::Task_engine m_task_engine
                                                                                                                                  The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
                                                                                                                                  Definition: node.hpp:3739
                                                                                                                                  -
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  +
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  @ S_ESTABLISHED
                                                                                                                                  Public state is OPEN+CONNECTED; in our opinion the connection is established.
                                                                                                                                  @ S_SYN_SENT
                                                                                                                                  Public state is OPEN+CONNECTING; user requested active connect; we sent SYN and are awaiting response...
                                                                                                                                  @ S_CLOSED
                                                                                                                                  Closed (dead or new) socket.
                                                                                                                                  @@ -1336,17 +1336,17 @@
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  const flow_port_t S_PORT_ANY
                                                                                                                                  Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
                                                                                                                                  Definition: port_space.cpp:33
                                                                                                                                  Scheduled_task_handle schedule_task_from_now(log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
                                                                                                                                  Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asi...
                                                                                                                                  Definition: sched_task.hpp:34
                                                                                                                                  -
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:342
                                                                                                                                  +
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  boost::asio::ip::udp::endpoint Udp_endpoint
                                                                                                                                  Short-hand for the UDP endpoint (IP/port) type.
                                                                                                                                  Definition: util_fwd.hpp:208
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level DATA packet.
                                                                                                                                  static Ptr create_from_raw_data_packet(log::Logger *logger_ptr, util::Blob *raw_packet, bool prefer_no_move)
                                                                                                                                  Constructs packet on the heap with values determined by the given raw binary data as presumably recei...
                                                                                                                                  The data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in th...
                                                                                                                                  Definition: node.hpp:3904
                                                                                                                                  const Remote_endpoint m_remote_endpoint
                                                                                                                                  The other side of the connection.
                                                                                                                                  Definition: node.hpp:3908
                                                                                                                                  @@ -1360,15 +1360,15 @@
                                                                                                                                  bool m_dyn_guarantee_one_low_lvl_in_buf_per_socket
                                                                                                                                  This very inside-baseball setting controls the allocation/copy behavior of the UDP receive-deserializ...
                                                                                                                                  Definition: options.hpp:568
                                                                                                                                  bool m_st_capture_interrupt_signals_internally
                                                                                                                                  If and only if this is true, the Node will detect SIGINT and SIGTERM (or your OS's version thereof); ...
                                                                                                                                  Definition: options.hpp:517
                                                                                                                                  size_t m_st_max_block_size
                                                                                                                                  The size of block that we will strive to (and will, assuming at least that many bytes are available i...
                                                                                                                                  Definition: options.hpp:114
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  -
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level RST packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK_ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN_ACK packet.
                                                                                                                                  +
                                                                                                                                  Internal net_flow struct that encapsulates the Flow-protocol low-level SYN packet.
                                                                                                                                  #define FLOW_UTIL_WHERE_AM_I_STR()
                                                                                                                                  Same as FLOW_UTIL_WHERE_AM_I() but evaluates to an std::string.
                                                                                                                                  Definition: util_fwd.hpp:971
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/node_8hpp.html b/doc/flow_doc/generated/html_full/node_8hpp.html index 3003e601f..93409f25f 100644 --- a/doc/flow_doc/generated/html_full/node_8hpp.html +++ b/doc/flow_doc/generated/html_full/node_8hpp.html @@ -117,7 +117,7 @@ diff --git a/doc/flow_doc/generated/html_full/node_8hpp_source.html b/doc/flow_doc/generated/html_full/node_8hpp_source.html index 42a631e4b..3ac7105fb 100644 --- a/doc/flow_doc/generated/html_full/node_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/node_8hpp_source.html @@ -4274,7 +4274,7 @@
                                                                                                                                  4202}
                                                                                                                                  4203
                                                                                                                                  4204} // namespace flow::net_flow
                                                                                                                                  - +
                                                                                                                                  Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
                                                                                                                                  Definition: log.hpp:1619
                                                                                                                                  Logger * get_logger() const
                                                                                                                                  Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:225
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  @@ -4282,15 +4282,15 @@
                                                                                                                                  Event_type
                                                                                                                                  Type of event or condition of interest supported by class Event_set.
                                                                                                                                  Definition: event_set.hpp:307
                                                                                                                                  Objects of this class can be fed to Node to make it internally simulate network conditions like loss,...
                                                                                                                                  An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
                                                                                                                                  Definition: node.hpp:937
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_updated(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_const_iter pkt_begin, const Peer_socket::Sent_pkt_ordered_by_when_const_iter &pkt_end, bool added)
                                                                                                                                  Updates Peer_socket::m_snd_flying_bytes according to an operation (add packets, remove packets) calle...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_updated(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_const_iter pkt_begin, const Peer_socket::Sent_pkt_ordered_by_when_const_iter &pkt_end, bool added)
                                                                                                                                  Updates Peer_socket::m_snd_flying_bytes according to an operation (add packets, remove packets) calle...
                                                                                                                                  void low_lvl_packet_sent(Peer_socket::Ptr sock, Low_lvl_packet::Const_ptr packet, size_t bytes_expected_transferred, const Error_code &sys_err_code, size_t bytes_transferred)
                                                                                                                                  Completion handler for async_low_lvl_packet_send_impl(); called when the packet is either successfull...
                                                                                                                                  Definition: low_lvl_io.cpp:497
                                                                                                                                  void serv_peer_socket_init(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records a new (just received SYN) peer socket from the given server socket.
                                                                                                                                  -
                                                                                                                                  bool categorize_individual_ack(const Socket_id &socket_id, Peer_socket::Ptr sock, Ack_packet::Individual_ack::Const_ptr ack, bool *dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter *acked_pkt_it)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that categorizes the given accumulated individual ackno...
                                                                                                                                  +
                                                                                                                                  bool categorize_individual_ack(const Socket_id &socket_id, Peer_socket::Ptr sock, Ack_packet::Individual_ack::Const_ptr ack, bool *dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter *acked_pkt_it)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that categorizes the given accumulated individual ackno...
                                                                                                                                  void handle_data_to_established(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet, bool syn_rcvd_qd_packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  -
                                                                                                                                  bool sock_is_writable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->send() with at least some arguments would return either non...
                                                                                                                                  -
                                                                                                                                  Peer_socket_info sock_info(Peer_socket::Const_ptr sock)
                                                                                                                                  Implementation of sock->info() for socket sock in all cases except when sock->state() == Peer_socket:...
                                                                                                                                  +
                                                                                                                                  bool sock_is_writable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->send() with at least some arguments would return either non...
                                                                                                                                  +
                                                                                                                                  Peer_socket_info sock_info(Peer_socket::Const_ptr sock)
                                                                                                                                  Implementation of sock->info() for socket sock in all cases except when sock->state() == Peer_socket:...
                                                                                                                                  void async_no_sock_low_lvl_packet_send(const util::Udp_endpoint &low_lvl_remote_endpoint, Low_lvl_packet::Const_ptr packet)
                                                                                                                                  async_low_lvl_packet_send_impl() wrapper to call when packet is to be sent to the remote side of the ...
                                                                                                                                  Definition: low_lvl_io.cpp:313
                                                                                                                                  -
                                                                                                                                  void receive_wnd_updated(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W if it has dequeued data from Receive buffer and given it to the user,...
                                                                                                                                  +
                                                                                                                                  void receive_wnd_updated(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W if it has dequeued data from Receive buffer and given it to the user,...
                                                                                                                                  virtual Server_socket * serv_create(const Peer_socket_options *child_sock_opts)
                                                                                                                                  Internal factory used for ALL Server_socket objects created by this Node (including subclasses).
                                                                                                                                  void serv_set_state(Server_socket::Ptr serv, Server_socket::State state)
                                                                                                                                  Sets Server_socket::m_state.
                                                                                                                                  void async_sock_low_lvl_packet_send(Peer_socket::Ptr sock, Low_lvl_packet::Const_ptr &&packet, bool delayed_by_pacing)
                                                                                                                                  async_low_lvl_packet_send_impl() wrapper to call when packet is to be sent to the remote side of the ...
                                                                                                                                  Definition: low_lvl_io.cpp:307
                                                                                                                                  @@ -4298,21 +4298,21 @@
                                                                                                                                  bool sock_data_to_reassembly_q_unless_overflow(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Helper for handle_data_to_established() that aims to register the given DATA packet as an out-of-orde...
                                                                                                                                  void perform_accumulated_on_recv_tasks()
                                                                                                                                  Performs all tasks to be performed at the end of low_lvl_recv_and_handle() or async part of async_wai...
                                                                                                                                  Definition: node.cpp:375
                                                                                                                                  static bool ensure_sock_open(Socket_ptr sock, Error_code *err_code)
                                                                                                                                  Helper method that checks whether the given Peer_socket or Server_socket is CLOSED; if so,...
                                                                                                                                  Definition: node.hpp:4141
                                                                                                                                  -
                                                                                                                                  void send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  Thread W implemention of send(): synchronously or asynchronously send the contents of sock->m_snd_buf...
                                                                                                                                  +
                                                                                                                                  void send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  Thread W implemention of send(): synchronously or asynchronously send the contents of sock->m_snd_buf...
                                                                                                                                  void interrupt_all_waits(Error_code *err_code=0)
                                                                                                                                  Interrupts any blocking operation, a/k/a wait, and informs the invoker of that operation that the blo...
                                                                                                                                  Definition: event_set.cpp:1392
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  Node_options options() const
                                                                                                                                  Copies this Node's option set and returns that copy.
                                                                                                                                  Definition: node.cpp:1107
                                                                                                                                  void handle_incoming(util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Handles a just-received, not-yet-deserialized low-level packet.
                                                                                                                                  Definition: node.cpp:426
                                                                                                                                  ~Node() override
                                                                                                                                  Destroys Node.
                                                                                                                                  Definition: node.cpp:139
                                                                                                                                  -
                                                                                                                                  void async_rcv_wnd_recovery(Peer_socket::Ptr sock, size_t rcv_wnd)
                                                                                                                                  receive_wnd_updated() helper that continues rcv_wnd recovery: that is, sends unsolicited ACK with a r...
                                                                                                                                  -
                                                                                                                                  void log_accumulated_acks(Peer_socket::Const_ptr sock) const
                                                                                                                                  Helper of handle_accumulated_acks() that logs the about-to-be-handled accumulated individual acknowle...
                                                                                                                                  +
                                                                                                                                  void async_rcv_wnd_recovery(Peer_socket::Ptr sock, size_t rcv_wnd)
                                                                                                                                  receive_wnd_updated() helper that continues rcv_wnd recovery: that is, sends unsolicited ACK with a r...
                                                                                                                                  +
                                                                                                                                  void log_accumulated_acks(Peer_socket::Const_ptr sock) const
                                                                                                                                  Helper of handle_accumulated_acks() that logs the about-to-be-handled accumulated individual acknowle...
                                                                                                                                  boost::asio::signal_set Signal_set
                                                                                                                                  Short-hand for a signal set.
                                                                                                                                  Definition: node.hpp:1433
                                                                                                                                  -
                                                                                                                                  void sock_free_memory(Peer_socket::Ptr sock)
                                                                                                                                  Helper that clears all non-O(1)-space data structures stored inside sock.
                                                                                                                                  +
                                                                                                                                  void sock_free_memory(Peer_socket::Ptr sock)
                                                                                                                                  Helper that clears all non-O(1)-space data structures stored inside sock.
                                                                                                                                  static const size_t & S_NUM_PORTS
                                                                                                                                  Total number of Flow ports in the port space, including S_PORT_ANY.
                                                                                                                                  Definition: node.hpp:942
                                                                                                                                  bool event_set_check_baseline(Event_set::Ptr event_set)
                                                                                                                                  Checks each desired (Event_set::m_want) event in event_set; any that holds true is saved into event_s...
                                                                                                                                  Definition: event_set.cpp:1017
                                                                                                                                  -
                                                                                                                                  void sock_load_info_struct(Peer_socket::Const_ptr sock, Peer_socket_info *stats) const
                                                                                                                                  Given a Peer_socket, copies all stats info (as available via Peer_socket::info()) from various struct...
                                                                                                                                  -
                                                                                                                                  void log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages thats show the detailed state of the sending sequence number space.
                                                                                                                                  -
                                                                                                                                  void send_worker_check_state(Peer_socket::Ptr sock)
                                                                                                                                  Helper placed by send() onto W to invoke send_worker() but ensures that the socket has not entered so...
                                                                                                                                  +
                                                                                                                                  void sock_load_info_struct(Peer_socket::Const_ptr sock, Peer_socket_info *stats) const
                                                                                                                                  Given a Peer_socket, copies all stats info (as available via Peer_socket::info()) from various struct...
                                                                                                                                  +
                                                                                                                                  void log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages thats show the detailed state of the sending sequence number space.
                                                                                                                                  +
                                                                                                                                  void send_worker_check_state(Peer_socket::Ptr sock)
                                                                                                                                  Helper placed by send() onto W to invoke send_worker() but ensures that the socket has not entered so...
                                                                                                                                  size_t m_low_lvl_max_buf_size
                                                                                                                                  OS-reported m_low_lvl_sock UDP receive buffer maximum size, obtained right after we OS-set that setti...
                                                                                                                                  Definition: node.hpp:3771
                                                                                                                                  bool set_options(const Node_options &opts, Error_code *err_code=0)
                                                                                                                                  Dynamically replaces the current options set (options()) with the given options set.
                                                                                                                                  Definition: node.cpp:1054
                                                                                                                                  void sync_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
                                                                                                                                  Sends an RST to the other side of the given socket, synchronously.
                                                                                                                                  @@ -4323,63 +4323,63 @@
                                                                                                                                  static const Fine_duration S_REGULAR_INFREQUENT_TASKS_PERIOD
                                                                                                                                  Time interval between performing "infrequent periodic tasks," such as stat logging.
                                                                                                                                  Definition: node.hpp:3693
                                                                                                                                  size_t sock_max_packets_after_unrecvd_packet(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the max size for Peer_socket::m_rcv_packets_with_gaps for sock.
                                                                                                                                  bool async_sock_low_lvl_packet_send_paced(const Peer_socket::Ptr &sock, Low_lvl_packet::Ptr &&packet, Error_code *err_code)
                                                                                                                                  Begins the process of asynchronously sending the given low-level packet to the remote Node specified ...
                                                                                                                                  Definition: low_lvl_io.cpp:605
                                                                                                                                  -
                                                                                                                                  Peer_socket::Sent_pkt_ordered_by_when_iter categorize_pkts_as_dropped_on_acks(Peer_socket::Ptr sock, const boost::unordered_set< Peer_socket::order_num_t > &flying_now_acked_pkts)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that determines the range of In-flight packets that sho...
                                                                                                                                  +
                                                                                                                                  Peer_socket::Sent_pkt_ordered_by_when_iter categorize_pkts_as_dropped_on_acks(Peer_socket::Ptr sock, const boost::unordered_set< Peer_socket::order_num_t > &flying_now_acked_pkts)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that determines the range of In-flight packets that sho...
                                                                                                                                  void rcv_get_first_gap_info(Peer_socket::Const_ptr sock, bool *first_gap_exists, Sequence_number *seq_num_after_first_gap)
                                                                                                                                  Helper for handle_data_to_established() that gets simple info about Peer_socket::m_rcv_packets_with_g...
                                                                                                                                  -
                                                                                                                                  bool snd_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data either in Peer_socket::m_snd_rexmit_q of sock (if re...
                                                                                                                                  +
                                                                                                                                  bool snd_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data either in Peer_socket::m_snd_rexmit_q of sock (if re...
                                                                                                                                  Fine_time_pt m_last_loss_sock_log_when
                                                                                                                                  For debugging, when we detect loss of data we'd sent, we log the corresponding socket's state; this i...
                                                                                                                                  Definition: node.hpp:3874
                                                                                                                                  Server_socket::Ptr listen(flow_port_t local_port, Error_code *err_code=0, const Peer_socket_options *child_sock_opts=0)
                                                                                                                                  Sets up a server on the given local Flow port and returns Server_socket which can be used to accept s...
                                                                                                                                  -
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  +
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  void sock_pacing_time_slice_end(Peer_socket::Ptr sock, const Error_code &sys_err_code)
                                                                                                                                  async_sock_low_lvl_packet_send_paced() pacing helper: If sock_pacing_process_q() ran out of the last ...
                                                                                                                                  Definition: low_lvl_io.cpp:969
                                                                                                                                  void sock_rcv_buf_now_readable(Peer_socket::Ptr sock, bool syn_rcvd_qd_packet)
                                                                                                                                  Helper for handle_data_to_established() that assumes the given's socket Receive buffer is currently r...
                                                                                                                                  boost::shared_ptr< Net_env_simulator > m_net_env_sim
                                                                                                                                  The object used to simulate stuff like packet loss and latency via local means directly in the code.
                                                                                                                                  Definition: node.hpp:3713
                                                                                                                                  void async_wait_latency_then_handle_incoming(const Fine_duration &latency, util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Sets up handle_incoming(packet_data, low_lvl_remote_endpoint) to be called asynchronously after a spe...
                                                                                                                                  Definition: low_lvl_io.cpp:255
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_erase_one(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_iter pkt_it)
                                                                                                                                  Erases (for example if considered Acknowledged or Dropped) a packet struct from the "scoreboard" (Pee...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_erase_one(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_iter pkt_it)
                                                                                                                                  Erases (for example if considered Acknowledged or Dropped) a packet struct from the "scoreboard" (Pee...
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Obtain a copy of the value of a given option in a thread-safe manner.
                                                                                                                                  Definition: node.hpp:4180
                                                                                                                                  -
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  +
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  Definition: node.hpp:3707
                                                                                                                                  boost::shared_ptr< util::Timer > Timer_ptr
                                                                                                                                  boost.asio timer wrapped in a ref-counted pointer.
                                                                                                                                  Definition: node.hpp:1430
                                                                                                                                  void event_set_close(Event_set::Ptr event_set, Error_code *err_code)
                                                                                                                                  Implementation of Event_set::close() when Event_set::state() != Event_set::State::S_CLOSED for event_...
                                                                                                                                  Definition: event_set.cpp:1273
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  -
                                                                                                                                  void receive_wnd_recovery_data_received(Peer_socket::Ptr sock)
                                                                                                                                  Pertaining to the async_rcv_wnd_recovery() mechanism, this handles the event that we have received an...
                                                                                                                                  -
                                                                                                                                  static Peer_socket::order_num_t sock_get_new_snd_order_num(Peer_socket::Ptr sock)
                                                                                                                                  Returns the "order number" to use for Peer_socket::Sent_packet::Sent_when structure corresponding to ...
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  +
                                                                                                                                  void receive_wnd_recovery_data_received(Peer_socket::Ptr sock)
                                                                                                                                  Pertaining to the async_rcv_wnd_recovery() mechanism, this handles the event that we have received an...
                                                                                                                                  +
                                                                                                                                  static Peer_socket::order_num_t sock_get_new_snd_order_num(Peer_socket::Ptr sock)
                                                                                                                                  Returns the "order number" to use for Peer_socket::Sent_packet::Sent_when structure corresponding to ...
                                                                                                                                  Peer_socket::Options_mutex Options_mutex
                                                                                                                                  Short-hand for high-performance, non-reentrant, exclusive mutex used to lock m_opts.
                                                                                                                                  Definition: node.hpp:1436
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr sync_connect_impl(const Remote_endpoint &to, const Fine_duration &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code, const Peer_socket_options *opts)
                                                                                                                                  Implementation core of sync_connect*() that gets rid of templated or missing arguments thereof.
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr sync_connect_impl(const Remote_endpoint &to, const Fine_duration &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code, const Peer_socket_options *opts)
                                                                                                                                  Implementation core of sync_connect*() that gets rid of templated or missing arguments thereof.
                                                                                                                                  void event_set_check_baseline_assuming_state(Event_set::Ptr event_set)
                                                                                                                                  Helper placed by event_set_async_wait() onto thread W to invoke event_set_check_baseline() but first ...
                                                                                                                                  Definition: event_set.cpp:989
                                                                                                                                  size_t max_block_size() const
                                                                                                                                  The maximum number of bytes of user data per received or sent block on connections generated from thi...
                                                                                                                                  Definition: node.cpp:1112
                                                                                                                                  const util::Udp_endpoint & local_low_lvl_endpoint() const
                                                                                                                                  Return the UDP endpoint (IP address and UDP port) which will be used for receiving incoming and sendi...
                                                                                                                                  Definition: node.cpp:369
                                                                                                                                  boost::asio::ip::udp::socket Udp_socket
                                                                                                                                  Short-hand for UDP socket.
                                                                                                                                  Definition: node.hpp:1427
                                                                                                                                  bool serv_is_acceptable(const boost::any &serv_as_any) const
                                                                                                                                  Returns true if and only if calling serv->accept() with at least some arguments would return either n...
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_push_one(Peer_socket::Ptr sock, const Sequence_number &seq_num, Peer_socket::Sent_packet::Ptr sent_pkt)
                                                                                                                                  Adds a new packet struct (presumably representing packet to be sent shortly) to the "scoreboard" (Pee...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_push_one(Peer_socket::Ptr sock, const Sequence_number &seq_num, Peer_socket::Sent_packet::Ptr sent_pkt)
                                                                                                                                  Adds a new packet struct (presumably representing packet to be sent shortly) to the "scoreboard" (Pee...
                                                                                                                                  void worker_run(const util::Udp_endpoint low_lvl_endpoint)
                                                                                                                                  Worker thread W (main event loop) body.
                                                                                                                                  Definition: node.cpp:151
                                                                                                                                  -
                                                                                                                                  Syn_packet::Ptr create_syn(Peer_socket::Const_ptr sock)
                                                                                                                                  Helper that creates a new SYN packet object to the extent that is suitable for immediately passing to...
                                                                                                                                  +
                                                                                                                                  Syn_packet::Ptr create_syn(Peer_socket::Const_ptr sock)
                                                                                                                                  Helper that creates a new SYN packet object to the extent that is suitable for immediately passing to...
                                                                                                                                  boost::unique_future< Error_code > m_event_loop_ready_result
                                                                                                                                  The future object through which the non-W thread waits for m_event_loop_ready to be set to success/fa...
                                                                                                                                  Definition: node.hpp:3883
                                                                                                                                  bool sock_pacing_new_packet_ready(Peer_socket::Ptr sock, Low_lvl_packet::Ptr packet, Error_code *err_code)
                                                                                                                                  async_sock_low_lvl_packet_send_paced() pacing helper: Handles a DATA or ACK packet that was just pass...
                                                                                                                                  Definition: low_lvl_io.cpp:649
                                                                                                                                  -
                                                                                                                                  void close_abruptly(Peer_socket::Ptr sock, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->close_abruptly() for socket sock in all cases except when sock->...
                                                                                                                                  -
                                                                                                                                  static void get_seq_num_range(const Packet_map_iter &packet_it, Sequence_number *seq_num_start, Sequence_number *seq_num_end)
                                                                                                                                  Given an iterator into a Peer_socket::Sent_pkt_by_sent_when_map or Peer_socket::Recv_pkt_map,...
                                                                                                                                  +
                                                                                                                                  void close_abruptly(Peer_socket::Ptr sock, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->close_abruptly() for socket sock in all cases except when sock->...
                                                                                                                                  +
                                                                                                                                  static void get_seq_num_range(const Packet_map_iter &packet_it, Sequence_number *seq_num_start, Sequence_number *seq_num_end)
                                                                                                                                  Given an iterator into a Peer_socket::Sent_pkt_by_sent_when_map or Peer_socket::Recv_pkt_map,...
                                                                                                                                  Peer_socket::Ptr sync_connect_with_metadata(const Remote_endpoint &to, const boost::chrono::duration< Rep, Period > &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  A combination of sync_connect() and connect_with_metadata() (blocking connect, with supplied metadata...
                                                                                                                                  Definition: node.hpp:3956
                                                                                                                                  void event_set_close_worker(Event_set::Ptr event_set)
                                                                                                                                  The guts of event_set_close_worker_check_state(): same thing, but assumes Event_set::state() == Event...
                                                                                                                                  Definition: event_set.cpp:1332
                                                                                                                                  -
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  -
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  -
                                                                                                                                  bool snd_buf_enqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there is enough free space in Peer_socket::m_snd_buf of sock to enqueue an...
                                                                                                                                  -
                                                                                                                                  bool can_send(Peer_socket::Const_ptr sock) const
                                                                                                                                  Answers the perennial question of congestion and flow control: assuming there is a DATA packet to sen...
                                                                                                                                  +
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  +
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  +
                                                                                                                                  bool snd_buf_enqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there is enough free space in Peer_socket::m_snd_buf of sock to enqueue an...
                                                                                                                                  +
                                                                                                                                  bool can_send(Peer_socket::Const_ptr sock) const
                                                                                                                                  Answers the perennial question of congestion and flow control: assuming there is a DATA packet to sen...
                                                                                                                                  void async_no_sock_low_lvl_rst_send(Low_lvl_packet::Const_ptr causing_packet, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Sends an RST to the given UDP endpoint in response to the given incoming low-level packet that came f...
                                                                                                                                  Definition: low_lvl_io.cpp:586
                                                                                                                                  void sock_slide_rcv_next_seq_num(Peer_socket::Ptr sock, size_t slide_size, bool reassembly_in_progress)
                                                                                                                                  Helper for handle_data_to_established() that aims to register a set of received DATA packet data as i...
                                                                                                                                  -
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  +
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  boost::unordered_map< flow_port_t, Server_socket::Ptr > Port_to_server_map
                                                                                                                                  A map from the local Flow port to the local Server_socket listening on that port.
                                                                                                                                  Definition: node.hpp:1453
                                                                                                                                  static const size_t & S_NUM_EPHEMERAL_PORTS
                                                                                                                                  Total number of Flow "ephemeral" ports (ones reserved locally at random with Node::listen(S_PORT_ANY)...
                                                                                                                                  Definition: node.hpp:951
                                                                                                                                  boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_pending_acks
                                                                                                                                  Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() (...
                                                                                                                                  Definition: node.hpp:3849
                                                                                                                                  boost::unordered_set< Peer_socket::Ptr > m_socks_with_accumulated_acks
                                                                                                                                  Within a given low_lvl_recv_and_handle() or async part of async_wait_latency_then_handle_incoming() c...
                                                                                                                                  Definition: node.hpp:3867
                                                                                                                                  friend size_t hash_value(const Socket_id &socket_id)
                                                                                                                                  Definition: node.cpp:1162
                                                                                                                                  -
                                                                                                                                  static void advance_seq_num(Sequence_number *seq_num, boost::shared_ptr< const Data_packet > data)
                                                                                                                                  Assuming *seq_num points to the start of data.m_data, increments *seq_num to point to the datum just ...
                                                                                                                                  -
                                                                                                                                  void async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code &sys_err_code=Error_code())
                                                                                                                                  Sends a low-level ACK packet, with all accumulated in Peer_socket::m_rcv_pending_acks of sock individ...
                                                                                                                                  -
                                                                                                                                  static Sequence_number snd_past_last_flying_datum_seq_num(Peer_socket::Const_ptr sock)
                                                                                                                                  Obtain the sequence number for the datum just past the last (latest) In-flight (i....
                                                                                                                                  +
                                                                                                                                  static void advance_seq_num(Sequence_number *seq_num, boost::shared_ptr< const Data_packet > data)
                                                                                                                                  Assuming *seq_num points to the start of data.m_data, increments *seq_num to point to the datum just ...
                                                                                                                                  +
                                                                                                                                  void async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code &sys_err_code=Error_code())
                                                                                                                                  Sends a low-level ACK packet, with all accumulated in Peer_socket::m_rcv_pending_acks of sock individ...
                                                                                                                                  +
                                                                                                                                  static Sequence_number snd_past_last_flying_datum_seq_num(Peer_socket::Const_ptr sock)
                                                                                                                                  Obtain the sequence number for the datum just past the last (latest) In-flight (i....
                                                                                                                                  util::Thread m_worker
                                                                                                                                  Worker thread (= thread W). Other members should be initialized before this to avoid race condition.
                                                                                                                                  Definition: node.hpp:3893
                                                                                                                                  Sequence_number::Generator m_seq_num_generator
                                                                                                                                  Sequence number generator (at least to generate ISNs). Only thread W can access this.
                                                                                                                                  Definition: node.hpp:3780
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr connect(const Remote_endpoint &to, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Initiates an active connect to the specified remote Flow server.
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr connect(const Remote_endpoint &to, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Initiates an active connect to the specified remote Flow server.
                                                                                                                                  void event_set_all_check_delta(bool defer_delta_check)
                                                                                                                                  For each WAITING Event_set within the Node: checks for any events that hold, and if any do hold,...
                                                                                                                                  Definition: event_set.cpp:1129
                                                                                                                                  void serv_peer_socket_closed(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records that a Server_socket-contained (i.e., currently un-established, or established but not yet ac...
                                                                                                                                  bool validate_static_option(const Opt_type &new_val, const Opt_type &old_val, const std::string &opt_id, Error_code *err_code) const
                                                                                                                                  Helper that compares new_val to old_val and, if they are not equal, logs and returns an error; used t...
                                                                                                                                  Definition: node.hpp:4161
                                                                                                                                  -
                                                                                                                                  bool rcv_buf_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data in Peer_socket::m_rcv_buf of sock to give the user s...
                                                                                                                                  +
                                                                                                                                  bool rcv_buf_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data in Peer_socket::m_rcv_buf of sock to give the user s...
                                                                                                                                  void async_acknowledge_packet(Peer_socket::Ptr sock, const Sequence_number &seq_num, unsigned int rexmit_id, size_t data_size)
                                                                                                                                  Causes an acknowledgment of the given received packet to be included in a future Ack_packet sent to t...
                                                                                                                                  Socket_id_to_socket_map m_socks
                                                                                                                                  The peer-to-peer connections this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3792
                                                                                                                                  unsigned int handle_incoming_with_simulation(util::Blob *packet_data, const util::Udp_endpoint &low_lvl_remote_endpoint, bool is_sim_duplicate_packet=false)
                                                                                                                                  Helper for low_lvl_recv_and_handle() that calls handle_incoming() on the not-yet-deserialized low-lev...
                                                                                                                                  Definition: low_lvl_io.cpp:187
                                                                                                                                  @@ -4388,23 +4388,23 @@
                                                                                                                                  Peer_socket::Options_lock Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  Definition: node.hpp:1439
                                                                                                                                  void low_lvl_recv_and_handle(Error_code sys_err_code)
                                                                                                                                  Handles the pre-condition that m_low_lvl_sock has a UDP packet available for reading,...
                                                                                                                                  Definition: low_lvl_io.cpp:46
                                                                                                                                  friend bool operator==(const Socket_id &lhs, const Socket_id &rhs)
                                                                                                                                  Definition: node.cpp:1157
                                                                                                                                  -
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  +
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  Udp_socket m_low_lvl_sock
                                                                                                                                  The UDP socket used to receive low-level packets (to assemble into application layer data) and send t...
                                                                                                                                  Definition: node.hpp:3753
                                                                                                                                  void async_low_lvl_packet_send_impl(const util::Udp_endpoint &low_lvl_remote_endpoint, Low_lvl_packet::Const_ptr packet, bool delayed_by_pacing, Peer_socket::Ptr sock)
                                                                                                                                  Takes given low-level packet structure, serializes it, and initiates asynchronous send of these data ...
                                                                                                                                  Definition: low_lvl_io.cpp:321
                                                                                                                                  void handle_syn_ack_to_syn_sent(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN_ACK packet delivered to the given peer ...
                                                                                                                                  bool event_set_async_wait(Event_set::Ptr event_set, const Event_set::Event_handler &on_event, Error_code *err_code)
                                                                                                                                  Implementation of Event_set::async_wait() when Event_set::state() == Event_set::State::S_INACTIVE.
                                                                                                                                  Definition: event_set.cpp:917
                                                                                                                                  -
                                                                                                                                  size_t send(Peer_socket::Ptr sock, const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->send() for socket sock in all cases except when sock->state() ==...
                                                                                                                                  +
                                                                                                                                  size_t send(Peer_socket::Ptr sock, const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->send() for socket sock in all cases except when sock->state() ==...
                                                                                                                                  static const size_t & S_NUM_SERVICE_PORTS
                                                                                                                                  Total number of Flow "service" ports (ones that can be reserved by number with Node::listen()).
                                                                                                                                  Definition: node.hpp:945
                                                                                                                                  static const flow_port_t & S_FIRST_EPHEMERAL_PORT
                                                                                                                                  The port number of the lowest ephemeral Flow port, making the range of ephemeral ports [S_FIRST_EPHEM...
                                                                                                                                  Definition: node.hpp:963
                                                                                                                                  -
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  +
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  Peer_socket * sock_create_forward_plus_ctor_args(const Peer_socket_options &opts)
                                                                                                                                  Returns a raw pointer to newly created Peer_socket or sub-instance like asio::Peer_socket,...
                                                                                                                                  Definition: node.hpp:4193
                                                                                                                                  boost::promise< Error_code > m_event_loop_ready
                                                                                                                                  Promise that thread W sets to truthy Error_code if it fails to initialize or falsy once event loop is...
                                                                                                                                  Definition: node.hpp:3880
                                                                                                                                  -
                                                                                                                                  bool sock_is_readable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->receive() with at least some arguments would return either ...
                                                                                                                                  +
                                                                                                                                  bool sock_is_readable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->receive() with at least some arguments would return either ...
                                                                                                                                  bool async_sock_low_lvl_packet_send_or_close_immediately(const Peer_socket::Ptr &sock, Low_lvl_packet::Ptr &&packet, bool defer_delta_check)
                                                                                                                                  Similar to async_sock_low_lvl_packet_send_paced() except it also calls close_connection_immediately(s...
                                                                                                                                  log::Logger * this_thread_init_logger_setup(const std::string &thread_type, log::Logger *logger=0)
                                                                                                                                  Helper to invoke for each thread in which this Node executes, whether or not it starts that thread,...
                                                                                                                                  Definition: node.cpp:113
                                                                                                                                  Peer_socket::Ptr handle_syn_to_listening_server(Server_socket::Ptr serv, boost::shared_ptr< const Syn_packet > syn, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN packet delivered to the given server so...
                                                                                                                                  bool sock_data_to_rcv_buf_unless_overflow(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Helper for handle_data_to_established() that aims to pass the payload of the given DATA packet to the...
                                                                                                                                  -
                                                                                                                                  bool sock_set_options(Peer_socket::Ptr sock, const Peer_socket_options &opts, Error_code *err_code)
                                                                                                                                  Thread W implementation of sock->set_options().
                                                                                                                                  +
                                                                                                                                  bool sock_set_options(Peer_socket::Ptr sock, const Peer_socket_options &opts, Error_code *err_code)
                                                                                                                                  Thread W implementation of sock->set_options().
                                                                                                                                  bool running() const
                                                                                                                                  Returns true if and only if the Node is operating.
                                                                                                                                  Definition: node.cpp:420
                                                                                                                                  Port_to_server_map m_servs
                                                                                                                                  The server sockets this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3798
                                                                                                                                  bool sock_pacing_process_q(Peer_socket::Ptr sock, Error_code *err_code, bool executing_after_delay)
                                                                                                                                  async_sock_low_lvl_packet_send_paced() pacing helper: Given that we are currently in the pacing time ...
                                                                                                                                  Definition: low_lvl_io.cpp:849
                                                                                                                                  @@ -4412,8 +4412,8 @@
                                                                                                                                  static const uint8_t S_DEFAULT_CONN_METADATA
                                                                                                                                  Type and value to supply as user-supplied metadata in SYN, if user chooses to use [[a]sync_]connect()...
                                                                                                                                  Definition: node.hpp:1403
                                                                                                                                  const Node_options & validate_options(const Node_options &opts, bool init, Error_code *err_code) const
                                                                                                                                  Given a new set of Node_options intended to replace (or initialize) a Node's m_opts,...
                                                                                                                                  Definition: node.cpp:980
                                                                                                                                  Server_socket * serv_create_forward_plus_ctor_args(const Peer_socket_options *child_sock_opts)
                                                                                                                                  Like sock_create_forward_plus_ctor_args() but for Server_sockets.
                                                                                                                                  Definition: node.hpp:4199
                                                                                                                                  -
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  -
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  +
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  +
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  Peer_socket::Ptr sync_connect(const Remote_endpoint &to, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  The blocking (synchronous) version of connect().
                                                                                                                                  Definition: node.hpp:3967
                                                                                                                                  void listen_worker(flow_port_t local_port, const Peer_socket_options *child_sock_opts, Server_socket::Ptr *serv)
                                                                                                                                  Thread W implementation of listen().
                                                                                                                                  void handle_syn_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, duplicate (equal to already-received SYN_ACK) low-le...
                                                                                                                                  @@ -4421,56 +4421,56 @@
                                                                                                                                  void serv_peer_socket_acceptable(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records that an unestablished socket sock (Peer_socket::Int_state::S_SYN_RCVD) has just become establ...
                                                                                                                                  void handle_data_to_syn_rcvd(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  boost::unordered_map< Socket_id, Peer_socket::Ptr > Socket_id_to_socket_map
                                                                                                                                  A map from the connection ID (= remote-local socket pair) to the local Peer_socket that is the local ...
                                                                                                                                  Definition: node.hpp:1450
                                                                                                                                  -
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  -
                                                                                                                                  void log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages that show the detailed state of the receiving sequence number space.
                                                                                                                                  -
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  +
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  +
                                                                                                                                  void log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages that show the detailed state of the receiving sequence number space.
                                                                                                                                  +
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  Peer_socket::Ptr accept(Server_socket::Ptr serv, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking serv->accept() for server socket serv in all cases except when serv->s...
                                                                                                                                  -
                                                                                                                                  void connect_worker(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, const Peer_socket_options *opts, Peer_socket::Ptr *sock)
                                                                                                                                  Thread W implementation of connect().
                                                                                                                                  -
                                                                                                                                  bool drop_pkts_on_acks(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &last_dropped_pkt_it, size_t *cong_ctl_dropped_pkts, size_t *cong_ctl_dropped_bytes, size_t *dropped_pkts, size_t *dropped_bytes, std::vector< Peer_socket::order_num_t > *pkts_marked_to_drop)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that acts on the determination made by categorize_pkts_...
                                                                                                                                  +
                                                                                                                                  void connect_worker(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, const Peer_socket_options *opts, Peer_socket::Ptr *sock)
                                                                                                                                  Thread W implementation of connect().
                                                                                                                                  +
                                                                                                                                  bool drop_pkts_on_acks(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &last_dropped_pkt_it, size_t *cong_ctl_dropped_pkts, size_t *cong_ctl_dropped_bytes, size_t *dropped_pkts, size_t *dropped_bytes, std::vector< Peer_socket::order_num_t > *pkts_marked_to_drop)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that acts on the determination made by categorize_pkts_...
                                                                                                                                  static const Peer_socket::Sent_packet::ack_count_t S_MAX_LATER_ACKS_BEFORE_CONSIDERING_DROPPED
                                                                                                                                  For a given unacknowledged sent packet P, the maximum number of times any individual packet with high...
                                                                                                                                  Definition: node.hpp:3686
                                                                                                                                  -
                                                                                                                                  bool async_low_lvl_syn_ack_ack_send_or_close_immediately(const Peer_socket::Ptr &sock, boost::shared_ptr< const Syn_ack_packet > &syn_ack)
                                                                                                                                  Helper to create, fully fill out, and asynchronously send via async_sock_low_lvl_packet_send_or_close...
                                                                                                                                  +
                                                                                                                                  bool async_low_lvl_syn_ack_ack_send_or_close_immediately(const Peer_socket::Ptr &sock, boost::shared_ptr< const Syn_ack_packet > &syn_ack)
                                                                                                                                  Helper to create, fully fill out, and asynchronously send via async_sock_low_lvl_packet_send_or_close...
                                                                                                                                  Node(log::Logger *logger, const util::Udp_endpoint &low_lvl_endpoint, Net_env_simulator *net_env_sim=0, Error_code *err_code=0, const Node_options &opts=Node_options())
                                                                                                                                  Constructs Node.
                                                                                                                                  Definition: node.cpp:40
                                                                                                                                  util::Blob m_packet_data
                                                                                                                                  Stores incoming raw packet data; re-used repeatedly for possible performance gains.
                                                                                                                                  Definition: node.hpp:3774
                                                                                                                                  Error_code sock_categorize_data_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Data_packet > packet, bool *dupe, bool *slide, size_t *slide_size)
                                                                                                                                  Helper for handle_data_to_established() that categorizes the DATA packet received as either illegal; ...
                                                                                                                                  void async_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
                                                                                                                                  Sends an RST to the other side of the given socket asynchronously when possible.
                                                                                                                                  Event_set::Ptr event_set_create(Error_code *err_code=0)
                                                                                                                                  Creates a new Event_set in Event_set::State::S_INACTIVE state with no sockets/events stored; returns ...
                                                                                                                                  Definition: event_set.cpp:881
                                                                                                                                  void interrupt_all_waits_worker()
                                                                                                                                  Thread W implementation of interrupt_all_waits().
                                                                                                                                  Definition: event_set.cpp:1421
                                                                                                                                  -
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  -
                                                                                                                                  void receive_emptied_rcv_buf_while_disconnecting(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W during a graceful close, after the Receive buffer had been emptied by the ...
                                                                                                                                  -
                                                                                                                                  void sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code &disconnect_cause, bool close)
                                                                                                                                  Records that thread W shows underlying connection is broken (graceful termination,...
                                                                                                                                  -
                                                                                                                                  size_t receive(Peer_socket::Ptr sock, const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->receive() for socket sock in all cases except when sock->state()...
                                                                                                                                  -
                                                                                                                                  void handle_connection_rexmit_timer_event(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Handles the triggering of the retransmit timer wait set up by setup_connection_timers(); it will re-s...
                                                                                                                                  +
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  +
                                                                                                                                  void receive_emptied_rcv_buf_while_disconnecting(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W during a graceful close, after the Receive buffer had been emptied by the ...
                                                                                                                                  +
                                                                                                                                  void sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code &disconnect_cause, bool close)
                                                                                                                                  Records that thread W shows underlying connection is broken (graceful termination,...
                                                                                                                                  +
                                                                                                                                  size_t receive(Peer_socket::Ptr sock, const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->receive() for socket sock in all cases except when sock->state()...
                                                                                                                                  +
                                                                                                                                  void handle_connection_rexmit_timer_event(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Handles the triggering of the retransmit timer wait set up by setup_connection_timers(); it will re-s...
                                                                                                                                  Node_options m_opts
                                                                                                                                  This Node's global set of options.
                                                                                                                                  Definition: node.hpp:3704
                                                                                                                                  void async_low_lvl_recv()
                                                                                                                                  Registers so that during the current or next m_task_engine.run(), the latter will wait for a receivab...
                                                                                                                                  Definition: low_lvl_io.cpp:31
                                                                                                                                  -
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  -
                                                                                                                                  void sock_disconnect_completed(Peer_socket::Ptr sock)
                                                                                                                                  While in S_OPEN+S_DISCONNECTING state (i.e., after beginning a graceful close with sock_disconnect_de...
                                                                                                                                  -
                                                                                                                                  Fine_duration compute_rtt_on_ack(Peer_socket::Sent_packet::Const_ptr flying_pkt, const Fine_time_pt &time_now, Ack_packet::Individual_ack::Const_ptr ack, const Peer_socket::Sent_packet::Sent_when **sent_when) const
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that computes the RTT implied by a given individual ack...
                                                                                                                                  +
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  +
                                                                                                                                  void sock_disconnect_completed(Peer_socket::Ptr sock)
                                                                                                                                  While in S_OPEN+S_DISCONNECTING state (i.e., after beginning a graceful close with sock_disconnect_de...
                                                                                                                                  +
                                                                                                                                  Fine_duration compute_rtt_on_ack(Peer_socket::Sent_packet::Const_ptr flying_pkt, const Fine_time_pt &time_now, Ack_packet::Individual_ack::Const_ptr ack, const Peer_socket::Sent_packet::Sent_when **sent_when) const
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that computes the RTT implied by a given individual ack...
                                                                                                                                  void close_empty_server_immediately(const flow_port_t local_port, Server_socket::Ptr serv, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Handles the transition of the given server socket from S_LISTENING/S_CLOSING to S_CLOSED (including e...
                                                                                                                                  Event_sets m_event_sets
                                                                                                                                  Every Event_set to have been returned by event_set_create() and not subsequently reached Event_set::S...
                                                                                                                                  Definition: node.hpp:3804
                                                                                                                                  util::Rnd_gen_uniform_range< Peer_socket::security_token_t > m_rnd_security_tokens
                                                                                                                                  Random number generator for picking security tokens; seeded on time at Node construction and generate...
                                                                                                                                  Definition: node.hpp:3786
                                                                                                                                  void interrupt_all_waits_internal_sig_handler(const Error_code &sys_err_code, int sig_number)
                                                                                                                                  signal_set handler, executed on SIGINT and SIGTERM, if user has enabled this feature: causes interrup...
                                                                                                                                  Definition: event_set.cpp:1456
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
                                                                                                                                  -
                                                                                                                                  void new_round_trip_time_sample(Peer_socket::Ptr sock, Fine_duration round_trip_time)
                                                                                                                                  Handles a just-computed new RTT (round trip time) measurement for an individual packet earlier sent: ...
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
                                                                                                                                  +
                                                                                                                                  void new_round_trip_time_sample(Peer_socket::Ptr sock, Fine_duration round_trip_time)
                                                                                                                                  Handles a just-computed new RTT (round trip time) measurement for an individual packet earlier sent: ...
                                                                                                                                  void perform_regular_infrequent_tasks(bool reschedule)
                                                                                                                                  Performs low-priority tasks that should be run on an infrequent, regular basis, such as stat logging ...
                                                                                                                                  Definition: node.cpp:1117
                                                                                                                                  util::Udp_endpoint m_low_lvl_endpoint
                                                                                                                                  After we bind m_low_lvl_sock to a UDP endpoint, this is a copy of that endpoint.
                                                                                                                                  Definition: node.hpp:3764
                                                                                                                                  -
                                                                                                                                  bool ok_to_rexmit_or_close(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &pkt_it, bool defer_delta_check)
                                                                                                                                  Checks whether the given sent packet has been retransmitted the maximum number of allowed times; if s...
                                                                                                                                  +
                                                                                                                                  bool ok_to_rexmit_or_close(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &pkt_it, bool defer_delta_check)
                                                                                                                                  Checks whether the given sent packet has been retransmitted the maximum number of allowed times; if s...
                                                                                                                                  util::Task_engine m_task_engine
                                                                                                                                  The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
                                                                                                                                  Definition: node.hpp:3739
                                                                                                                                  void sock_pacing_new_time_slice(Peer_socket::Ptr sock, const Fine_time_pt &now)
                                                                                                                                  async_sock_low_lvl_packet_send_paced() pacing helper: Resets the socket's Send_pacing_data structure ...
                                                                                                                                  Definition: low_lvl_io.cpp:765
                                                                                                                                  Port_space m_ports
                                                                                                                                  Flow port space for both client and server sockets. All threads may access this.
                                                                                                                                  Definition: node.hpp:3777
                                                                                                                                  void event_set_fire_if_got_events(Event_set::Ptr event_set)
                                                                                                                                  Check whether given Event_set contains any active sockets (Event_set::m_can); if so,...
                                                                                                                                  Definition: event_set.cpp:1084
                                                                                                                                  -
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  +
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  boost::unordered_set< Event_set::Ptr > Event_sets
                                                                                                                                  A set of Event_set objects.
                                                                                                                                  Definition: node.hpp:1456
                                                                                                                                  -
                                                                                                                                  void drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  Handles a Drop_timer (Peer_socket::m_snd_drop_timer) event in ESTABLISHED state by dropping the speci...
                                                                                                                                  -
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  -
                                                                                                                                  util::Mutex_non_recursive Options_mutex
                                                                                                                                  Short-hand for high-performance, non-reentrant, exclusive mutex used to lock m_opts.
                                                                                                                                  -
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  -
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  +
                                                                                                                                  void drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  Handles a Drop_timer (Peer_socket::m_snd_drop_timer) event in ESTABLISHED state by dropping the speci...
                                                                                                                                  +
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  +
                                                                                                                                  util::Mutex_non_recursive Options_mutex
                                                                                                                                  Short-hand for high-performance, non-reentrant, exclusive mutex used to lock m_opts.
                                                                                                                                  +
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  +
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  @ S_CONNECTED
                                                                                                                                  This Peer_socket was created through a passive connect (Node::accept() and the like) or an active con...
                                                                                                                                  -
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  -
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  +
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  +
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  Internal net_flow class that maintains the available Flow-protocol port space, somewhat similarly to ...
                                                                                                                                  Definition: port_space.hpp:94
                                                                                                                                  An object of this type generates a series of initial sequence numbers (ISN) that are meant to be suff...
                                                                                                                                  Definition: seq_num.hpp:373
                                                                                                                                  An internal net_flow sequence number identifying a piece of data.
                                                                                                                                  Definition: seq_num.hpp:126
                                                                                                                                  @@ -4497,7 +4497,7 @@
                                                                                                                                  size_t hash_value(const Sequence_number &seq_num)
                                                                                                                                  Free function that returns seq_num.hash(); has to be a free function named hash_value for boost....
                                                                                                                                  Definition: seq_num.cpp:275
                                                                                                                                  bool operator==(const Remote_endpoint &lhs, const Remote_endpoint &rhs)
                                                                                                                                  Whether lhs is equal to rhs.
                                                                                                                                  Definition: endpoint.cpp:60
                                                                                                                                  const flow_port_t S_PORT_ANY
                                                                                                                                  Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
                                                                                                                                  Definition: port_space.cpp:33
                                                                                                                                  -
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:282
                                                                                                                                  +
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:307
                                                                                                                                  boost::unique_lock< Mutex > Lock_guard
                                                                                                                                  Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
                                                                                                                                  Definition: util_fwd.hpp:265
                                                                                                                                  Fine_duration chrono_duration_to_fine_duration(const boost::chrono::duration< Rep, Period > &dur)
                                                                                                                                  Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
                                                                                                                                  Definition: util.hpp:31
                                                                                                                                  boost::shared_ptr< void > Auto_cleanup
                                                                                                                                  Helper type for setup_auto_cleanup().
                                                                                                                                  Definition: util_fwd.hpp:205
                                                                                                                                  @@ -4505,25 +4505,25 @@
                                                                                                                                  boost::thread Thread
                                                                                                                                  Short-hand for standard thread class.
                                                                                                                                  Definition: util_fwd.hpp:78
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  boost::asio::ip::udp::endpoint Udp_endpoint
                                                                                                                                  Short-hand for the UDP endpoint (IP/port) type.
                                                                                                                                  Definition: util_fwd.hpp:208
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  -
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:386
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  +
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:391
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  The data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in th...
                                                                                                                                  Definition: node.hpp:3904
                                                                                                                                  const Remote_endpoint m_remote_endpoint
                                                                                                                                  The other side of the connection.
                                                                                                                                  Definition: node.hpp:3908
                                                                                                                                  size_t hash() const
                                                                                                                                  Hash value of this Socket_id for unordered<>.
                                                                                                                                  Definition: node.cpp:1147
                                                                                                                                  const flow_port_t m_local_port
                                                                                                                                  This side of the connection (within this Node).
                                                                                                                                  Definition: node.hpp:3910
                                                                                                                                  A set of low-level options affecting a single Flow Node, including Peer_socket objects and other obje...
                                                                                                                                  Definition: options.hpp:449
                                                                                                                                  static std::string opt_id_to_str(const std::string &opt_id)
                                                                                                                                  Helper that, for a given option m_blah, takes something like "m_blah_blah" and returns the similar mo...
                                                                                                                                  Definition: options.cpp:160
                                                                                                                                  -
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  -
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  +
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  +
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  A data store that keeps stats about the a Peer_socket connection.
                                                                                                                                  Definition: info.hpp:456
                                                                                                                                  A set of low-level options affecting a single Peer_socket.
                                                                                                                                  Definition: options.hpp:36
                                                                                                                                  Represents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remo...
                                                                                                                                  Definition: endpoint.hpp:93
                                                                                                                                  @@ -4531,7 +4531,7 @@ diff --git a/doc/flow_doc/generated/html_full/op_8cpp.html b/doc/flow_doc/generated/html_full/op_8cpp.html index 2b3415652..03ab5c53c 100644 --- a/doc/flow_doc/generated/html_full/op_8cpp.html +++ b/doc/flow_doc/generated/html_full/op_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/op_8cpp_source.html b/doc/flow_doc/generated/html_full/op_8cpp_source.html index dfca2e644..a5955fe36 100644 --- a/doc/flow_doc/generated/html_full/op_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/op_8cpp_source.html @@ -145,7 +145,7 @@
                                                                                                                                  73}
                                                                                                                                  74
                                                                                                                                  75} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  const Op & random_op(size_t *chosen_idx=0) const
                                                                                                                                  Returns (*this)[R], where we randomly select R as if by random_idx() and communicate it to the caller...
                                                                                                                                  Definition: op.cpp:51
                                                                                                                                  Op_list(log::Logger *logger_ptr, size_t n_ops, const Create_op_func &create_op_func)
                                                                                                                                  Populates the async::Op list, which is immutable after this returns.
                                                                                                                                  Definition: op.cpp:26
                                                                                                                                  util::Rnd_gen_uniform_range_mt< size_t > m_rnd_op_idx
                                                                                                                                  Random number facility for generating random indices in [0, m_ops.size()).
                                                                                                                                  Definition: op.hpp:148
                                                                                                                                  @@ -160,12 +160,12 @@
                                                                                                                                  Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...
                                                                                                                                  Definition: async_fwd.hpp:75
                                                                                                                                  boost::any Op
                                                                                                                                  An object of this opaque type represents a collection of 1 or more async::Task, past or future,...
                                                                                                                                  Definition: async_fwd.hpp:153
                                                                                                                                  @ S_ASYNC
                                                                                                                                  Simply post the given task to execute asynchronously in some execution context – as soon as the conte...
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/op_8hpp.html b/doc/flow_doc/generated/html_full/op_8hpp.html index fb4e1cd6a..35e3fa1f5 100644 --- a/doc/flow_doc/generated/html_full/op_8hpp.html +++ b/doc/flow_doc/generated/html_full/op_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/op_8hpp_source.html b/doc/flow_doc/generated/html_full/op_8hpp_source.html index c55693138..f64d624ac 100644 --- a/doc/flow_doc/generated/html_full/op_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/op_8hpp_source.html @@ -222,7 +222,7 @@
                                                                                                                                  150
                                                                                                                                  151} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...
                                                                                                                                  Definition: op.hpp:58
                                                                                                                                  const Op & random_op(size_t *chosen_idx=0) const
                                                                                                                                  Returns (*this)[R], where we randomly select R as if by random_idx() and communicate it to the caller...
                                                                                                                                  Definition: op.cpp:51
                                                                                                                                  Op_list(log::Logger *logger_ptr, size_t n_ops, const Create_op_func &create_op_func)
                                                                                                                                  Populates the async::Op list, which is immutable after this returns.
                                                                                                                                  Definition: op.cpp:26
                                                                                                                                  @@ -242,7 +242,7 @@ diff --git a/doc/flow_doc/generated/html_full/option__set_8cpp.html b/doc/flow_doc/generated/html_full/option__set_8cpp.html index e8d5d774f..c94e40843 100644 --- a/doc/flow_doc/generated/html_full/option__set_8cpp.html +++ b/doc/flow_doc/generated/html_full/option__set_8cpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/option__set_8cpp_source.html b/doc/flow_doc/generated/html_full/option__set_8cpp_source.html index d98bfb66f..4fd423e56 100644 --- a/doc/flow_doc/generated/html_full/option__set_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/option__set_8cpp_source.html @@ -222,13 +222,13 @@
                                                                                                                                  Flow module that facilitates configuring modules, such as applications and APIs, via statically and/o...
                                                                                                                                  Definition: cfg_fwd.hpp:112
                                                                                                                                  std::string value_set_member_id_to_opt_name(util::String_view member_id)
                                                                                                                                  Utility, used by FLOW_CFG_OPTION_SET_DECLARE_OPTION() internally but made available as a public API i...
                                                                                                                                  Definition: option_set.cpp:38
                                                                                                                                  const boost::regex VALUE_SET_MEMBER_ID_TO_OPT_NAME_KEYED_REGEX
                                                                                                                                  An internal constant for value_set_member_id_to_opt_name_keyed().
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/option__set_8hpp.html b/doc/flow_doc/generated/html_full/option__set_8hpp.html index cc025d155..8a3396298 100644 --- a/doc/flow_doc/generated/html_full/option__set_8hpp.html +++ b/doc/flow_doc/generated/html_full/option__set_8hpp.html @@ -562,7 +562,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/option__set_8hpp_source.html b/doc/flow_doc/generated/html_full/option__set_8hpp_source.html index e8b07787d..359d65786 100644 --- a/doc/flow_doc/generated/html_full/option__set_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/option__set_8hpp_source.html @@ -2348,7 +2348,7 @@
                                                                                                                                  2276
                                                                                                                                  2277} // namespace flow::cfg
                                                                                                                                  - +
                                                                                                                                  Un-templated base for Option_set.
                                                                                                                                  Definition: option_set.hpp:34
                                                                                                                                  static void declare_option_for_output(util::String_view name, opts::options_description *target_opts, const Value &value_default, const Value &current_value, util::String_view description)
                                                                                                                                  Internal-through-macro helper function; the user shall not call this directly but only through FLOW_C...
                                                                                                                                  static Function< void(const Value &val)> throw_on_invalid_func(util::String_view name, Function< bool(const Value &val)> &&validator_func_moved, util::String_view validator_cond_str)
                                                                                                                                  Returns a function that wraps a Value->Boolean validator function, as passed to declare_option_for_pa...
                                                                                                                                  @@ -2415,11 +2415,11 @@
                                                                                                                                  Sev
                                                                                                                                  Enumeration containing one of several message severity levels, ordered from highest to lowest.
                                                                                                                                  Definition: log_fwd.hpp:224
                                                                                                                                  @ S_TRACE
                                                                                                                                  Message indicates any condition that may occur with great frequency (thus verbose if logged).
                                                                                                                                  @ S_INFO
                                                                                                                                  Message indicates a not-"bad" condition that is not frequent enough to be of severity Sev::S_TRACE.
                                                                                                                                  -
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:276
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:301
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  Internal-use structure to use with Declare_options_func callback.
                                                                                                                                  Definition: option_set.hpp:456
                                                                                                                                  Option_set * m_option_set
                                                                                                                                  m_option_set->m_opts_for_parsing shall be filled out.
                                                                                                                                  Definition: option_set.hpp:480
                                                                                                                                  const Values * m_values_current
                                                                                                                                  The current values loaded into *m_target_opts (e.g., via description text) will originate here.
                                                                                                                                  Definition: option_set.hpp:514
                                                                                                                                  @@ -2440,7 +2440,7 @@ diff --git a/doc/flow_doc/generated/html_full/options_8cpp.html b/doc/flow_doc/generated/html_full/options_8cpp.html index 4dce11fd5..9e6a3bed3 100644 --- a/doc/flow_doc/generated/html_full/options_8cpp.html +++ b/doc/flow_doc/generated/html_full/options_8cpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_full/options_8cpp_source.html b/doc/flow_doc/generated/html_full/options_8cpp_source.html index 60d39025a..78647af16 100644 --- a/doc/flow_doc/generated/html_full/options_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/options_8cpp_source.html @@ -621,7 +621,7 @@ diff --git a/doc/flow_doc/generated/html_full/options_8hpp.html b/doc/flow_doc/generated/html_full/options_8hpp.html index 29d9c15d4..b43e704ab 100644 --- a/doc/flow_doc/generated/html_full/options_8hpp.html +++ b/doc/flow_doc/generated/html_full/options_8hpp.html @@ -109,7 +109,7 @@ diff --git a/doc/flow_doc/generated/html_full/options_8hpp_source.html b/doc/flow_doc/generated/html_full/options_8hpp_source.html index 3af7e699f..59f2f9317 100644 --- a/doc/flow_doc/generated/html_full/options_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/options_8hpp_source.html @@ -802,7 +802,7 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  std::istream & operator>>(std::istream &is, Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Deserializes a Peer_socket_options::Congestion_control_strategy_choice enum from a standard input str...
                                                                                                                                  Definition: cong_ctl.cpp:124
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  A set of low-level options affecting a single Flow Node, including Peer_socket objects and other obje...
                                                                                                                                  Definition: options.hpp:449
                                                                                                                                  static void setup_config_parsing_helper(Options_description *opts_desc, Node_options *target, const Node_options &defaults_source, bool printout_only)
                                                                                                                                  Loads the full set of boost.program_options config options into the given Options_description,...
                                                                                                                                  Definition: options.cpp:80
                                                                                                                                  @@ -860,7 +860,7 @@ diff --git a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp.html b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp.html index a4b88b0c1..4a866268a 100644 --- a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp.html +++ b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp_source.html b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp_source.html index 8ae9727d2..89525c67e 100644 --- a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8cpp_source.html @@ -307,7 +307,7 @@ diff --git a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp.html b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp.html index 24f7272b2..128227ddd 100644 --- a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp.html +++ b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp_source.html b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp_source.html index dc3b2ea82..6a0ac5f66 100644 --- a/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/ostream__log__msg__writer_8hpp_source.html @@ -310,7 +310,7 @@
                                                                                                                                  238}; // class Ostream_log_msg_writer
                                                                                                                                  239
                                                                                                                                  240} // namespace flow::log
                                                                                                                                  - +
                                                                                                                                  Class used to configure the filtering and logging behavior of Loggers; its use in your custom Loggers...
                                                                                                                                  Definition: config.hpp:200
                                                                                                                                  Utility class, each object of which wraps a given ostream and outputs discrete messages to it adorned...
                                                                                                                                  const Function< void(Ostream_log_msg_writer *, const Msg_metadata &, util::String_view)> m_do_log_func
                                                                                                                                  Pointer to function that log() will forward to when invoked.
                                                                                                                                  @@ -339,7 +339,7 @@ diff --git a/doc/flow_doc/generated/html_full/pages.html b/doc/flow_doc/generated/html_full/pages.html index 4d0265249..1a443d325 100644 --- a/doc/flow_doc/generated/html_full/pages.html +++ b/doc/flow_doc/generated/html_full/pages.html @@ -74,7 +74,7 @@ diff --git a/doc/flow_doc/generated/html_full/peer__socket_8cpp.html b/doc/flow_doc/generated/html_full/peer__socket_8cpp.html index 668f10921..7b7641d93 100644 --- a/doc/flow_doc/generated/html_full/peer__socket_8cpp.html +++ b/doc/flow_doc/generated/html_full/peer__socket_8cpp.html @@ -106,7 +106,7 @@ diff --git a/doc/flow_doc/generated/html_full/peer__socket_8cpp_source.html b/doc/flow_doc/generated/html_full/peer__socket_8cpp_source.html index 538fb252c..18277db0d 100644 --- a/doc/flow_doc/generated/html_full/peer__socket_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/peer__socket_8cpp_source.html @@ -1663,4960 +1663,4966 @@
                                                                                                                                  1591
                                                                                                                                  1592 const size_t acks_pending_before_this = sock->m_rcv_pending_acks.size();
                                                                                                                                  1593
                                                                                                                                  -
                                                                                                                                  1594 /* Just the starting sequence number sufficient to identify a single packet. The time point saved
                                                                                                                                  -
                                                                                                                                  1595 * here is subtracted from time_now() at ACK send time, to compute the artificial delay introduced
                                                                                                                                  -
                                                                                                                                  1596 * by ACK delaying (explained just below). This helps other side calculate a more accurate RTT by
                                                                                                                                  -
                                                                                                                                  1597 * substracting the ACK delay from its RTT measurement. */
                                                                                                                                  -
                                                                                                                                  1598 sock->m_rcv_pending_acks.push_back
                                                                                                                                  - -
                                                                                                                                  1600 (new Peer_socket::Individual_ack{ seq_num, rexmit_id, Fine_clock::now(), data_size }));
                                                                                                                                  -
                                                                                                                                  1601
                                                                                                                                  -
                                                                                                                                  1602 /* m_rcv_pending_acks now stores at least one packet to acknowledge. We can acknowledge it
                                                                                                                                  -
                                                                                                                                  1603 * immediately (modulo UDP layer availability of course). However, suppose there is a fast stream
                                                                                                                                  -
                                                                                                                                  1604 * of packets coming in, such that several DATA packets were read in within one
                                                                                                                                  -
                                                                                                                                  1605 * low_lvl_recv_and_handle() call. Then each DATA packet will result in one ACK packet.
                                                                                                                                  -
                                                                                                                                  1606 * This introduces a ton of overhead, as the header is quite large given that the payload is just
                                                                                                                                  -
                                                                                                                                  1607 * a Sequence_number. Instead we would want to pack all the DATA packets' acknowledgments into
                                                                                                                                  -
                                                                                                                                  1608 * one ACK packet (unless it overflows, in which case create more ACK packets as needed). So we
                                                                                                                                  -
                                                                                                                                  1609 * only accumulate the individual acknowledgments here; we will possibly send the actual ACK(s) in
                                                                                                                                  -
                                                                                                                                  1610 * perform_accumulated_on_recv_tasks(), which runs at the end of low_lvl_recv_and_handle() (or its
                                                                                                                                  -
                                                                                                                                  1611 * bro, the async part of async_wait_latency_then_handle_incoming()).
                                                                                                                                  -
                                                                                                                                  1612 *
                                                                                                                                  -
                                                                                                                                  1613 * Caveat: The above is rock-solid if the different DATA packets being acked were contiguous to
                                                                                                                                  -
                                                                                                                                  1614 * each other chronologically. What if there is another type of packet between some two of these
                                                                                                                                  -
                                                                                                                                  1615 * DATAs? Well, it depends on what it is. Ignoring the misbehaving/duplicate/whatever packets
                                                                                                                                  -
                                                                                                                                  1616 * (SYN, for example) -- which will just be discarded basically -- let's consider the
                                                                                                                                  -
                                                                                                                                  1617 * possibilities. If the packet is ACK, then it is irrelevant; NetFlow (like TCP) is full-duplex
                                                                                                                                  -
                                                                                                                                  1618 * (actually more so, since there's no DATA+ACK piggy-backing), therefore the micro-ordering of
                                                                                                                                  -
                                                                                                                                  1619 * traffic in opposite directions is irrelevant. If the packet is RST, then that means the socket
                                                                                                                                  -
                                                                                                                                  1620 * will get closed (no longer ESTABLISHED) before we get a chance to send any of the individual
                                                                                                                                  -
                                                                                                                                  1621 * acknowledgments. However, that is more or less OK; if the other side sent RST, then they won't
                                                                                                                                  -
                                                                                                                                  1622 * accept any ACKs we may send them anyway. The only other possibility has to with graceful close,
                                                                                                                                  -
                                                                                                                                  1623 * but that is not yet implemented.
                                                                                                                                  -
                                                                                                                                  1624 * @todo Revisit this when graceful close is implemented. (Preliminary idea: force immediate ACK
                                                                                                                                  -
                                                                                                                                  1625 * handling when FIN/etc. detected? Or something.) */
                                                                                                                                  -
                                                                                                                                  1626
                                                                                                                                  -
                                                                                                                                  1627 if (m_socks_with_accumulated_pending_acks.insert(sock).second)
                                                                                                                                  -
                                                                                                                                  1628 {
                                                                                                                                  -
                                                                                                                                  1629 /* First acknowledgment to be accumulated in this handler (low_lvl_recv_and_handle() or
                                                                                                                                  -
                                                                                                                                  1630 * async part of async_wait_latency_then_handle_incoming()). So mark down whether at that time there were
                                                                                                                                  -
                                                                                                                                  1631 * already timer-delayed acknowledgments pending (and how many). See
                                                                                                                                  -
                                                                                                                                  1632 * sock_perform_accumulated_on_recv_tasks() for details on delayed ACKs. */
                                                                                                                                  -
                                                                                                                                  1633 sock->m_rcv_pending_acks_size_at_recv_handler_start = acks_pending_before_this;
                                                                                                                                  -
                                                                                                                                  1634 }
                                                                                                                                  -
                                                                                                                                  1635 // else already had registered pending acknowledgment in this handler.
                                                                                                                                  -
                                                                                                                                  1636} // Node::async_acknowledge_packet()
                                                                                                                                  -
                                                                                                                                  1637
                                                                                                                                  - -
                                                                                                                                  1639{
                                                                                                                                  -
                                                                                                                                  1640 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  1641 using boost::chrono::microseconds;
                                                                                                                                  -
                                                                                                                                  1642 using boost::chrono::duration_cast;
                                                                                                                                  -
                                                                                                                                  1643 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  1644 using std::vector;
                                                                                                                                  -
                                                                                                                                  1645
                                                                                                                                  -
                                                                                                                                  1646 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  1647
                                                                                                                                  -
                                                                                                                                  1648 // For background see Node::perform_accumulated_on_recv_tasks().
                                                                                                                                  -
                                                                                                                                  1649
                                                                                                                                  -
                                                                                                                                  1650 // For brevity and speed:
                                                                                                                                  -
                                                                                                                                  1651 vector<Peer_socket::Individual_ack::Ptr>& pending_acks = sock->m_rcv_pending_acks;
                                                                                                                                  -
                                                                                                                                  1652
                                                                                                                                  -
                                                                                                                                  1653 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  -
                                                                                                                                  1654 {
                                                                                                                                  -
                                                                                                                                  1655 // For example, we got DATA and then RST on the same socket almost simultaneously.
                                                                                                                                  -
                                                                                                                                  1656 FLOW_LOG_TRACE("Was about to perform accumulated acknowledgment tasks on [" << sock << "] but skipping because "
                                                                                                                                  -
                                                                                                                                  1657 "state is now [" << sock->m_int_state << "].");
                                                                                                                                  -
                                                                                                                                  1658 return;
                                                                                                                                  -
                                                                                                                                  1659 }
                                                                                                                                  -
                                                                                                                                  1660
                                                                                                                                  -
                                                                                                                                  1661 // Check explicit pre-condition.
                                                                                                                                  -
                                                                                                                                  1662 assert(!pending_acks.empty());
                                                                                                                                  -
                                                                                                                                  1663
                                                                                                                                  -
                                                                                                                                  1664 /* Deal with any accumulated acknowledgments. Naively, we'd simply call async_low_lvl_ack_send()
                                                                                                                                  -
                                                                                                                                  1665 * here, which would take pending_acks and bundle them up into as few as possible ACK
                                                                                                                                  -
                                                                                                                                  1666 * packets and send them off.
                                                                                                                                  -
                                                                                                                                  1667 *
                                                                                                                                  -
                                                                                                                                  1668 * However, we potentially instead use delayed ACKing as in typical TCP implementations (based on
                                                                                                                                  -
                                                                                                                                  1669 * various standard RFCs). The idea is that a few DATA packets have come in around the same time,
                                                                                                                                  -
                                                                                                                                  1670 * but not close enough to be handled in one receive handler. So upon detecting the first DATA
                                                                                                                                  -
                                                                                                                                  1671 * packet in the steady state, start a timer; until it fires accumulate more packets in
                                                                                                                                  -
                                                                                                                                  1672 * pending_acks; and when it fires finally assemble and flush (send) the ACK(s). Something else may trigger
                                                                                                                                  -
                                                                                                                                  1673 * the flushing of the ACK(s) ahead of this timer or even immediately.
                                                                                                                                  -
                                                                                                                                  1674 *
                                                                                                                                  -
                                                                                                                                  1675 * These are situations where we must short-circuit the timer and send the ACK(s)
                                                                                                                                  -
                                                                                                                                  1676 * immediately:
                                                                                                                                  -
                                                                                                                                  1677 *
                                                                                                                                  -
                                                                                                                                  1678 * 1. From TCP (RFC 5681-4.2), which says that an ACK should be generated for at
                                                                                                                                  -
                                                                                                                                  1679 * least every second full-sized (data size = MSS) incoming data segment. The reasoning is
                                                                                                                                  -
                                                                                                                                  1680 * two-fold: causing bursty sending by the receiver of the ACKs; and slowing down slow start
                                                                                                                                  -
                                                                                                                                  1681 * in Reno (and others) congestion control. The latter is not really a problem for us (since
                                                                                                                                  -
                                                                                                                                  1682 * ACKs are not cumulative but selective and handled as such by our congestion control logic);
                                                                                                                                  -
                                                                                                                                  1683 * but the former is definitely an easily demonstrable issue. @todo This paragraph is difficult
                                                                                                                                  -
                                                                                                                                  1684 * to understand right now. There might be 1 or more unintentional meaning inversions, wherein
                                                                                                                                  -
                                                                                                                                  1685 * I mean to say X is good, but instead say X is bad, or vice vera, or at least it's unclear. Research;
                                                                                                                                  -
                                                                                                                                  1686 * rephrase.
                                                                                                                                  -
                                                                                                                                  1687 *
                                                                                                                                  -
                                                                                                                                  1688 * 2. Also from TCP (RFC 5681-3.2), which says that an ACK should be
                                                                                                                                  -
                                                                                                                                  1689 * immediately generated upon detecting an out-of-order data segment. This is to inform
                                                                                                                                  -
                                                                                                                                  1690 * congestion control of any loss event as soon as possible (Fast Recovery algorithm).
                                                                                                                                  -
                                                                                                                                  1691 *
                                                                                                                                  -
                                                                                                                                  1692 * Note that TCP RFCs don't account for the implementation detail that several packets can be
                                                                                                                                  -
                                                                                                                                  1693 * received "simultaneously" (in one handler in our case), nor for selective ACKs (in this
                                                                                                                                  -
                                                                                                                                  1694 * context), so when they say we must send an ACK for every 2 incoming segments at least, we do
                                                                                                                                  -
                                                                                                                                  1695 * not take this literally. Instead, we just say that if (here, after a full receive handler has
                                                                                                                                  -
                                                                                                                                  1696 * run) there are at least 2 full blocks' worth of pending acknowledgments (there could be many
                                                                                                                                  -
                                                                                                                                  1697 * more in theory) and/or there's an out-of-order DATA packet, then we send immediate ACK(s), thus
                                                                                                                                  -
                                                                                                                                  1698 * following the spirit of the rules in the RFC. The spirit of the rule is to short-circuit the
                                                                                                                                  -
                                                                                                                                  1699 * timer the moment at least 2 full packets can be acknowledged.
                                                                                                                                  -
                                                                                                                                  1700 *
                                                                                                                                  -
                                                                                                                                  1701 * We detect both of these situations below and act accordingly. We also start the delayed ACK
                                                                                                                                  -
                                                                                                                                  1702 * timer, if necessary, otherwise. Oh, and there's a mode to disable delayed ACKs.
                                                                                                                                  -
                                                                                                                                  1703 *
                                                                                                                                  -
                                                                                                                                  1704 * @todo We may also force immediate ACKing during graceful shutdown. Revisit when graceful
                                                                                                                                  -
                                                                                                                                  1705 * shutdown is implemented.... */
                                                                                                                                  -
                                                                                                                                  1706
                                                                                                                                  -
                                                                                                                                  1707 const Fine_duration delayed_ack_timer_period = sock->opt(sock->m_opts.m_st_delayed_ack_timer_period);
                                                                                                                                  -
                                                                                                                                  1708
                                                                                                                                  -
                                                                                                                                  1709 bool force_ack = delayed_ack_timer_period == Fine_duration::zero(); // Delayed ACKs disabled.
                                                                                                                                  -
                                                                                                                                  1710
                                                                                                                                  -
                                                                                                                                  1711 if (force_ack)
                                                                                                                                  -
                                                                                                                                  1712 {
                                                                                                                                  - -
                                                                                                                                  1714 ("Delayed [ACK] feature disabled on [" << sock << "]; forcing immediate [ACK]. "
                                                                                                                                  -
                                                                                                                                  1715 "Receive window state: [" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  -
                                                                                                                                  1716 "| " << sock->m_rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  -
                                                                                                                                  1717 }
                                                                                                                                  -
                                                                                                                                  1718 else if (!sock->m_rcv_packets_with_gaps.empty())
                                                                                                                                  -
                                                                                                                                  1719 {
                                                                                                                                  -
                                                                                                                                  1720 /* Scan to see if there was an out-of-order DATA packet. That is to say, have we received a
                                                                                                                                  -
                                                                                                                                  1721 * DATA packet -- i.e., have we queued a pending acknowledgment in this receive handler -- that
                                                                                                                                  -
                                                                                                                                  1722 * follows at least one unreceived packet in the sequence number space.
                                                                                                                                  -
                                                                                                                                  1723 *
                                                                                                                                  -
                                                                                                                                  1724 * There is a gap in the received sequence number space, so this is potentially possible. Scan
                                                                                                                                  -
                                                                                                                                  1725 * only the DATA packets (acknowledgments) accumulated in THIS handler (since previous ones
                                                                                                                                  -
                                                                                                                                  1726 * have already been checked, and unreceived gaps can't just appear out of nowhere later). If
                                                                                                                                  -
                                                                                                                                  1727 * any is past the first gap, it qualifies. (The reverse is true. If it's past any gap, it's
                                                                                                                                  -
                                                                                                                                  1728 * past the first gap.) */
                                                                                                                                  - -
                                                                                                                                  1730 for (size_t ack_idx = sock->m_rcv_pending_acks_size_at_recv_handler_start;
                                                                                                                                  -
                                                                                                                                  1731 ack_idx != pending_acks.size(); ++ack_idx)
                                                                                                                                  -
                                                                                                                                  1732 {
                                                                                                                                  -
                                                                                                                                  1733 ack = pending_acks[ack_idx];
                                                                                                                                  -
                                                                                                                                  1734 if (ack->m_seq_num > sock->m_rcv_next_seq_num)
                                                                                                                                  -
                                                                                                                                  1735 {
                                                                                                                                  -
                                                                                                                                  1736 force_ack = true;
                                                                                                                                  -
                                                                                                                                  1737 break;
                                                                                                                                  -
                                                                                                                                  1738 }
                                                                                                                                  -
                                                                                                                                  1739 }
                                                                                                                                  -
                                                                                                                                  1740
                                                                                                                                  -
                                                                                                                                  1741 if (force_ack)
                                                                                                                                  -
                                                                                                                                  1742 {
                                                                                                                                  - -
                                                                                                                                  1744 ("On [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  1745 "received out-of-order packet [" << ack->m_seq_num << ", size " << ack->m_data_size << ", "
                                                                                                                                  -
                                                                                                                                  1746 "rexmit " << ack->m_rexmit_id << "]; "
                                                                                                                                  -
                                                                                                                                  1747 "forcing immediate [ACK]. "
                                                                                                                                  -
                                                                                                                                  1748 "Receive window state: [" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  -
                                                                                                                                  1749 "| " << sock->m_rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  -
                                                                                                                                  1750 }
                                                                                                                                  -
                                                                                                                                  1751 }
                                                                                                                                  -
                                                                                                                                  1752 if (!force_ack)
                                                                                                                                  -
                                                                                                                                  1753 {
                                                                                                                                  -
                                                                                                                                  1754 // No out-of-order stuff. See if there are at least N * max-block-size bytes pending to be acknowledged.
                                                                                                                                  -
                                                                                                                                  1755
                                                                                                                                  -
                                                                                                                                  1756 const size_t limit // Default 2.
                                                                                                                                  -
                                                                                                                                  1757 = sock->opt(sock->m_opts.m_st_max_full_blocks_before_ack_send) * sock->max_block_size();
                                                                                                                                  -
                                                                                                                                  1758 size_t bytes = 0;
                                                                                                                                  -
                                                                                                                                  1759 for (Peer_socket::Individual_ack::Const_ptr ack : pending_acks)
                                                                                                                                  -
                                                                                                                                  1760 {
                                                                                                                                  -
                                                                                                                                  1761 bytes += ack->m_data_size;
                                                                                                                                  -
                                                                                                                                  1762 if (bytes >= limit)
                                                                                                                                  -
                                                                                                                                  1763 {
                                                                                                                                  -
                                                                                                                                  1764 force_ack = true;
                                                                                                                                  -
                                                                                                                                  1765 break;
                                                                                                                                  -
                                                                                                                                  1766 }
                                                                                                                                  -
                                                                                                                                  1767 }
                                                                                                                                  -
                                                                                                                                  1768
                                                                                                                                  -
                                                                                                                                  1769 if (force_ack)
                                                                                                                                  -
                                                                                                                                  1770 {
                                                                                                                                  -
                                                                                                                                  1771 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  1772 "accumulated at least [" << limit << "] bytes to acknowledge; "
                                                                                                                                  -
                                                                                                                                  1773 "forcing immediate [ACK].");
                                                                                                                                  -
                                                                                                                                  1774 }
                                                                                                                                  -
                                                                                                                                  1775 }
                                                                                                                                  -
                                                                                                                                  1776
                                                                                                                                  -
                                                                                                                                  1777 // OK; force_ack is set finally.
                                                                                                                                  -
                                                                                                                                  1778
                                                                                                                                  -
                                                                                                                                  1779 if (force_ack)
                                                                                                                                  -
                                                                                                                                  1780 {
                                                                                                                                  -
                                                                                                                                  1781 /* Yep, must send ACK(s) now. There are two possibilities. One, a delayed ACK timer may
                                                                                                                                  -
                                                                                                                                  1782 * already be running. If so, we should cancel it and send immediately. If the cancel fails
                                                                                                                                  -
                                                                                                                                  1783 * (returns 0 tasks canceled), then it was already queued to fire very soon, so we should
                                                                                                                                  -
                                                                                                                                  1784 * just let the ACKing happen that way instead of sending immediately.
                                                                                                                                  -
                                                                                                                                  1785 *
                                                                                                                                  -
                                                                                                                                  1786 * Two, a timer is not running, so we shouldn't cancel and should just send immediately.
                                                                                                                                  -
                                                                                                                                  1787 *
                                                                                                                                  -
                                                                                                                                  1788 * How to determine if timer is currently running? If
                                                                                                                                  -
                                                                                                                                  1789 * m_rcv_pending_acks_size_at_recv_handler_start == 0, then the timer was either never scheduled
                                                                                                                                  -
                                                                                                                                  1790 * (only scheduled when pending_acks.empty()) or was triggered and handled before the current
                                                                                                                                  -
                                                                                                                                  1791 * handler; therefore it is not running. Otherwise, there were pending acks to send, yet they
                                                                                                                                  -
                                                                                                                                  1792 * were not sent by the end of the last handler, which means the timer must be running.
                                                                                                                                  +
                                                                                                                                  1594 static_assert(std::is_aggregate_v<Peer_socket::Individual_ack>,
                                                                                                                                  +
                                                                                                                                  1595 "We want it to be direct-initializable.");
                                                                                                                                  +
                                                                                                                                  1596 static_assert((!std::is_copy_constructible_v<Peer_socket::Individual_ack>)
                                                                                                                                  +
                                                                                                                                  1597 && (!std::is_copy_assignable_v<Peer_socket::Individual_ack>),
                                                                                                                                  +
                                                                                                                                  1598 "We want it to be noncopyable but rather passed-around via its ::Ptr.");
                                                                                                                                  +
                                                                                                                                  1599
                                                                                                                                  +
                                                                                                                                  1600 /* Just the starting sequence number sufficient to identify a single packet. The time point saved
                                                                                                                                  +
                                                                                                                                  1601 * here is subtracted from time_now() at ACK send time, to compute the artificial delay introduced
                                                                                                                                  +
                                                                                                                                  1602 * by ACK delaying (explained just below). This helps other side calculate a more accurate RTT by
                                                                                                                                  +
                                                                                                                                  1603 * substracting the ACK delay from its RTT measurement. */
                                                                                                                                  +
                                                                                                                                  1604 sock->m_rcv_pending_acks.push_back
                                                                                                                                  + +
                                                                                                                                  1606 (new Peer_socket::Individual_ack{ seq_num, rexmit_id, Fine_clock::now(), data_size }));
                                                                                                                                  +
                                                                                                                                  1607
                                                                                                                                  +
                                                                                                                                  1608 /* m_rcv_pending_acks now stores at least one packet to acknowledge. We can acknowledge it
                                                                                                                                  +
                                                                                                                                  1609 * immediately (modulo UDP layer availability of course). However, suppose there is a fast stream
                                                                                                                                  +
                                                                                                                                  1610 * of packets coming in, such that several DATA packets were read in within one
                                                                                                                                  +
                                                                                                                                  1611 * low_lvl_recv_and_handle() call. Then each DATA packet will result in one ACK packet.
                                                                                                                                  +
                                                                                                                                  1612 * This introduces a ton of overhead, as the header is quite large given that the payload is just
                                                                                                                                  +
                                                                                                                                  1613 * a Sequence_number. Instead we would want to pack all the DATA packets' acknowledgments into
                                                                                                                                  +
                                                                                                                                  1614 * one ACK packet (unless it overflows, in which case create more ACK packets as needed). So we
                                                                                                                                  +
                                                                                                                                  1615 * only accumulate the individual acknowledgments here; we will possibly send the actual ACK(s) in
                                                                                                                                  +
                                                                                                                                  1616 * perform_accumulated_on_recv_tasks(), which runs at the end of low_lvl_recv_and_handle() (or its
                                                                                                                                  +
                                                                                                                                  1617 * bro, the async part of async_wait_latency_then_handle_incoming()).
                                                                                                                                  +
                                                                                                                                  1618 *
                                                                                                                                  +
                                                                                                                                  1619 * Caveat: The above is rock-solid if the different DATA packets being acked were contiguous to
                                                                                                                                  +
                                                                                                                                  1620 * each other chronologically. What if there is another type of packet between some two of these
                                                                                                                                  +
                                                                                                                                  1621 * DATAs? Well, it depends on what it is. Ignoring the misbehaving/duplicate/whatever packets
                                                                                                                                  +
                                                                                                                                  1622 * (SYN, for example) -- which will just be discarded basically -- let's consider the
                                                                                                                                  +
                                                                                                                                  1623 * possibilities. If the packet is ACK, then it is irrelevant; NetFlow (like TCP) is full-duplex
                                                                                                                                  +
                                                                                                                                  1624 * (actually more so, since there's no DATA+ACK piggy-backing), therefore the micro-ordering of
                                                                                                                                  +
                                                                                                                                  1625 * traffic in opposite directions is irrelevant. If the packet is RST, then that means the socket
                                                                                                                                  +
                                                                                                                                  1626 * will get closed (no longer ESTABLISHED) before we get a chance to send any of the individual
                                                                                                                                  +
                                                                                                                                  1627 * acknowledgments. However, that is more or less OK; if the other side sent RST, then they won't
                                                                                                                                  +
                                                                                                                                  1628 * accept any ACKs we may send them anyway. The only other possibility has to with graceful close,
                                                                                                                                  +
                                                                                                                                  1629 * but that is not yet implemented.
                                                                                                                                  +
                                                                                                                                  1630 * @todo Revisit this when graceful close is implemented. (Preliminary idea: force immediate ACK
                                                                                                                                  +
                                                                                                                                  1631 * handling when FIN/etc. detected? Or something.) */
                                                                                                                                  +
                                                                                                                                  1632
                                                                                                                                  +
                                                                                                                                  1633 if (m_socks_with_accumulated_pending_acks.insert(sock).second)
                                                                                                                                  +
                                                                                                                                  1634 {
                                                                                                                                  +
                                                                                                                                  1635 /* First acknowledgment to be accumulated in this handler (low_lvl_recv_and_handle() or
                                                                                                                                  +
                                                                                                                                  1636 * async part of async_wait_latency_then_handle_incoming()). So mark down whether at that time there were
                                                                                                                                  +
                                                                                                                                  1637 * already timer-delayed acknowledgments pending (and how many). See
                                                                                                                                  +
                                                                                                                                  1638 * sock_perform_accumulated_on_recv_tasks() for details on delayed ACKs. */
                                                                                                                                  +
                                                                                                                                  1639 sock->m_rcv_pending_acks_size_at_recv_handler_start = acks_pending_before_this;
                                                                                                                                  +
                                                                                                                                  1640 }
                                                                                                                                  +
                                                                                                                                  1641 // else already had registered pending acknowledgment in this handler.
                                                                                                                                  +
                                                                                                                                  1642} // Node::async_acknowledge_packet()
                                                                                                                                  +
                                                                                                                                  1643
                                                                                                                                  + +
                                                                                                                                  1645{
                                                                                                                                  +
                                                                                                                                  1646 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  1647 using boost::chrono::microseconds;
                                                                                                                                  +
                                                                                                                                  1648 using boost::chrono::duration_cast;
                                                                                                                                  +
                                                                                                                                  1649 using boost::chrono::round;
                                                                                                                                  +
                                                                                                                                  1650 using std::vector;
                                                                                                                                  +
                                                                                                                                  1651
                                                                                                                                  +
                                                                                                                                  1652 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  1653
                                                                                                                                  +
                                                                                                                                  1654 // For background see Node::perform_accumulated_on_recv_tasks().
                                                                                                                                  +
                                                                                                                                  1655
                                                                                                                                  +
                                                                                                                                  1656 // For brevity and speed:
                                                                                                                                  +
                                                                                                                                  1657 vector<Peer_socket::Individual_ack::Ptr>& pending_acks = sock->m_rcv_pending_acks;
                                                                                                                                  +
                                                                                                                                  1658
                                                                                                                                  +
                                                                                                                                  1659 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  1660 {
                                                                                                                                  +
                                                                                                                                  1661 // For example, we got DATA and then RST on the same socket almost simultaneously.
                                                                                                                                  +
                                                                                                                                  1662 FLOW_LOG_TRACE("Was about to perform accumulated acknowledgment tasks on [" << sock << "] but skipping because "
                                                                                                                                  +
                                                                                                                                  1663 "state is now [" << sock->m_int_state << "].");
                                                                                                                                  +
                                                                                                                                  1664 return;
                                                                                                                                  +
                                                                                                                                  1665 }
                                                                                                                                  +
                                                                                                                                  1666
                                                                                                                                  +
                                                                                                                                  1667 // Check explicit pre-condition.
                                                                                                                                  +
                                                                                                                                  1668 assert(!pending_acks.empty());
                                                                                                                                  +
                                                                                                                                  1669
                                                                                                                                  +
                                                                                                                                  1670 /* Deal with any accumulated acknowledgments. Naively, we'd simply call async_low_lvl_ack_send()
                                                                                                                                  +
                                                                                                                                  1671 * here, which would take pending_acks and bundle them up into as few as possible ACK
                                                                                                                                  +
                                                                                                                                  1672 * packets and send them off.
                                                                                                                                  +
                                                                                                                                  1673 *
                                                                                                                                  +
                                                                                                                                  1674 * However, we potentially instead use delayed ACKing as in typical TCP implementations (based on
                                                                                                                                  +
                                                                                                                                  1675 * various standard RFCs). The idea is that a few DATA packets have come in around the same time,
                                                                                                                                  +
                                                                                                                                  1676 * but not close enough to be handled in one receive handler. So upon detecting the first DATA
                                                                                                                                  +
                                                                                                                                  1677 * packet in the steady state, start a timer; until it fires accumulate more packets in
                                                                                                                                  +
                                                                                                                                  1678 * pending_acks; and when it fires finally assemble and flush (send) the ACK(s). Something else may trigger
                                                                                                                                  +
                                                                                                                                  1679 * the flushing of the ACK(s) ahead of this timer or even immediately.
                                                                                                                                  +
                                                                                                                                  1680 *
                                                                                                                                  +
                                                                                                                                  1681 * These are situations where we must short-circuit the timer and send the ACK(s)
                                                                                                                                  +
                                                                                                                                  1682 * immediately:
                                                                                                                                  +
                                                                                                                                  1683 *
                                                                                                                                  +
                                                                                                                                  1684 * 1. From TCP (RFC 5681-4.2), which says that an ACK should be generated for at
                                                                                                                                  +
                                                                                                                                  1685 * least every second full-sized (data size = MSS) incoming data segment. The reasoning is
                                                                                                                                  +
                                                                                                                                  1686 * two-fold: causing bursty sending by the receiver of the ACKs; and slowing down slow start
                                                                                                                                  +
                                                                                                                                  1687 * in Reno (and others) congestion control. The latter is not really a problem for us (since
                                                                                                                                  +
                                                                                                                                  1688 * ACKs are not cumulative but selective and handled as such by our congestion control logic);
                                                                                                                                  +
                                                                                                                                  1689 * but the former is definitely an easily demonstrable issue. @todo This paragraph is difficult
                                                                                                                                  +
                                                                                                                                  1690 * to understand right now. There might be 1 or more unintentional meaning inversions, wherein
                                                                                                                                  +
                                                                                                                                  1691 * I mean to say X is good, but instead say X is bad, or vice vera, or at least it's unclear. Research;
                                                                                                                                  +
                                                                                                                                  1692 * rephrase.
                                                                                                                                  +
                                                                                                                                  1693 *
                                                                                                                                  +
                                                                                                                                  1694 * 2. Also from TCP (RFC 5681-3.2), which says that an ACK should be
                                                                                                                                  +
                                                                                                                                  1695 * immediately generated upon detecting an out-of-order data segment. This is to inform
                                                                                                                                  +
                                                                                                                                  1696 * congestion control of any loss event as soon as possible (Fast Recovery algorithm).
                                                                                                                                  +
                                                                                                                                  1697 *
                                                                                                                                  +
                                                                                                                                  1698 * Note that TCP RFCs don't account for the implementation detail that several packets can be
                                                                                                                                  +
                                                                                                                                  1699 * received "simultaneously" (in one handler in our case), nor for selective ACKs (in this
                                                                                                                                  +
                                                                                                                                  1700 * context), so when they say we must send an ACK for every 2 incoming segments at least, we do
                                                                                                                                  +
                                                                                                                                  1701 * not take this literally. Instead, we just say that if (here, after a full receive handler has
                                                                                                                                  +
                                                                                                                                  1702 * run) there are at least 2 full blocks' worth of pending acknowledgments (there could be many
                                                                                                                                  +
                                                                                                                                  1703 * more in theory) and/or there's an out-of-order DATA packet, then we send immediate ACK(s), thus
                                                                                                                                  +
                                                                                                                                  1704 * following the spirit of the rules in the RFC. The spirit of the rule is to short-circuit the
                                                                                                                                  +
                                                                                                                                  1705 * timer the moment at least 2 full packets can be acknowledged.
                                                                                                                                  +
                                                                                                                                  1706 *
                                                                                                                                  +
                                                                                                                                  1707 * We detect both of these situations below and act accordingly. We also start the delayed ACK
                                                                                                                                  +
                                                                                                                                  1708 * timer, if necessary, otherwise. Oh, and there's a mode to disable delayed ACKs.
                                                                                                                                  +
                                                                                                                                  1709 *
                                                                                                                                  +
                                                                                                                                  1710 * @todo We may also force immediate ACKing during graceful shutdown. Revisit when graceful
                                                                                                                                  +
                                                                                                                                  1711 * shutdown is implemented.... */
                                                                                                                                  +
                                                                                                                                  1712
                                                                                                                                  +
                                                                                                                                  1713 const Fine_duration delayed_ack_timer_period = sock->opt(sock->m_opts.m_st_delayed_ack_timer_period);
                                                                                                                                  +
                                                                                                                                  1714
                                                                                                                                  +
                                                                                                                                  1715 bool force_ack = delayed_ack_timer_period == Fine_duration::zero(); // Delayed ACKs disabled.
                                                                                                                                  +
                                                                                                                                  1716
                                                                                                                                  +
                                                                                                                                  1717 if (force_ack)
                                                                                                                                  +
                                                                                                                                  1718 {
                                                                                                                                  + +
                                                                                                                                  1720 ("Delayed [ACK] feature disabled on [" << sock << "]; forcing immediate [ACK]. "
                                                                                                                                  +
                                                                                                                                  1721 "Receive window state: [" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  +
                                                                                                                                  1722 "| " << sock->m_rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  +
                                                                                                                                  1723 }
                                                                                                                                  +
                                                                                                                                  1724 else if (!sock->m_rcv_packets_with_gaps.empty())
                                                                                                                                  +
                                                                                                                                  1725 {
                                                                                                                                  +
                                                                                                                                  1726 /* Scan to see if there was an out-of-order DATA packet. That is to say, have we received a
                                                                                                                                  +
                                                                                                                                  1727 * DATA packet -- i.e., have we queued a pending acknowledgment in this receive handler -- that
                                                                                                                                  +
                                                                                                                                  1728 * follows at least one unreceived packet in the sequence number space.
                                                                                                                                  +
                                                                                                                                  1729 *
                                                                                                                                  +
                                                                                                                                  1730 * There is a gap in the received sequence number space, so this is potentially possible. Scan
                                                                                                                                  +
                                                                                                                                  1731 * only the DATA packets (acknowledgments) accumulated in THIS handler (since previous ones
                                                                                                                                  +
                                                                                                                                  1732 * have already been checked, and unreceived gaps can't just appear out of nowhere later). If
                                                                                                                                  +
                                                                                                                                  1733 * any is past the first gap, it qualifies. (The reverse is true. If it's past any gap, it's
                                                                                                                                  +
                                                                                                                                  1734 * past the first gap.) */
                                                                                                                                  + +
                                                                                                                                  1736 for (size_t ack_idx = sock->m_rcv_pending_acks_size_at_recv_handler_start;
                                                                                                                                  +
                                                                                                                                  1737 ack_idx != pending_acks.size(); ++ack_idx)
                                                                                                                                  +
                                                                                                                                  1738 {
                                                                                                                                  +
                                                                                                                                  1739 ack = pending_acks[ack_idx];
                                                                                                                                  +
                                                                                                                                  1740 if (ack->m_seq_num > sock->m_rcv_next_seq_num)
                                                                                                                                  +
                                                                                                                                  1741 {
                                                                                                                                  +
                                                                                                                                  1742 force_ack = true;
                                                                                                                                  +
                                                                                                                                  1743 break;
                                                                                                                                  +
                                                                                                                                  1744 }
                                                                                                                                  +
                                                                                                                                  1745 }
                                                                                                                                  +
                                                                                                                                  1746
                                                                                                                                  +
                                                                                                                                  1747 if (force_ack)
                                                                                                                                  +
                                                                                                                                  1748 {
                                                                                                                                  + +
                                                                                                                                  1750 ("On [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  1751 "received out-of-order packet [" << ack->m_seq_num << ", size " << ack->m_data_size << ", "
                                                                                                                                  +
                                                                                                                                  1752 "rexmit " << ack->m_rexmit_id << "]; "
                                                                                                                                  +
                                                                                                                                  1753 "forcing immediate [ACK]. "
                                                                                                                                  +
                                                                                                                                  1754 "Receive window state: [" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  +
                                                                                                                                  1755 "| " << sock->m_rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  +
                                                                                                                                  1756 }
                                                                                                                                  +
                                                                                                                                  1757 }
                                                                                                                                  +
                                                                                                                                  1758 if (!force_ack)
                                                                                                                                  +
                                                                                                                                  1759 {
                                                                                                                                  +
                                                                                                                                  1760 // No out-of-order stuff. See if there are at least N * max-block-size bytes pending to be acknowledged.
                                                                                                                                  +
                                                                                                                                  1761
                                                                                                                                  +
                                                                                                                                  1762 const size_t limit // Default 2.
                                                                                                                                  +
                                                                                                                                  1763 = sock->opt(sock->m_opts.m_st_max_full_blocks_before_ack_send) * sock->max_block_size();
                                                                                                                                  +
                                                                                                                                  1764 size_t bytes = 0;
                                                                                                                                  +
                                                                                                                                  1765 for (Peer_socket::Individual_ack::Const_ptr ack : pending_acks)
                                                                                                                                  +
                                                                                                                                  1766 {
                                                                                                                                  +
                                                                                                                                  1767 bytes += ack->m_data_size;
                                                                                                                                  +
                                                                                                                                  1768 if (bytes >= limit)
                                                                                                                                  +
                                                                                                                                  1769 {
                                                                                                                                  +
                                                                                                                                  1770 force_ack = true;
                                                                                                                                  +
                                                                                                                                  1771 break;
                                                                                                                                  +
                                                                                                                                  1772 }
                                                                                                                                  +
                                                                                                                                  1773 }
                                                                                                                                  +
                                                                                                                                  1774
                                                                                                                                  +
                                                                                                                                  1775 if (force_ack)
                                                                                                                                  +
                                                                                                                                  1776 {
                                                                                                                                  +
                                                                                                                                  1777 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  1778 "accumulated at least [" << limit << "] bytes to acknowledge; "
                                                                                                                                  +
                                                                                                                                  1779 "forcing immediate [ACK].");
                                                                                                                                  +
                                                                                                                                  1780 }
                                                                                                                                  +
                                                                                                                                  1781 }
                                                                                                                                  +
                                                                                                                                  1782
                                                                                                                                  +
                                                                                                                                  1783 // OK; force_ack is set finally.
                                                                                                                                  +
                                                                                                                                  1784
                                                                                                                                  +
                                                                                                                                  1785 if (force_ack)
                                                                                                                                  +
                                                                                                                                  1786 {
                                                                                                                                  +
                                                                                                                                  1787 /* Yep, must send ACK(s) now. There are two possibilities. One, a delayed ACK timer may
                                                                                                                                  +
                                                                                                                                  1788 * already be running. If so, we should cancel it and send immediately. If the cancel fails
                                                                                                                                  +
                                                                                                                                  1789 * (returns 0 tasks canceled), then it was already queued to fire very soon, so we should
                                                                                                                                  +
                                                                                                                                  1790 * just let the ACKing happen that way instead of sending immediately.
                                                                                                                                  +
                                                                                                                                  1791 *
                                                                                                                                  +
                                                                                                                                  1792 * Two, a timer is not running, so we shouldn't cancel and should just send immediately.
                                                                                                                                  1793 *
                                                                                                                                  -
                                                                                                                                  1794 * (There may be some corner case I'm not imagining such that the timer was running even while
                                                                                                                                  -
                                                                                                                                  1795 * m_rcv_pending_acks_size_at_recv_handler_start == 0, but even then the worst that will happen is
                                                                                                                                  -
                                                                                                                                  1796 * that we will perform the ACKing here, not cancel that wait, and that timer will
                                                                                                                                  -
                                                                                                                                  1797 * harmlessly expire with the timer handler doing nothing.) */
                                                                                                                                  -
                                                                                                                                  1798
                                                                                                                                  -
                                                                                                                                  1799 if (sock->m_rcv_pending_acks_size_at_recv_handler_start != 0)
                                                                                                                                  -
                                                                                                                                  1800 {
                                                                                                                                  -
                                                                                                                                  1801 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  1802 "canceling delayed [ACK] timer due to forcing "
                                                                                                                                  -
                                                                                                                                  1803 "immediate [ACK]; would have fired "
                                                                                                                                  -
                                                                                                                                  1804 "in [" << round<milliseconds>(sock->m_rcv_delayed_ack_timer.expires_from_now()) << "] "
                                                                                                                                  -
                                                                                                                                  1805 "from now.");
                                                                                                                                  -
                                                                                                                                  1806
                                                                                                                                  -
                                                                                                                                  1807 Error_code sys_err_code;
                                                                                                                                  -
                                                                                                                                  1808 const size_t num_canceled = sock->m_rcv_delayed_ack_timer.cancel(sys_err_code);
                                                                                                                                  -
                                                                                                                                  1809 if (sys_err_code)
                                                                                                                                  -
                                                                                                                                  1810 {
                                                                                                                                  -
                                                                                                                                  1811 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log the non-portable system error code/message.
                                                                                                                                  +
                                                                                                                                  1794 * How to determine if timer is currently running? If
                                                                                                                                  +
                                                                                                                                  1795 * m_rcv_pending_acks_size_at_recv_handler_start == 0, then the timer was either never scheduled
                                                                                                                                  +
                                                                                                                                  1796 * (only scheduled when pending_acks.empty()) or was triggered and handled before the current
                                                                                                                                  +
                                                                                                                                  1797 * handler; therefore it is not running. Otherwise, there were pending acks to send, yet they
                                                                                                                                  +
                                                                                                                                  1798 * were not sent by the end of the last handler, which means the timer must be running.
                                                                                                                                  +
                                                                                                                                  1799 *
                                                                                                                                  +
                                                                                                                                  1800 * (There may be some corner case I'm not imagining such that the timer was running even while
                                                                                                                                  +
                                                                                                                                  1801 * m_rcv_pending_acks_size_at_recv_handler_start == 0, but even then the worst that will happen is
                                                                                                                                  +
                                                                                                                                  1802 * that we will perform the ACKing here, not cancel that wait, and that timer will
                                                                                                                                  +
                                                                                                                                  1803 * harmlessly expire with the timer handler doing nothing.) */
                                                                                                                                  +
                                                                                                                                  1804
                                                                                                                                  +
                                                                                                                                  1805 if (sock->m_rcv_pending_acks_size_at_recv_handler_start != 0)
                                                                                                                                  +
                                                                                                                                  1806 {
                                                                                                                                  +
                                                                                                                                  1807 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  1808 "canceling delayed [ACK] timer due to forcing "
                                                                                                                                  +
                                                                                                                                  1809 "immediate [ACK]; would have fired "
                                                                                                                                  +
                                                                                                                                  1810 "in [" << round<milliseconds>(sock->m_rcv_delayed_ack_timer.expires_from_now()) << "] "
                                                                                                                                  +
                                                                                                                                  1811 "from now.");
                                                                                                                                  1812
                                                                                                                                  -
                                                                                                                                  1813 // Pretty unlikely, but let's send RST and abort connection, since something crazy is going on.
                                                                                                                                  -
                                                                                                                                  1814
                                                                                                                                  -
                                                                                                                                  1815 // As above....
                                                                                                                                  -
                                                                                                                                  1816 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  - -
                                                                                                                                  1818 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  -
                                                                                                                                  1819 return;
                                                                                                                                  -
                                                                                                                                  1820 }
                                                                                                                                  -
                                                                                                                                  1821 // else
                                                                                                                                  -
                                                                                                                                  1822
                                                                                                                                  -
                                                                                                                                  1823 if (num_canceled == 0)
                                                                                                                                  -
                                                                                                                                  1824 {
                                                                                                                                  -
                                                                                                                                  1825 /* Unlikely but legitimate; timer was queued to trigger very soon, so we could not
                                                                                                                                  -
                                                                                                                                  1826 * cancel it. No problem -- just let the ACKing happen per timer. Log INFO due to
                                                                                                                                  -
                                                                                                                                  1827 * rarity of this situation. */
                                                                                                                                  -
                                                                                                                                  1828 FLOW_LOG_INFO("On [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  1829 "tried to cancel delayed [ACK] timer while "
                                                                                                                                  -
                                                                                                                                  1830 "forcing [ACK], but it was already just about to fire.");
                                                                                                                                  -
                                                                                                                                  1831 force_ack = false;
                                                                                                                                  -
                                                                                                                                  1832 }
                                                                                                                                  -
                                                                                                                                  1833 } // if (m_rcv_pending_acks_size_at_recv_handler_start != 0) [timer was running]
                                                                                                                                  -
                                                                                                                                  1834
                                                                                                                                  -
                                                                                                                                  1835 // If still forcing immediate ACK, finally do it.
                                                                                                                                  -
                                                                                                                                  1836 if (force_ack)
                                                                                                                                  -
                                                                                                                                  1837 {
                                                                                                                                  -
                                                                                                                                  1838 async_low_lvl_ack_send(sock, true);
                                                                                                                                  -
                                                                                                                                  1839 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  +
                                                                                                                                  1813 Error_code sys_err_code;
                                                                                                                                  +
                                                                                                                                  1814 const size_t num_canceled = sock->m_rcv_delayed_ack_timer.cancel(sys_err_code);
                                                                                                                                  +
                                                                                                                                  1815 if (sys_err_code)
                                                                                                                                  +
                                                                                                                                  1816 {
                                                                                                                                  +
                                                                                                                                  1817 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log the non-portable system error code/message.
                                                                                                                                  +
                                                                                                                                  1818
                                                                                                                                  +
                                                                                                                                  1819 // Pretty unlikely, but let's send RST and abort connection, since something crazy is going on.
                                                                                                                                  +
                                                                                                                                  1820
                                                                                                                                  +
                                                                                                                                  1821 // As above....
                                                                                                                                  +
                                                                                                                                  1822 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  + +
                                                                                                                                  1824 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  +
                                                                                                                                  1825 return;
                                                                                                                                  +
                                                                                                                                  1826 }
                                                                                                                                  +
                                                                                                                                  1827 // else
                                                                                                                                  +
                                                                                                                                  1828
                                                                                                                                  +
                                                                                                                                  1829 if (num_canceled == 0)
                                                                                                                                  +
                                                                                                                                  1830 {
                                                                                                                                  +
                                                                                                                                  1831 /* Unlikely but legitimate; timer was queued to trigger very soon, so we could not
                                                                                                                                  +
                                                                                                                                  1832 * cancel it. No problem -- just let the ACKing happen per timer. Log INFO due to
                                                                                                                                  +
                                                                                                                                  1833 * rarity of this situation. */
                                                                                                                                  +
                                                                                                                                  1834 FLOW_LOG_INFO("On [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  1835 "tried to cancel delayed [ACK] timer while "
                                                                                                                                  +
                                                                                                                                  1836 "forcing [ACK], but it was already just about to fire.");
                                                                                                                                  +
                                                                                                                                  1837 force_ack = false;
                                                                                                                                  +
                                                                                                                                  1838 }
                                                                                                                                  +
                                                                                                                                  1839 } // if (m_rcv_pending_acks_size_at_recv_handler_start != 0) [timer was running]
                                                                                                                                  1840
                                                                                                                                  -
                                                                                                                                  1841 assert(pending_acks.empty());
                                                                                                                                  -
                                                                                                                                  1842 }
                                                                                                                                  -
                                                                                                                                  1843 } // if (force_ack)
                                                                                                                                  -
                                                                                                                                  1844 else // if (!force_ack)
                                                                                                                                  -
                                                                                                                                  1845 {
                                                                                                                                  -
                                                                                                                                  1846 /* There are pending individual acks but no reason to send them off right now. The only
                                                                                                                                  -
                                                                                                                                  1847 * remaining question is whether we need to schedule the delayed ACK timer to send them
                                                                                                                                  -
                                                                                                                                  1848 * later. That depends on whether the timer is already running. If
                                                                                                                                  -
                                                                                                                                  1849 * m_rcv_pending_acks_size_at_recv_handler_start == 0, then the timer was either never scheduled
                                                                                                                                  -
                                                                                                                                  1850 * or was triggered and handled before the current handler; therefore it is not running. So
                                                                                                                                  -
                                                                                                                                  1851 * in that case we should start it, as we've just received our first ackable DATA since
                                                                                                                                  -
                                                                                                                                  1852 * we've sent off our last ACK. If m_rcv_pending_acks_size_at_recv_handler_start != 0, then the
                                                                                                                                  -
                                                                                                                                  1853 * timer must be running, because there were pending acks to send, yet they were not send by
                                                                                                                                  -
                                                                                                                                  1854 * the end of the last handler (which would have caused this very code to schedule the
                                                                                                                                  -
                                                                                                                                  1855 * timer).
                                                                                                                                  -
                                                                                                                                  1856 *
                                                                                                                                  -
                                                                                                                                  1857 * (There may be some corner case I'm not imagining such that the timer was running even while
                                                                                                                                  -
                                                                                                                                  1858 * m_rcv_pending_acks_size_at_recv_handler_start == 0, but even then it can't possibly be set to
                                                                                                                                  -
                                                                                                                                  1859 * the right time [which is S_DELAYED_ACK_TIMER_PERIOD for now], so we need to re-set it
                                                                                                                                  -
                                                                                                                                  1860 * anyway. [Re-setting the expiry time will cancel that running timer wait. Even if that
                                                                                                                                  -
                                                                                                                                  1861 * somehow fails, the worst case is that the ACK(s) will be sent prematurely.]) */
                                                                                                                                  -
                                                                                                                                  1862
                                                                                                                                  -
                                                                                                                                  1863 if (sock->m_rcv_pending_acks_size_at_recv_handler_start == 0)
                                                                                                                                  -
                                                                                                                                  1864 {
                                                                                                                                  -
                                                                                                                                  1865 // First individual acknowledgment accumulated: start countdown to send the next batch of acknowledgments.
                                                                                                                                  -
                                                                                                                                  1866
                                                                                                                                  -
                                                                                                                                  1867 Error_code sys_err_code;
                                                                                                                                  -
                                                                                                                                  1868 sock->m_rcv_delayed_ack_timer.expires_from_now(delayed_ack_timer_period, sys_err_code);
                                                                                                                                  -
                                                                                                                                  1869 if (sys_err_code)
                                                                                                                                  -
                                                                                                                                  1870 {
                                                                                                                                  -
                                                                                                                                  1871 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log the non-portable system error code/message.
                                                                                                                                  +
                                                                                                                                  1841 // If still forcing immediate ACK, finally do it.
                                                                                                                                  +
                                                                                                                                  1842 if (force_ack)
                                                                                                                                  +
                                                                                                                                  1843 {
                                                                                                                                  +
                                                                                                                                  1844 async_low_lvl_ack_send(sock, true);
                                                                                                                                  +
                                                                                                                                  1845 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  +
                                                                                                                                  1846
                                                                                                                                  +
                                                                                                                                  1847 assert(pending_acks.empty());
                                                                                                                                  +
                                                                                                                                  1848 }
                                                                                                                                  +
                                                                                                                                  1849 } // if (force_ack)
                                                                                                                                  +
                                                                                                                                  1850 else // if (!force_ack)
                                                                                                                                  +
                                                                                                                                  1851 {
                                                                                                                                  +
                                                                                                                                  1852 /* There are pending individual acks but no reason to send them off right now. The only
                                                                                                                                  +
                                                                                                                                  1853 * remaining question is whether we need to schedule the delayed ACK timer to send them
                                                                                                                                  +
                                                                                                                                  1854 * later. That depends on whether the timer is already running. If
                                                                                                                                  +
                                                                                                                                  1855 * m_rcv_pending_acks_size_at_recv_handler_start == 0, then the timer was either never scheduled
                                                                                                                                  +
                                                                                                                                  1856 * or was triggered and handled before the current handler; therefore it is not running. So
                                                                                                                                  +
                                                                                                                                  1857 * in that case we should start it, as we've just received our first ackable DATA since
                                                                                                                                  +
                                                                                                                                  1858 * we've sent off our last ACK. If m_rcv_pending_acks_size_at_recv_handler_start != 0, then the
                                                                                                                                  +
                                                                                                                                  1859 * timer must be running, because there were pending acks to send, yet they were not send by
                                                                                                                                  +
                                                                                                                                  1860 * the end of the last handler (which would have caused this very code to schedule the
                                                                                                                                  +
                                                                                                                                  1861 * timer).
                                                                                                                                  +
                                                                                                                                  1862 *
                                                                                                                                  +
                                                                                                                                  1863 * (There may be some corner case I'm not imagining such that the timer was running even while
                                                                                                                                  +
                                                                                                                                  1864 * m_rcv_pending_acks_size_at_recv_handler_start == 0, but even then it can't possibly be set to
                                                                                                                                  +
                                                                                                                                  1865 * the right time [which is S_DELAYED_ACK_TIMER_PERIOD for now], so we need to re-set it
                                                                                                                                  +
                                                                                                                                  1866 * anyway. [Re-setting the expiry time will cancel that running timer wait. Even if that
                                                                                                                                  +
                                                                                                                                  1867 * somehow fails, the worst case is that the ACK(s) will be sent prematurely.]) */
                                                                                                                                  +
                                                                                                                                  1868
                                                                                                                                  +
                                                                                                                                  1869 if (sock->m_rcv_pending_acks_size_at_recv_handler_start == 0)
                                                                                                                                  +
                                                                                                                                  1870 {
                                                                                                                                  +
                                                                                                                                  1871 // First individual acknowledgment accumulated: start countdown to send the next batch of acknowledgments.
                                                                                                                                  1872
                                                                                                                                  -
                                                                                                                                  1873 // Pretty unlikely, but let's send RST and abort connection, since something crazy is going on.
                                                                                                                                  -
                                                                                                                                  1874
                                                                                                                                  -
                                                                                                                                  1875 /* Close connection in our structures (inform user if necessary as well). Pre-conditions
                                                                                                                                  -
                                                                                                                                  1876 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  -
                                                                                                                                  1877 * S_ESTABLISHED); 3rd arg contains the reason for the close (yes). This will empty the Send
                                                                                                                                  -
                                                                                                                                  1878 * and Receive buffers. That is OK, because this is the abrupt type of close (error). */
                                                                                                                                  -
                                                                                                                                  1879 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  - -
                                                                                                                                  1881 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  -
                                                                                                                                  1882 return;
                                                                                                                                  -
                                                                                                                                  1883 }
                                                                                                                                  -
                                                                                                                                  1884 // else
                                                                                                                                  -
                                                                                                                                  1885
                                                                                                                                  -
                                                                                                                                  1886 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  1887 "scheduled delayed [ACK] timer to fire "
                                                                                                                                  -
                                                                                                                                  1888 "in [" << round<milliseconds>(delayed_ack_timer_period) << "].");
                                                                                                                                  -
                                                                                                                                  1889
                                                                                                                                  -
                                                                                                                                  1890 // When triggered or canceled, call this->async_low_lvl_ack_send(sock, false, <error code>).
                                                                                                                                  -
                                                                                                                                  1891 sock->m_rcv_delayed_ack_timer.async_wait([this, socket_id, sock](const Error_code& sys_err_code)
                                                                                                                                  -
                                                                                                                                  1892 {
                                                                                                                                  -
                                                                                                                                  1893 async_low_lvl_ack_send(sock, false, sys_err_code);
                                                                                                                                  -
                                                                                                                                  1894 });
                                                                                                                                  -
                                                                                                                                  1895 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  -
                                                                                                                                  1896 }
                                                                                                                                  -
                                                                                                                                  1897 // else the timer is already started, so just accumulating onto pending_acks is enough. Done.
                                                                                                                                  -
                                                                                                                                  1898 } // if (!force_ack)
                                                                                                                                  -
                                                                                                                                  1899
                                                                                                                                  -
                                                                                                                                  1900 // Register the current # of DATA packets to acknowledge. Note that we're near the end of current handler.
                                                                                                                                  -
                                                                                                                                  1901 sock->m_rcv_stats.current_pending_to_ack_packets(pending_acks.size());
                                                                                                                                  -
                                                                                                                                  1902} // Node::sock_perform_accumulated_on_recv_tasks()
                                                                                                                                  -
                                                                                                                                  1903
                                                                                                                                  -
                                                                                                                                  1904void Node::log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging) const
                                                                                                                                  -
                                                                                                                                  1905{
                                                                                                                                  -
                                                                                                                                  1906 using std::vector;
                                                                                                                                  -
                                                                                                                                  1907 using std::string;
                                                                                                                                  -
                                                                                                                                  1908 using boost::algorithm::join;
                                                                                                                                  +
                                                                                                                                  1873 Error_code sys_err_code;
                                                                                                                                  +
                                                                                                                                  1874 sock->m_rcv_delayed_ack_timer.expires_from_now(delayed_ack_timer_period, sys_err_code);
                                                                                                                                  +
                                                                                                                                  1875 if (sys_err_code)
                                                                                                                                  +
                                                                                                                                  1876 {
                                                                                                                                  +
                                                                                                                                  1877 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log the non-portable system error code/message.
                                                                                                                                  +
                                                                                                                                  1878
                                                                                                                                  +
                                                                                                                                  1879 // Pretty unlikely, but let's send RST and abort connection, since something crazy is going on.
                                                                                                                                  +
                                                                                                                                  1880
                                                                                                                                  +
                                                                                                                                  1881 /* Close connection in our structures (inform user if necessary as well). Pre-conditions
                                                                                                                                  +
                                                                                                                                  1882 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  +
                                                                                                                                  1883 * S_ESTABLISHED); 3rd arg contains the reason for the close (yes). This will empty the Send
                                                                                                                                  +
                                                                                                                                  1884 * and Receive buffers. That is OK, because this is the abrupt type of close (error). */
                                                                                                                                  +
                                                                                                                                  1885 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  + +
                                                                                                                                  1887 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  +
                                                                                                                                  1888 return;
                                                                                                                                  +
                                                                                                                                  1889 }
                                                                                                                                  +
                                                                                                                                  1890 // else
                                                                                                                                  +
                                                                                                                                  1891
                                                                                                                                  +
                                                                                                                                  1892 FLOW_LOG_TRACE("On [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  1893 "scheduled delayed [ACK] timer to fire "
                                                                                                                                  +
                                                                                                                                  1894 "in [" << round<milliseconds>(delayed_ack_timer_period) << "].");
                                                                                                                                  +
                                                                                                                                  1895
                                                                                                                                  +
                                                                                                                                  1896 // When triggered or canceled, call this->async_low_lvl_ack_send(sock, false, <error code>).
                                                                                                                                  +
                                                                                                                                  1897 sock->m_rcv_delayed_ack_timer.async_wait([this, socket_id, sock](const Error_code& sys_err_code)
                                                                                                                                  +
                                                                                                                                  1898 {
                                                                                                                                  +
                                                                                                                                  1899 async_low_lvl_ack_send(sock, false, sys_err_code);
                                                                                                                                  +
                                                                                                                                  1900 });
                                                                                                                                  +
                                                                                                                                  1901 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  +
                                                                                                                                  1902 }
                                                                                                                                  +
                                                                                                                                  1903 // else the timer is already started, so just accumulating onto pending_acks is enough. Done.
                                                                                                                                  +
                                                                                                                                  1904 } // if (!force_ack)
                                                                                                                                  +
                                                                                                                                  1905
                                                                                                                                  +
                                                                                                                                  1906 // Register the current # of DATA packets to acknowledge. Note that we're near the end of current handler.
                                                                                                                                  +
                                                                                                                                  1907 sock->m_rcv_stats.current_pending_to_ack_packets(pending_acks.size());
                                                                                                                                  +
                                                                                                                                  1908} // Node::sock_perform_accumulated_on_recv_tasks()
                                                                                                                                  1909
                                                                                                                                  -
                                                                                                                                  1910 // We're in thread W.
                                                                                                                                  -
                                                                                                                                  1911
                                                                                                                                  -
                                                                                                                                  1912 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  1913 const Peer_socket::Recvd_pkt_map& rcv_packets_with_gaps = sock->m_rcv_packets_with_gaps;
                                                                                                                                  -
                                                                                                                                  1914
                                                                                                                                  -
                                                                                                                                  1915 // force_verbose_info_logging => log the most detail, as INFO (if INFO logging enabled).
                                                                                                                                  -
                                                                                                                                  1916
                                                                                                                                  -
                                                                                                                                  1917 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  1918 if (((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_DATA, get_log_component()))) &&
                                                                                                                                  -
                                                                                                                                  1919 (!(force_verbose_info_logging && logger_ptr->should_log(log::Sev::S_INFO, get_log_component()))))
                                                                                                                                  -
                                                                                                                                  1920 {
                                                                                                                                  -
                                                                                                                                  1921 // Can't print entire In-flight data structure, but can print a summary, if TRACE enabled.
                                                                                                                                  - -
                                                                                                                                  1923 ("Receive window state for [" << sock << "]: "
                                                                                                                                  -
                                                                                                                                  1924 "[" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  -
                                                                                                                                  1925 "| " << rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  -
                                                                                                                                  1926 return;
                                                                                                                                  -
                                                                                                                                  1927 }
                                                                                                                                  -
                                                                                                                                  1928 // else
                                                                                                                                  -
                                                                                                                                  1929
                                                                                                                                  -
                                                                                                                                  1930 /* Construct full printout of the packets we've received past the first unreceived gap.
                                                                                                                                  -
                                                                                                                                  1931 *
                                                                                                                                  -
                                                                                                                                  1932 * Very verbose and slow! Even so, if it gets beyond a certain size it's absurd, so skip some in
                                                                                                                                  -
                                                                                                                                  1933 * that case even though DATA logging is sanctioned. (That amount of data cannot really be useful
                                                                                                                                  -
                                                                                                                                  1934 * in any case.) */
                                                                                                                                  +
                                                                                                                                  1910void Node::log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging) const
                                                                                                                                  +
                                                                                                                                  1911{
                                                                                                                                  +
                                                                                                                                  1912 using std::vector;
                                                                                                                                  +
                                                                                                                                  1913 using std::string;
                                                                                                                                  +
                                                                                                                                  1914 using boost::algorithm::join;
                                                                                                                                  +
                                                                                                                                  1915
                                                                                                                                  +
                                                                                                                                  1916 // We're in thread W.
                                                                                                                                  +
                                                                                                                                  1917
                                                                                                                                  +
                                                                                                                                  1918 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  1919 const Peer_socket::Recvd_pkt_map& rcv_packets_with_gaps = sock->m_rcv_packets_with_gaps;
                                                                                                                                  +
                                                                                                                                  1920
                                                                                                                                  +
                                                                                                                                  1921 // force_verbose_info_logging => log the most detail, as INFO (if INFO logging enabled).
                                                                                                                                  +
                                                                                                                                  1922
                                                                                                                                  +
                                                                                                                                  1923 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  1924 if (((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_DATA, get_log_component()))) &&
                                                                                                                                  +
                                                                                                                                  1925 (!(force_verbose_info_logging && logger_ptr->should_log(log::Sev::S_INFO, get_log_component()))))
                                                                                                                                  +
                                                                                                                                  1926 {
                                                                                                                                  +
                                                                                                                                  1927 // Can't print entire In-flight data structure, but can print a summary, if TRACE enabled.
                                                                                                                                  + +
                                                                                                                                  1929 ("Receive window state for [" << sock << "]: "
                                                                                                                                  +
                                                                                                                                  1930 "[" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  +
                                                                                                                                  1931 "| " << rcv_packets_with_gaps.size() << ":{...}.");
                                                                                                                                  +
                                                                                                                                  1932 return;
                                                                                                                                  +
                                                                                                                                  1933 }
                                                                                                                                  +
                                                                                                                                  1934 // else
                                                                                                                                  1935
                                                                                                                                  -
                                                                                                                                  1936 vector<string> pkt_strs;
                                                                                                                                  -
                                                                                                                                  1937 pkt_strs.reserve(rcv_packets_with_gaps.size());
                                                                                                                                  -
                                                                                                                                  1938
                                                                                                                                  -
                                                                                                                                  1939 const size_t MAX_TO_SHOW = 100;
                                                                                                                                  -
                                                                                                                                  1940 bool skipped_some = false;
                                                                                                                                  -
                                                                                                                                  1941 size_t count = 0;
                                                                                                                                  -
                                                                                                                                  1942
                                                                                                                                  -
                                                                                                                                  1943 for (Peer_socket::Recvd_pkt_const_iter pkt_it = rcv_packets_with_gaps.begin();
                                                                                                                                  -
                                                                                                                                  1944 pkt_it != rcv_packets_with_gaps.end();
                                                                                                                                  -
                                                                                                                                  1945 ++pkt_it)
                                                                                                                                  -
                                                                                                                                  1946 {
                                                                                                                                  -
                                                                                                                                  1947 const bool last_iteration = (count == rcv_packets_with_gaps.size() - 1);
                                                                                                                                  +
                                                                                                                                  1936 /* Construct full printout of the packets we've received past the first unreceived gap.
                                                                                                                                  +
                                                                                                                                  1937 *
                                                                                                                                  +
                                                                                                                                  1938 * Very verbose and slow! Even so, if it gets beyond a certain size it's absurd, so skip some in
                                                                                                                                  +
                                                                                                                                  1939 * that case even though DATA logging is sanctioned. (That amount of data cannot really be useful
                                                                                                                                  +
                                                                                                                                  1940 * in any case.) */
                                                                                                                                  +
                                                                                                                                  1941
                                                                                                                                  +
                                                                                                                                  1942 vector<string> pkt_strs;
                                                                                                                                  +
                                                                                                                                  1943 pkt_strs.reserve(rcv_packets_with_gaps.size());
                                                                                                                                  +
                                                                                                                                  1944
                                                                                                                                  +
                                                                                                                                  1945 const size_t MAX_TO_SHOW = 100;
                                                                                                                                  +
                                                                                                                                  1946 bool skipped_some = false;
                                                                                                                                  +
                                                                                                                                  1947 size_t count = 0;
                                                                                                                                  1948
                                                                                                                                  -
                                                                                                                                  1949 if ((!skipped_some) && (count > MAX_TO_SHOW) && (!last_iteration))
                                                                                                                                  -
                                                                                                                                  1950 {
                                                                                                                                  -
                                                                                                                                  1951 // First packet past the limit we can print. Start skipping mode.
                                                                                                                                  -
                                                                                                                                  1952 skipped_some = true;
                                                                                                                                  -
                                                                                                                                  1953 ++count;
                                                                                                                                  -
                                                                                                                                  1954 continue;
                                                                                                                                  -
                                                                                                                                  1955 }
                                                                                                                                  -
                                                                                                                                  1956 // else either we are in skipping more from before, or we are not in skipping mode.
                                                                                                                                  -
                                                                                                                                  1957
                                                                                                                                  -
                                                                                                                                  1958 string pkt_str;
                                                                                                                                  -
                                                                                                                                  1959
                                                                                                                                  -
                                                                                                                                  1960 if (skipped_some)
                                                                                                                                  -
                                                                                                                                  1961 {
                                                                                                                                  -
                                                                                                                                  1962 // We are in skipping mode from before.
                                                                                                                                  -
                                                                                                                                  1963 if (!last_iteration)
                                                                                                                                  -
                                                                                                                                  1964 {
                                                                                                                                  -
                                                                                                                                  1965 // Since it's not the last iteration, skip: print nothing.
                                                                                                                                  -
                                                                                                                                  1966 ++count;
                                                                                                                                  -
                                                                                                                                  1967 continue;
                                                                                                                                  -
                                                                                                                                  1968 }
                                                                                                                                  -
                                                                                                                                  1969 // else we are in skipping more from before, and this is the last iteration. Print the placeholder.
                                                                                                                                  -
                                                                                                                                  1970 pkt_str = "[...skipped...] ";
                                                                                                                                  -
                                                                                                                                  1971 }
                                                                                                                                  -
                                                                                                                                  1972 // Either we are not in skipping mode (just print the thing) or we are and it's last iteration (also print it).
                                                                                                                                  -
                                                                                                                                  1973
                                                                                                                                  -
                                                                                                                                  1974 Sequence_number start, end;
                                                                                                                                  -
                                                                                                                                  1975 get_seq_num_range(pkt_it, &start, &end);
                                                                                                                                  -
                                                                                                                                  1976
                                                                                                                                  -
                                                                                                                                  1977 util::ostream_op_to_string(&pkt_str, '[', start, ", ", end, ')');
                                                                                                                                  -
                                                                                                                                  1978 pkt_strs.push_back(pkt_str);
                                                                                                                                  +
                                                                                                                                  1949 for (Peer_socket::Recvd_pkt_const_iter pkt_it = rcv_packets_with_gaps.begin();
                                                                                                                                  +
                                                                                                                                  1950 pkt_it != rcv_packets_with_gaps.end();
                                                                                                                                  +
                                                                                                                                  1951 ++pkt_it)
                                                                                                                                  +
                                                                                                                                  1952 {
                                                                                                                                  +
                                                                                                                                  1953 const bool last_iteration = (count == rcv_packets_with_gaps.size() - 1);
                                                                                                                                  +
                                                                                                                                  1954
                                                                                                                                  +
                                                                                                                                  1955 if ((!skipped_some) && (count > MAX_TO_SHOW) && (!last_iteration))
                                                                                                                                  +
                                                                                                                                  1956 {
                                                                                                                                  +
                                                                                                                                  1957 // First packet past the limit we can print. Start skipping mode.
                                                                                                                                  +
                                                                                                                                  1958 skipped_some = true;
                                                                                                                                  +
                                                                                                                                  1959 ++count;
                                                                                                                                  +
                                                                                                                                  1960 continue;
                                                                                                                                  +
                                                                                                                                  1961 }
                                                                                                                                  +
                                                                                                                                  1962 // else either we are in skipping more from before, or we are not in skipping mode.
                                                                                                                                  +
                                                                                                                                  1963
                                                                                                                                  +
                                                                                                                                  1964 string pkt_str;
                                                                                                                                  +
                                                                                                                                  1965
                                                                                                                                  +
                                                                                                                                  1966 if (skipped_some)
                                                                                                                                  +
                                                                                                                                  1967 {
                                                                                                                                  +
                                                                                                                                  1968 // We are in skipping mode from before.
                                                                                                                                  +
                                                                                                                                  1969 if (!last_iteration)
                                                                                                                                  +
                                                                                                                                  1970 {
                                                                                                                                  +
                                                                                                                                  1971 // Since it's not the last iteration, skip: print nothing.
                                                                                                                                  +
                                                                                                                                  1972 ++count;
                                                                                                                                  +
                                                                                                                                  1973 continue;
                                                                                                                                  +
                                                                                                                                  1974 }
                                                                                                                                  +
                                                                                                                                  1975 // else we are in skipping more from before, and this is the last iteration. Print the placeholder.
                                                                                                                                  +
                                                                                                                                  1976 pkt_str = "[...skipped...] ";
                                                                                                                                  +
                                                                                                                                  1977 }
                                                                                                                                  +
                                                                                                                                  1978 // Either we are not in skipping mode (just print the thing) or we are and it's last iteration (also print it).
                                                                                                                                  1979
                                                                                                                                  -
                                                                                                                                  1980 ++count;
                                                                                                                                  -
                                                                                                                                  1981 } // for (packets in rcv_packets_with_gaps)
                                                                                                                                  +
                                                                                                                                  1980 Sequence_number start, end;
                                                                                                                                  +
                                                                                                                                  1981 get_seq_num_range(pkt_it, &start, &end);
                                                                                                                                  1982
                                                                                                                                  - -
                                                                                                                                  1984 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  -
                                                                                                                                  1985 "Receive window state for [" << sock << "]: "
                                                                                                                                  -
                                                                                                                                  1986 "[" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  -
                                                                                                                                  1987 "| " << rcv_packets_with_gaps.size() << ":{" << join(pkt_strs, " ") << "}.");
                                                                                                                                  -
                                                                                                                                  1988} // Node::log_rcv_window()
                                                                                                                                  -
                                                                                                                                  1989
                                                                                                                                  - -
                                                                                                                                  1991 boost::shared_ptr<const Ack_packet> ack)
                                                                                                                                  -
                                                                                                                                  1992{
                                                                                                                                  -
                                                                                                                                  1993 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  1994
                                                                                                                                  -
                                                                                                                                  1995 /* packet is an ACK, so its payload consists of at least m_rcv_wnd (the current advertised Receive
                                                                                                                                  -
                                                                                                                                  1996 * buffer space on the receiver) and packet->m_rcv_acked_packets, which is basically a list of ZERO or
                                                                                                                                  -
                                                                                                                                  1997 * more sequence numbers, each of which represents a packet we'd (hopefully) sent that the
                                                                                                                                  -
                                                                                                                                  1998 * receiver has received. Naively we'd just handle the window update and each individual ack here
                                                                                                                                  -
                                                                                                                                  1999 * in a loop, then inform congestion control, etc. etc. However there is an optimization to make.
                                                                                                                                  -
                                                                                                                                  2000 * Suppose in the calling low_lvl_recv_and_handle() or async-part-of-async_wait_latency_then_handle_incoming()
                                                                                                                                  -
                                                                                                                                  2001 * there are several more ACKs for this socket sock that will be received. This may well happen in
                                                                                                                                  -
                                                                                                                                  2002 * high traffic; for instance the sender may have had too many individual acks for one ACK and
                                                                                                                                  -
                                                                                                                                  2003 * thus sent several; or maybe the UDP net-stack had a few packets ready by the time boost.asio was
                                                                                                                                  -
                                                                                                                                  2004 * free in thread W. In this case, it is better to collect all the individuals acks in these
                                                                                                                                  -
                                                                                                                                  2005 * several ACKs, and then handle them all at the same time. Why? Answer: it will update our
                                                                                                                                  -
                                                                                                                                  2006 * sender state (what's ACKed, what's dropped) entirely in one go instead of doing it in two or
                                                                                                                                  -
                                                                                                                                  2007 * more steps. Because congestion control activities ("on drop event," "on acknowledgment") are
                                                                                                                                  -
                                                                                                                                  2008 * performed after handling all the available acks, it gives a truer, simpler picture to the
                                                                                                                                  -
                                                                                                                                  2009 * congestion control module, when compared to giving it one picture and then almost instantly
                                                                                                                                  -
                                                                                                                                  2010 * giving it another. Another way to think of it is simply that since the different ACKs arrived
                                                                                                                                  -
                                                                                                                                  2011 * at the same time, and all an ACK is is a collection of individual acks that could fit into the
                                                                                                                                  -
                                                                                                                                  2012 * ACK packet, then conceptually this is no different from being one super-ACK with all the
                                                                                                                                  -
                                                                                                                                  2013 * individual acks contained in it. Therefore it is at least not worse.
                                                                                                                                  -
                                                                                                                                  2014 *
                                                                                                                                  -
                                                                                                                                  2015 * (In addition, m_rcv_wnd also affects the decision on whether to send more data over the wire,
                                                                                                                                  -
                                                                                                                                  2016 * as can_send() is part of that same algorithm.)
                                                                                                                                  -
                                                                                                                                  2017 *
                                                                                                                                  -
                                                                                                                                  2018 * Caveat: The above is rock-solid if the different ACKs being combined were contiguous to each
                                                                                                                                  -
                                                                                                                                  2019 * other chronologically. What if there is another type of packet between some two of these ACKs?
                                                                                                                                  -
                                                                                                                                  2020 * Well, it depends on what it is. Ignoring the misbehaving/duplicate/whatever packets (SYN, for
                                                                                                                                  -
                                                                                                                                  2021 * example) -- which will just be discarded basically -- let's consider the possibilities. If
                                                                                                                                  -
                                                                                                                                  2022 * the packet is DATA, then it is irrelevant; NetFlow (like TCP) is full-duplex (actually more so,
                                                                                                                                  -
                                                                                                                                  2023 * since there's no DATA+ACK piggy-backing), therefore the micro-ordering of traffic in opposite
                                                                                                                                  -
                                                                                                                                  2024 * directions is irrelevant. If the packet is RST, then that means the socket will get closed (no
                                                                                                                                  -
                                                                                                                                  2025 * longer ESTABLISHED) before we get a chance to process any of the individual acknowledgments.
                                                                                                                                  -
                                                                                                                                  2026 * However, that is more or less OK; if the other side sent RST, then they won't accept any
                                                                                                                                  -
                                                                                                                                  2027 * further data we may send after processing the acknowledgments anyway. The only other
                                                                                                                                  -
                                                                                                                                  2028 * possibility has to with graceful close, but that is not yet implemented.
                                                                                                                                  -
                                                                                                                                  2029 * @todo Revisit this when graceful close is implemented. (Preliminary idea: accumulate DATA and
                                                                                                                                  -
                                                                                                                                  2030 * FIN/etc. packets and always handle them after handling ACKs. Then the DATA/FIN stream will not
                                                                                                                                  -
                                                                                                                                  2031 * have a chance to disrupt (by initiating closing the connection) the ACK handling, while the ACK
                                                                                                                                  -
                                                                                                                                  2032 * handling should have no bearing on the DATA/FIN stream.)
                                                                                                                                  -
                                                                                                                                  2033 *
                                                                                                                                  -
                                                                                                                                  2034 * So, let's accumulate the individual acks in packet->m_rcv_acked_packets into a big
                                                                                                                                  -
                                                                                                                                  2035 * sock->m_rcv_acked_packets to be handled from perform_accumulated_on_recv_tasks() at the end of the
                                                                                                                                  -
                                                                                                                                  2036 * current handler. Similarly save m_rcv_wnd into sock->m_pending_rcv_wnd. To let that method
                                                                                                                                  -
                                                                                                                                  2037 * know sock has a new m_pending_rcv_wnd and possibly non-empty sock->m_rcv_acked_packets, insert sock
                                                                                                                                  -
                                                                                                                                  2038 * into m_socks_with_accumulated_acks. */
                                                                                                                                  -
                                                                                                                                  2039
                                                                                                                                  -
                                                                                                                                  2040 /* Note: We're not setting the actual sock->m_snd_remote_rcv_wnd until
                                                                                                                                  -
                                                                                                                                  2041 * perform_accumulated_on_recv_tasks().
                                                                                                                                  -
                                                                                                                                  2042 *
                                                                                                                                  -
                                                                                                                                  2043 * Also note: the latest ACK to arrive in this receive handler will contain the most up-to-date
                                                                                                                                  -
                                                                                                                                  2044 * rcv_wnd value (previous ones are overwritten by this). */
                                                                                                                                  -
                                                                                                                                  2045 sock->m_snd_pending_rcv_wnd = ack->m_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  2046
                                                                                                                                  -
                                                                                                                                  2047 // It's a (ref-counted) pointer copy. Note there may be 0 elements there, if it's just an m_rcv_wnd update alone.
                                                                                                                                  -
                                                                                                                                  2048 sock->m_rcv_acked_packets.insert(sock->m_rcv_acked_packets.end(), // Append.
                                                                                                                                  -
                                                                                                                                  2049 ack->m_rcv_acked_packets.begin(), ack->m_rcv_acked_packets.end());
                                                                                                                                  -
                                                                                                                                  2050 m_socks_with_accumulated_acks.insert(sock); // May already be in there.
                                                                                                                                  -
                                                                                                                                  2051
                                                                                                                                  -
                                                                                                                                  2052 FLOW_LOG_TRACE("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2053 "Received and accumulated [" << ack->m_type_ostream_manip << "] with "
                                                                                                                                  -
                                                                                                                                  2054 "[" << ack->m_rcv_acked_packets.size() << "] individual acknowledgments "
                                                                                                                                  -
                                                                                                                                  2055 "and rcv_wnd = [" << ack->m_rcv_wnd << "]; total for this socket in this "
                                                                                                                                  -
                                                                                                                                  2056 "receive handler is [" << sock->m_rcv_acked_packets.size() << "] individual acknowledgments.");
                                                                                                                                  +
                                                                                                                                  1983 util::ostream_op_to_string(&pkt_str, '[', start, ", ", end, ')');
                                                                                                                                  +
                                                                                                                                  1984 pkt_strs.push_back(pkt_str);
                                                                                                                                  +
                                                                                                                                  1985
                                                                                                                                  +
                                                                                                                                  1986 ++count;
                                                                                                                                  +
                                                                                                                                  1987 } // for (packets in rcv_packets_with_gaps)
                                                                                                                                  +
                                                                                                                                  1988
                                                                                                                                  + +
                                                                                                                                  1990 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  +
                                                                                                                                  1991 "Receive window state for [" << sock << "]: "
                                                                                                                                  +
                                                                                                                                  1992 "[" << sock->m_rcv_init_seq_num << ", " << sock->m_rcv_next_seq_num << ") "
                                                                                                                                  +
                                                                                                                                  1993 "| " << rcv_packets_with_gaps.size() << ":{" << join(pkt_strs, " ") << "}.");
                                                                                                                                  +
                                                                                                                                  1994} // Node::log_rcv_window()
                                                                                                                                  +
                                                                                                                                  1995
                                                                                                                                  + +
                                                                                                                                  1997 boost::shared_ptr<const Ack_packet> ack)
                                                                                                                                  +
                                                                                                                                  1998{
                                                                                                                                  +
                                                                                                                                  1999 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  2000
                                                                                                                                  +
                                                                                                                                  2001 /* packet is an ACK, so its payload consists of at least m_rcv_wnd (the current advertised Receive
                                                                                                                                  +
                                                                                                                                  2002 * buffer space on the receiver) and packet->m_rcv_acked_packets, which is basically a list of ZERO or
                                                                                                                                  +
                                                                                                                                  2003 * more sequence numbers, each of which represents a packet we'd (hopefully) sent that the
                                                                                                                                  +
                                                                                                                                  2004 * receiver has received. Naively we'd just handle the window update and each individual ack here
                                                                                                                                  +
                                                                                                                                  2005 * in a loop, then inform congestion control, etc. etc. However there is an optimization to make.
                                                                                                                                  +
                                                                                                                                  2006 * Suppose in the calling low_lvl_recv_and_handle() or async-part-of-async_wait_latency_then_handle_incoming()
                                                                                                                                  +
                                                                                                                                  2007 * there are several more ACKs for this socket sock that will be received. This may well happen in
                                                                                                                                  +
                                                                                                                                  2008 * high traffic; for instance the sender may have had too many individual acks for one ACK and
                                                                                                                                  +
                                                                                                                                  2009 * thus sent several; or maybe the UDP net-stack had a few packets ready by the time boost.asio was
                                                                                                                                  +
                                                                                                                                  2010 * free in thread W. In this case, it is better to collect all the individuals acks in these
                                                                                                                                  +
                                                                                                                                  2011 * several ACKs, and then handle them all at the same time. Why? Answer: it will update our
                                                                                                                                  +
                                                                                                                                  2012 * sender state (what's ACKed, what's dropped) entirely in one go instead of doing it in two or
                                                                                                                                  +
                                                                                                                                  2013 * more steps. Because congestion control activities ("on drop event," "on acknowledgment") are
                                                                                                                                  +
                                                                                                                                  2014 * performed after handling all the available acks, it gives a truer, simpler picture to the
                                                                                                                                  +
                                                                                                                                  2015 * congestion control module, when compared to giving it one picture and then almost instantly
                                                                                                                                  +
                                                                                                                                  2016 * giving it another. Another way to think of it is simply that since the different ACKs arrived
                                                                                                                                  +
                                                                                                                                  2017 * at the same time, and all an ACK is is a collection of individual acks that could fit into the
                                                                                                                                  +
                                                                                                                                  2018 * ACK packet, then conceptually this is no different from being one super-ACK with all the
                                                                                                                                  +
                                                                                                                                  2019 * individual acks contained in it. Therefore it is at least not worse.
                                                                                                                                  +
                                                                                                                                  2020 *
                                                                                                                                  +
                                                                                                                                  2021 * (In addition, m_rcv_wnd also affects the decision on whether to send more data over the wire,
                                                                                                                                  +
                                                                                                                                  2022 * as can_send() is part of that same algorithm.)
                                                                                                                                  +
                                                                                                                                  2023 *
                                                                                                                                  +
                                                                                                                                  2024 * Caveat: The above is rock-solid if the different ACKs being combined were contiguous to each
                                                                                                                                  +
                                                                                                                                  2025 * other chronologically. What if there is another type of packet between some two of these ACKs?
                                                                                                                                  +
                                                                                                                                  2026 * Well, it depends on what it is. Ignoring the misbehaving/duplicate/whatever packets (SYN, for
                                                                                                                                  +
                                                                                                                                  2027 * example) -- which will just be discarded basically -- let's consider the possibilities. If
                                                                                                                                  +
                                                                                                                                  2028 * the packet is DATA, then it is irrelevant; NetFlow (like TCP) is full-duplex (actually more so,
                                                                                                                                  +
                                                                                                                                  2029 * since there's no DATA+ACK piggy-backing), therefore the micro-ordering of traffic in opposite
                                                                                                                                  +
                                                                                                                                  2030 * directions is irrelevant. If the packet is RST, then that means the socket will get closed (no
                                                                                                                                  +
                                                                                                                                  2031 * longer ESTABLISHED) before we get a chance to process any of the individual acknowledgments.
                                                                                                                                  +
                                                                                                                                  2032 * However, that is more or less OK; if the other side sent RST, then they won't accept any
                                                                                                                                  +
                                                                                                                                  2033 * further data we may send after processing the acknowledgments anyway. The only other
                                                                                                                                  +
                                                                                                                                  2034 * possibility has to with graceful close, but that is not yet implemented.
                                                                                                                                  +
                                                                                                                                  2035 * @todo Revisit this when graceful close is implemented. (Preliminary idea: accumulate DATA and
                                                                                                                                  +
                                                                                                                                  2036 * FIN/etc. packets and always handle them after handling ACKs. Then the DATA/FIN stream will not
                                                                                                                                  +
                                                                                                                                  2037 * have a chance to disrupt (by initiating closing the connection) the ACK handling, while the ACK
                                                                                                                                  +
                                                                                                                                  2038 * handling should have no bearing on the DATA/FIN stream.)
                                                                                                                                  +
                                                                                                                                  2039 *
                                                                                                                                  +
                                                                                                                                  2040 * So, let's accumulate the individual acks in packet->m_rcv_acked_packets into a big
                                                                                                                                  +
                                                                                                                                  2041 * sock->m_rcv_acked_packets to be handled from perform_accumulated_on_recv_tasks() at the end of the
                                                                                                                                  +
                                                                                                                                  2042 * current handler. Similarly save m_rcv_wnd into sock->m_pending_rcv_wnd. To let that method
                                                                                                                                  +
                                                                                                                                  2043 * know sock has a new m_pending_rcv_wnd and possibly non-empty sock->m_rcv_acked_packets, insert sock
                                                                                                                                  +
                                                                                                                                  2044 * into m_socks_with_accumulated_acks. */
                                                                                                                                  +
                                                                                                                                  2045
                                                                                                                                  +
                                                                                                                                  2046 /* Note: We're not setting the actual sock->m_snd_remote_rcv_wnd until
                                                                                                                                  +
                                                                                                                                  2047 * perform_accumulated_on_recv_tasks().
                                                                                                                                  +
                                                                                                                                  2048 *
                                                                                                                                  +
                                                                                                                                  2049 * Also note: the latest ACK to arrive in this receive handler will contain the most up-to-date
                                                                                                                                  +
                                                                                                                                  2050 * rcv_wnd value (previous ones are overwritten by this). */
                                                                                                                                  +
                                                                                                                                  2051 sock->m_snd_pending_rcv_wnd = ack->m_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  2052
                                                                                                                                  +
                                                                                                                                  2053 // It's a (ref-counted) pointer copy. Note there may be 0 elements there, if it's just an m_rcv_wnd update alone.
                                                                                                                                  +
                                                                                                                                  2054 sock->m_rcv_acked_packets.insert(sock->m_rcv_acked_packets.end(), // Append.
                                                                                                                                  +
                                                                                                                                  2055 ack->m_rcv_acked_packets.begin(), ack->m_rcv_acked_packets.end());
                                                                                                                                  +
                                                                                                                                  2056 m_socks_with_accumulated_acks.insert(sock); // May already be in there.
                                                                                                                                  2057
                                                                                                                                  -
                                                                                                                                  2058 sock->m_snd_stats.received_low_lvl_ack_packet(ack->m_rcv_acked_packets.empty());
                                                                                                                                  -
                                                                                                                                  2059} // Node::handle_ack_to_established()
                                                                                                                                  -
                                                                                                                                  2060
                                                                                                                                  - -
                                                                                                                                  2062{
                                                                                                                                  -
                                                                                                                                  2063 using std::min;
                                                                                                                                  -
                                                                                                                                  2064 using std::vector;
                                                                                                                                  -
                                                                                                                                  2065 using boost::tuple;
                                                                                                                                  -
                                                                                                                                  2066 using boost::unordered_set;
                                                                                                                                  -
                                                                                                                                  2067 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  2068 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  2069 using boost::chrono::seconds;
                                                                                                                                  -
                                                                                                                                  2070
                                                                                                                                  -
                                                                                                                                  2071 /* This is a complex method that does many things. Therefore readability is hard to accomplish, as the logic
                                                                                                                                  -
                                                                                                                                  2072 * makes sense when writing it, but the big picture is hard to see when reading it. The necessary heavy commenting
                                                                                                                                  -
                                                                                                                                  2073 * further increases the size and therefore (along that dimension) decreases readability. For these reasons,
                                                                                                                                  -
                                                                                                                                  2074 * many logically distinct parts were placed into helper methods -- not to increase code reuse but to help
                                                                                                                                  -
                                                                                                                                  2075 * the aforementioned consideration. */
                                                                                                                                  +
                                                                                                                                  2058 FLOW_LOG_TRACE("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2059 "Received and accumulated [" << ack->m_type_ostream_manip << "] with "
                                                                                                                                  +
                                                                                                                                  2060 "[" << ack->m_rcv_acked_packets.size() << "] individual acknowledgments "
                                                                                                                                  +
                                                                                                                                  2061 "and rcv_wnd = [" << ack->m_rcv_wnd << "]; total for this socket in this "
                                                                                                                                  +
                                                                                                                                  2062 "receive handler is [" << sock->m_rcv_acked_packets.size() << "] individual acknowledgments.");
                                                                                                                                  +
                                                                                                                                  2063
                                                                                                                                  +
                                                                                                                                  2064 sock->m_snd_stats.received_low_lvl_ack_packet(ack->m_rcv_acked_packets.empty());
                                                                                                                                  +
                                                                                                                                  2065} // Node::handle_ack_to_established()
                                                                                                                                  +
                                                                                                                                  2066
                                                                                                                                  + +
                                                                                                                                  2068{
                                                                                                                                  +
                                                                                                                                  2069 using std::min;
                                                                                                                                  +
                                                                                                                                  2070 using std::vector;
                                                                                                                                  +
                                                                                                                                  2071 using boost::tuple;
                                                                                                                                  +
                                                                                                                                  2072 using boost::unordered_set;
                                                                                                                                  +
                                                                                                                                  2073 using boost::chrono::round;
                                                                                                                                  +
                                                                                                                                  2074 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  2075 using boost::chrono::seconds;
                                                                                                                                  2076
                                                                                                                                  -
                                                                                                                                  2077 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  2078
                                                                                                                                  -
                                                                                                                                  2079 log_accumulated_acks(sock);
                                                                                                                                  -
                                                                                                                                  2080 // Below TRACE messages omit most of the just-logged detail, since it's already logged now.
                                                                                                                                  -
                                                                                                                                  2081
                                                                                                                                  -
                                                                                                                                  2082 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  2083 using Acks = vector<Ack_packet::Individual_ack::Ptr>;
                                                                                                                                  -
                                                                                                                                  2084 Acks& acked_packets = sock->m_rcv_acked_packets;
                                                                                                                                  -
                                                                                                                                  2085 /* To not put already-handled acknowledgments up for handling again in the next run of this method
                                                                                                                                  -
                                                                                                                                  2086 * (which would be wrong), we must clear acked_packets before exiting this method. To be safe,
                                                                                                                                  -
                                                                                                                                  2087 * make sure acked_packets.clear() runs no matter how this method exits. */
                                                                                                                                  -
                                                                                                                                  2088 util::Auto_cleanup cleanup = util::setup_auto_cleanup([&]() { acked_packets.clear(); });
                                                                                                                                  -
                                                                                                                                  2089
                                                                                                                                  -
                                                                                                                                  2090 /* Handle all the acknowledgments we've received in this receive handler. Background on the
                                                                                                                                  -
                                                                                                                                  2091 * accumulation tactic is in handle_ack_to_established(). As explained in that method, some
                                                                                                                                  -
                                                                                                                                  2092 * packet between the first and last ACK received in this handler may have changed state away from
                                                                                                                                  -
                                                                                                                                  2093 * ESTABLISHED. For example, there could have been an RST. Check for that. */
                                                                                                                                  -
                                                                                                                                  2094 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  -
                                                                                                                                  2095 {
                                                                                                                                  -
                                                                                                                                  2096 // Rare/interesting enough for INFO.
                                                                                                                                  -
                                                                                                                                  2097 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2098 "Accumulated [ACK] packets with [" << acked_packets.size() << "] "
                                                                                                                                  -
                                                                                                                                  2099 "individual acknowledgments, but state is now [" << sock->m_int_state << "]; ignoring ACKs forever.");
                                                                                                                                  -
                                                                                                                                  2100 return;
                                                                                                                                  -
                                                                                                                                  2101 }
                                                                                                                                  -
                                                                                                                                  2102 // else OK. Handle the accumulated acknowledgments.
                                                                                                                                  -
                                                                                                                                  2103 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  -
                                                                                                                                  2104
                                                                                                                                  -
                                                                                                                                  2105 /* The individual acknowledgments are (sequence number, ACK delay in unit X, retransmission ID)
                                                                                                                                  -
                                                                                                                                  2106 * triples, where the latter is always zero unless retransmission is enabled. Let's handle each
                                                                                                                                  -
                                                                                                                                  2107 * one by updating m_snd_flying_pkts* (i.e., removing that packet from m_snd_flying_pkts*) and
                                                                                                                                  -
                                                                                                                                  2108 * informing congestion control. Before continuing reading the method please look at the large
                                                                                                                                  -
                                                                                                                                  2109 * comments for Peer_socket::m_snd_flying_pkts_by_{sent_when|seq_num} (drawing a diagram might also help).
                                                                                                                                  -
                                                                                                                                  2110 *
                                                                                                                                  -
                                                                                                                                  2111 * Before continuing, quick discussion of corner cases:
                                                                                                                                  -
                                                                                                                                  2112 *
                                                                                                                                  -
                                                                                                                                  2113 * Any two given such triples may have equal sequence number/retransmission ID entries. This
                                                                                                                                  -
                                                                                                                                  2114 * means that during the last ACK delay timer or boost.asio handler, while accumulating the
                                                                                                                                  -
                                                                                                                                  2115 * acknowledgments for this ACK packet, the receiver received the same packet twice (duplicate).
                                                                                                                                  -
                                                                                                                                  2116 * (This can happen due to network misbehavior; and due to ACK loss and other conditions when
                                                                                                                                  -
                                                                                                                                  2117 * retransmits are enabled.) Call 2 such packets P1 and P2, where P1 was received first and thus
                                                                                                                                  -
                                                                                                                                  2118 * appears earlier in acked_packets. How do we handle this?
                                                                                                                                  -
                                                                                                                                  2119 *
                                                                                                                                  -
                                                                                                                                  2120 * Suppose instead of being in the same ACK, P1 and P2 were in different ACKs that arrived in that
                                                                                                                                  -
                                                                                                                                  2121 * order, P1 and P2 (something that certainly could happen depending on how the delayed ACK timer
                                                                                                                                  -
                                                                                                                                  2122 * works out). That situation is basically the same (except that if they're in one ACK there's
                                                                                                                                  -
                                                                                                                                  2123 * the added guarantee that we KNOW what P1 is acknowledging arrived to the receiver before
                                                                                                                                  -
                                                                                                                                  2124 * what P2 was acknowledging did, which is even more solid knowledge). Therefore, it makes sense
                                                                                                                                  -
                                                                                                                                  2125 * to simply handle each acknowledgment in the ACK in the order they're listed in acked_packets.
                                                                                                                                  -
                                                                                                                                  2126 * The 2nd, 3rd, etc. occurrence will thus be treated the same way as if it arrived in a later
                                                                                                                                  -
                                                                                                                                  2127 * ACK. */
                                                                                                                                  -
                                                                                                                                  2128
                                                                                                                                  -
                                                                                                                                  2129 /* Congestion control: First see introduction to this topic in class Congestion_control_strategy
                                                                                                                                  -
                                                                                                                                  2130 * doc header. Then resume here.
                                                                                                                                  -
                                                                                                                                  2131 *
                                                                                                                                  -
                                                                                                                                  2132 * Since information stored in ACKs is of paramount importance to how congestion control views the
                                                                                                                                  -
                                                                                                                                  2133 * pipe, congestion control is very relevant in this method: this method is the main (but not
                                                                                                                                  -
                                                                                                                                  2134 * only) source of events for m_snd_cong_ctl.
                                                                                                                                  -
                                                                                                                                  2135 *
                                                                                                                                  -
                                                                                                                                  2136 * These ACK-based events are of interest to m_snd_cong_ctl:
                                                                                                                                  +
                                                                                                                                  2077 /* This is a complex method that does many things. Therefore readability is hard to accomplish, as the logic
                                                                                                                                  +
                                                                                                                                  2078 * makes sense when writing it, but the big picture is hard to see when reading it. The necessary heavy commenting
                                                                                                                                  +
                                                                                                                                  2079 * further increases the size and therefore (along that dimension) decreases readability. For these reasons,
                                                                                                                                  +
                                                                                                                                  2080 * many logically distinct parts were placed into helper methods -- not to increase code reuse but to help
                                                                                                                                  +
                                                                                                                                  2081 * the aforementioned consideration. */
                                                                                                                                  +
                                                                                                                                  2082
                                                                                                                                  +
                                                                                                                                  2083 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  2084
                                                                                                                                  +
                                                                                                                                  2085 log_accumulated_acks(sock);
                                                                                                                                  +
                                                                                                                                  2086 // Below TRACE messages omit most of the just-logged detail, since it's already logged now.
                                                                                                                                  +
                                                                                                                                  2087
                                                                                                                                  +
                                                                                                                                  2088 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  2089 using Acks = vector<Ack_packet::Individual_ack::Ptr>;
                                                                                                                                  +
                                                                                                                                  2090 Acks& acked_packets = sock->m_rcv_acked_packets;
                                                                                                                                  +
                                                                                                                                  2091 /* To not put already-handled acknowledgments up for handling again in the next run of this method
                                                                                                                                  +
                                                                                                                                  2092 * (which would be wrong), we must clear acked_packets before exiting this method. To be safe,
                                                                                                                                  +
                                                                                                                                  2093 * make sure acked_packets.clear() runs no matter how this method exits. */
                                                                                                                                  +
                                                                                                                                  2094 util::Auto_cleanup cleanup = util::setup_auto_cleanup([&]() { acked_packets.clear(); });
                                                                                                                                  +
                                                                                                                                  2095
                                                                                                                                  +
                                                                                                                                  2096 /* Handle all the acknowledgments we've received in this receive handler. Background on the
                                                                                                                                  +
                                                                                                                                  2097 * accumulation tactic is in handle_ack_to_established(). As explained in that method, some
                                                                                                                                  +
                                                                                                                                  2098 * packet between the first and last ACK received in this handler may have changed state away from
                                                                                                                                  +
                                                                                                                                  2099 * ESTABLISHED. For example, there could have been an RST. Check for that. */
                                                                                                                                  +
                                                                                                                                  2100 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  2101 {
                                                                                                                                  +
                                                                                                                                  2102 // Rare/interesting enough for INFO.
                                                                                                                                  +
                                                                                                                                  2103 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2104 "Accumulated [ACK] packets with [" << acked_packets.size() << "] "
                                                                                                                                  +
                                                                                                                                  2105 "individual acknowledgments, but state is now [" << sock->m_int_state << "]; ignoring ACKs forever.");
                                                                                                                                  +
                                                                                                                                  2106 return;
                                                                                                                                  +
                                                                                                                                  2107 }
                                                                                                                                  +
                                                                                                                                  2108 // else OK. Handle the accumulated acknowledgments.
                                                                                                                                  +
                                                                                                                                  2109 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  +
                                                                                                                                  2110
                                                                                                                                  +
                                                                                                                                  2111 /* The individual acknowledgments are (sequence number, ACK delay in unit X, retransmission ID)
                                                                                                                                  +
                                                                                                                                  2112 * triples, where the latter is always zero unless retransmission is enabled. Let's handle each
                                                                                                                                  +
                                                                                                                                  2113 * one by updating m_snd_flying_pkts* (i.e., removing that packet from m_snd_flying_pkts*) and
                                                                                                                                  +
                                                                                                                                  2114 * informing congestion control. Before continuing reading the method please look at the large
                                                                                                                                  +
                                                                                                                                  2115 * comments for Peer_socket::m_snd_flying_pkts_by_{sent_when|seq_num} (drawing a diagram might also help).
                                                                                                                                  +
                                                                                                                                  2116 *
                                                                                                                                  +
                                                                                                                                  2117 * Before continuing, quick discussion of corner cases:
                                                                                                                                  +
                                                                                                                                  2118 *
                                                                                                                                  +
                                                                                                                                  2119 * Any two given such triples may have equal sequence number/retransmission ID entries. This
                                                                                                                                  +
                                                                                                                                  2120 * means that during the last ACK delay timer or boost.asio handler, while accumulating the
                                                                                                                                  +
                                                                                                                                  2121 * acknowledgments for this ACK packet, the receiver received the same packet twice (duplicate).
                                                                                                                                  +
                                                                                                                                  2122 * (This can happen due to network misbehavior; and due to ACK loss and other conditions when
                                                                                                                                  +
                                                                                                                                  2123 * retransmits are enabled.) Call 2 such packets P1 and P2, where P1 was received first and thus
                                                                                                                                  +
                                                                                                                                  2124 * appears earlier in acked_packets. How do we handle this?
                                                                                                                                  +
                                                                                                                                  2125 *
                                                                                                                                  +
                                                                                                                                  2126 * Suppose instead of being in the same ACK, P1 and P2 were in different ACKs that arrived in that
                                                                                                                                  +
                                                                                                                                  2127 * order, P1 and P2 (something that certainly could happen depending on how the delayed ACK timer
                                                                                                                                  +
                                                                                                                                  2128 * works out). That situation is basically the same (except that if they're in one ACK there's
                                                                                                                                  +
                                                                                                                                  2129 * the added guarantee that we KNOW what P1 is acknowledging arrived to the receiver before
                                                                                                                                  +
                                                                                                                                  2130 * what P2 was acknowledging did, which is even more solid knowledge). Therefore, it makes sense
                                                                                                                                  +
                                                                                                                                  2131 * to simply handle each acknowledgment in the ACK in the order they're listed in acked_packets.
                                                                                                                                  +
                                                                                                                                  2132 * The 2nd, 3rd, etc. occurrence will thus be treated the same way as if it arrived in a later
                                                                                                                                  +
                                                                                                                                  2133 * ACK. */
                                                                                                                                  +
                                                                                                                                  2134
                                                                                                                                  +
                                                                                                                                  2135 /* Congestion control: First see introduction to this topic in class Congestion_control_strategy
                                                                                                                                  +
                                                                                                                                  2136 * doc header. Then resume here.
                                                                                                                                  2137 *
                                                                                                                                  -
                                                                                                                                  2138 * - on_acks(N, M): N bytes in M packets have just been converted from In-flight to
                                                                                                                                  -
                                                                                                                                  2139 * Acknowledged. Note that these packets have NOT been previously Acknowledged or considered
                                                                                                                                  -
                                                                                                                                  2140 * Dropped (they are In-flight just before the ACK).
                                                                                                                                  -
                                                                                                                                  2141 * - This should also be immediately preceded with M on_individual_ack(N', T, CWND) events, where N'
                                                                                                                                  -
                                                                                                                                  2142 * is the # of bytes in the individual acked packet; and T is the RTT of the packet, and CWND is the
                                                                                                                                  -
                                                                                                                                  2143 * # of bytes in cwnd that was used when the acked data pkt was sent.
                                                                                                                                  -
                                                                                                                                  2144 * In the rest of the discussion I omit this event, as it can be thought of as part of
                                                                                                                                  -
                                                                                                                                  2145 * on_acks() for purposes of the discussion.
                                                                                                                                  -
                                                                                                                                  2146 * - on_loss_event(N', M'): N' bytes in M' packets have just been converted from In-flight to
                                                                                                                                  -
                                                                                                                                  2147 * Dropped.
                                                                                                                                  -
                                                                                                                                  2148 *
                                                                                                                                  -
                                                                                                                                  2149 * The basic idea is to determine which of these events are implied by the acks passed to this
                                                                                                                                  -
                                                                                                                                  2150 * method, inform m_snd_cong_ctl, and then check if the new m_snd_cong_ctl->congestion_window_bytes()
                                                                                                                                  -
                                                                                                                                  2151 * value (a/k/a CWND) -- if it has changed -- allows us to now send more bytes (if we have any).
                                                                                                                                  -
                                                                                                                                  2152 *
                                                                                                                                  -
                                                                                                                                  2153 * An important decision (and one sadly not very explicitly exposed [perhaps as an exercise to the
                                                                                                                                  -
                                                                                                                                  2154 * reader, or to avoid being too rigid] in the various TCP RFCs) is how to group these events and
                                                                                                                                  -
                                                                                                                                  2155 * in what order. In other words, do we call on_acks(N, 1) for each acknowledged packet? Do we
                                                                                                                                  -
                                                                                                                                  2156 * then check for drops and call on_loss_event(N', M') immediately, or wait to process all acked
                                                                                                                                  -
                                                                                                                                  2157 * packets first?
                                                                                                                                  +
                                                                                                                                  2138 * Since information stored in ACKs is of paramount importance to how congestion control views the
                                                                                                                                  +
                                                                                                                                  2139 * pipe, congestion control is very relevant in this method: this method is the main (but not
                                                                                                                                  +
                                                                                                                                  2140 * only) source of events for m_snd_cong_ctl.
                                                                                                                                  +
                                                                                                                                  2141 *
                                                                                                                                  +
                                                                                                                                  2142 * These ACK-based events are of interest to m_snd_cong_ctl:
                                                                                                                                  +
                                                                                                                                  2143 *
                                                                                                                                  +
                                                                                                                                  2144 * - on_acks(N, M): N bytes in M packets have just been converted from In-flight to
                                                                                                                                  +
                                                                                                                                  2145 * Acknowledged. Note that these packets have NOT been previously Acknowledged or considered
                                                                                                                                  +
                                                                                                                                  2146 * Dropped (they are In-flight just before the ACK).
                                                                                                                                  +
                                                                                                                                  2147 * - This should also be immediately preceded with M on_individual_ack(N', T, CWND) events, where N'
                                                                                                                                  +
                                                                                                                                  2148 * is the # of bytes in the individual acked packet; and T is the RTT of the packet, and CWND is the
                                                                                                                                  +
                                                                                                                                  2149 * # of bytes in cwnd that was used when the acked data pkt was sent.
                                                                                                                                  +
                                                                                                                                  2150 * In the rest of the discussion I omit this event, as it can be thought of as part of
                                                                                                                                  +
                                                                                                                                  2151 * on_acks() for purposes of the discussion.
                                                                                                                                  +
                                                                                                                                  2152 * - on_loss_event(N', M'): N' bytes in M' packets have just been converted from In-flight to
                                                                                                                                  +
                                                                                                                                  2153 * Dropped.
                                                                                                                                  +
                                                                                                                                  2154 *
                                                                                                                                  +
                                                                                                                                  2155 * The basic idea is to determine which of these events are implied by the acks passed to this
                                                                                                                                  +
                                                                                                                                  2156 * method, inform m_snd_cong_ctl, and then check if the new m_snd_cong_ctl->congestion_window_bytes()
                                                                                                                                  +
                                                                                                                                  2157 * value (a/k/a CWND) -- if it has changed -- allows us to now send more bytes (if we have any).
                                                                                                                                  2158 *
                                                                                                                                  -
                                                                                                                                  2159 * The answer we choose is simple. First, scan all individual (i.e., for each sent packet) acks
                                                                                                                                  -
                                                                                                                                  2160 * given to us and update m_snd_flying_pkts_by_seq_num (the "scoreboard"). While doing so keep track of
                                                                                                                                  -
                                                                                                                                  2161 * the cumulative N and M. Having done that, we will also expose zero or more In-flight packets
                                                                                                                                  -
                                                                                                                                  2162 * as Dropped. (In this method, a given packet is exposed as Dropped if the total number of
                                                                                                                                  -
                                                                                                                                  2163 * acknowledged packets AFTER that packet exceeds a constant like 2. So basically if the acks we
                                                                                                                                  -
                                                                                                                                  2164 * process here make that counter exceed that limit for a given packet P, P is Dropped and removed
                                                                                                                                  -
                                                                                                                                  2165 * from m_snd_flying_pkts_by_seq_num.) So after the ack scanning phase, tally up all packets now
                                                                                                                                  -
                                                                                                                                  2166 * considered Dropped, which gives us N' and M'.
                                                                                                                                  -
                                                                                                                                  2167 *
                                                                                                                                  -
                                                                                                                                  2168 * Finally, call on_loss_event(N', M') (assuming N' and M' are not zero). And then call
                                                                                                                                  -
                                                                                                                                  2169 * on_acks(M, N) (assuming N and M are not zero).
                                                                                                                                  -
                                                                                                                                  2170 *
                                                                                                                                  -
                                                                                                                                  2171 * Let's justify this. First, assume it's correct to tally these things up and then just
                                                                                                                                  -
                                                                                                                                  2172 * call each method once. Is the "report loss, report acks" order right? Yes. Intuitively,
                                                                                                                                  -
                                                                                                                                  2173 * m_snd_cong_ctl wants to know about events in the chronological order they occur. While the Drop(s)
                                                                                                                                  -
                                                                                                                                  2174 * are detected at the same time as the Ack(s), the actual packet dropping INFERRED from the
                                                                                                                                  -
                                                                                                                                  2175 * Ack(s) occurred in the past; we're only deducing it now. The received Acks are in fact for
                                                                                                                                  -
                                                                                                                                  2176 * packets AFTER the now-Dropped packets. Hence this is the right order.
                                                                                                                                  -
                                                                                                                                  2177 *
                                                                                                                                  -
                                                                                                                                  2178 * Now the only remaining thing is to justify combining the ack and drop events in one (each). For
                                                                                                                                  -
                                                                                                                                  2179 * acknowledgments, it's straightforward: so far, most Congestion_control_strategy modules
                                                                                                                                  -
                                                                                                                                  2180 * don't need to know about each individual ack, so for simplicity/efficiency we can just combine
                                                                                                                                  -
                                                                                                                                  2181 * them. (However, some algorithms do need it; e.g., FAST would need it; still, many don't.
                                                                                                                                  -
                                                                                                                                  2182 * Other modules, like Send_bandwidth_estimator, may also care about individual acks.)
                                                                                                                                  +
                                                                                                                                  2159 * An important decision (and one sadly not very explicitly exposed [perhaps as an exercise to the
                                                                                                                                  +
                                                                                                                                  2160 * reader, or to avoid being too rigid] in the various TCP RFCs) is how to group these events and
                                                                                                                                  +
                                                                                                                                  2161 * in what order. In other words, do we call on_acks(N, 1) for each acknowledged packet? Do we
                                                                                                                                  +
                                                                                                                                  2162 * then check for drops and call on_loss_event(N', M') immediately, or wait to process all acked
                                                                                                                                  +
                                                                                                                                  2163 * packets first?
                                                                                                                                  +
                                                                                                                                  2164 *
                                                                                                                                  +
                                                                                                                                  2165 * The answer we choose is simple. First, scan all individual (i.e., for each sent packet) acks
                                                                                                                                  +
                                                                                                                                  2166 * given to us and update m_snd_flying_pkts_by_seq_num (the "scoreboard"). While doing so keep track of
                                                                                                                                  +
                                                                                                                                  2167 * the cumulative N and M. Having done that, we will also expose zero or more In-flight packets
                                                                                                                                  +
                                                                                                                                  2168 * as Dropped. (In this method, a given packet is exposed as Dropped if the total number of
                                                                                                                                  +
                                                                                                                                  2169 * acknowledged packets AFTER that packet exceeds a constant like 2. So basically if the acks we
                                                                                                                                  +
                                                                                                                                  2170 * process here make that counter exceed that limit for a given packet P, P is Dropped and removed
                                                                                                                                  +
                                                                                                                                  2171 * from m_snd_flying_pkts_by_seq_num.) So after the ack scanning phase, tally up all packets now
                                                                                                                                  +
                                                                                                                                  2172 * considered Dropped, which gives us N' and M'.
                                                                                                                                  +
                                                                                                                                  2173 *
                                                                                                                                  +
                                                                                                                                  2174 * Finally, call on_loss_event(N', M') (assuming N' and M' are not zero). And then call
                                                                                                                                  +
                                                                                                                                  2175 * on_acks(M, N) (assuming N and M are not zero).
                                                                                                                                  +
                                                                                                                                  2176 *
                                                                                                                                  +
                                                                                                                                  2177 * Let's justify this. First, assume it's correct to tally these things up and then just
                                                                                                                                  +
                                                                                                                                  2178 * call each method once. Is the "report loss, report acks" order right? Yes. Intuitively,
                                                                                                                                  +
                                                                                                                                  2179 * m_snd_cong_ctl wants to know about events in the chronological order they occur. While the Drop(s)
                                                                                                                                  +
                                                                                                                                  2180 * are detected at the same time as the Ack(s), the actual packet dropping INFERRED from the
                                                                                                                                  +
                                                                                                                                  2181 * Ack(s) occurred in the past; we're only deducing it now. The received Acks are in fact for
                                                                                                                                  +
                                                                                                                                  2182 * packets AFTER the now-Dropped packets. Hence this is the right order.
                                                                                                                                  2183 *
                                                                                                                                  -
                                                                                                                                  2184 * What about the drop events? Why combine all the drops into one? Should we include all the
                                                                                                                                  -
                                                                                                                                  2185 * drops into the one? To answer, I use as a reference DCCP CCID 2 RFC 4341 (standards track)
                                                                                                                                  -
                                                                                                                                  2186 * which describes a protocol similar to ours and implies the following model. Basically, over
                                                                                                                                  -
                                                                                                                                  2187 * time, the pipe experiences a series of 0 or more congestion events (more accurately loss
                                                                                                                                  -
                                                                                                                                  2188 * events). Two loss events cannot overlap in this implied model. Thus any given Dropped packet
                                                                                                                                  -
                                                                                                                                  2189 * belongs to exactly one loss event. Here is how the RFC (section 5) more or less formally
                                                                                                                                  -
                                                                                                                                  2190 * defines whether 2 packets belong to one event: "As in TCP, two losses [...] are considered part
                                                                                                                                  -
                                                                                                                                  2191 * of a single congestion event when the second packet was sent before the loss [...] of the first
                                                                                                                                  -
                                                                                                                                  2192 * packet was detected." Presumably the text also assumes that the "second" packet was
                                                                                                                                  -
                                                                                                                                  2193 * found to be dropped either at the same or later time as the "first" packet was found to be
                                                                                                                                  -
                                                                                                                                  2194 * dropped (otherwise the text makes no sense, as the very earliest Dropped packet would be in the
                                                                                                                                  -
                                                                                                                                  2195 * same congestion event as the very last Dropped packed in a very long session). Let's build an
                                                                                                                                  -
                                                                                                                                  2196 * algorithm inductively based on this definition.
                                                                                                                                  -
                                                                                                                                  2197 *
                                                                                                                                  -
                                                                                                                                  2198 * At first there are no loss events. We get a group of acks which render another group of
                                                                                                                                  -
                                                                                                                                  2199 * packets P1, P2, ... (in order of increasing sequence number) Dropped. Certainly P1 is in a
                                                                                                                                  -
                                                                                                                                  2200 * loss event; call it L1. P2 was found to be dropped at the same or later time as P1; and it was
                                                                                                                                  -
                                                                                                                                  2201 * obviously sent before L1 was detected (which was NOW; call it T1). So P2 is in loss event L1.
                                                                                                                                  -
                                                                                                                                  2202 * Similarly, so is P3, P4, .... Now let's say some time passes and we get more acks and thus
                                                                                                                                  -
                                                                                                                                  2203 * dropped packets P7, P8, P9, .... Suppose P7 was sent before T1 (but found Dropped at T2 > T1),
                                                                                                                                  -
                                                                                                                                  2204 * which is quite possible (e.g., T2 could be just after T1). Then by the above definition P7 is
                                                                                                                                  -
                                                                                                                                  2205 * in loss event L1 (no new loss event). P8 could be in the same situation. In fact, all Dropped
                                                                                                                                  -
                                                                                                                                  2206 * packets from this ack group may be in L1. Suppose, conversely, that P9 was sent AFTER T1. By
                                                                                                                                  -
                                                                                                                                  2207 * the above definition, it is part of a new loss event L2, detected at T2. Now P10, is certainly
                                                                                                                                  -
                                                                                                                                  2208 * in L2 as well, since it was sent before T2, obviously. Thus we can, for each Dropped packet P,
                                                                                                                                  -
                                                                                                                                  2209 * determine whether it's part of the preceding loss event or part of a new one.
                                                                                                                                  -
                                                                                                                                  2210 *
                                                                                                                                  -
                                                                                                                                  2211 * Intuitively, it makes sense as well. If, say, we got 5 dropped packets at the same time, and
                                                                                                                                  -
                                                                                                                                  2212 * informed Congestion_control_classic (Reno) with 5 calls to on_loss_event(), then CWND would get
                                                                                                                                  -
                                                                                                                                  2213 * halved 5 times! Intuitively that's not right (and way too conservative). More likely the 5
                                                                                                                                  -
                                                                                                                                  2214 * packets belong to the same congestion or loss event, so CWND should only be halved once. Then
                                                                                                                                  -
                                                                                                                                  2215 * the only question is how to group packets into separate loss events. The above algorithm,
                                                                                                                                  -
                                                                                                                                  2216 * roughly speaking, considers two packets as part of the same loss event if they're within an RTT
                                                                                                                                  -
                                                                                                                                  2217 * of each other (indeed RFC 4341 says one can use the SRTT to approximate the above algorithm,
                                                                                                                                  -
                                                                                                                                  2218 * although we choose to use the exact definition instead).
                                                                                                                                  -
                                                                                                                                  2219 *
                                                                                                                                  -
                                                                                                                                  2220 * Therefore the final algorithm is justified and is as follows:
                                                                                                                                  -
                                                                                                                                  2221 *
                                                                                                                                  -
                                                                                                                                  2222 * 0. Before the current method is ever called, set time stamp m_snd_last_loss_event_when =
                                                                                                                                  -
                                                                                                                                  2223 * -infinity.
                                                                                                                                  -
                                                                                                                                  2224 * 1. Scan all acknowledgments, updating m_snd_flying_pkts* and m_snd_flying_bytes.
                                                                                                                                  -
                                                                                                                                  2225 * Keep track of total acknowledgment stats (bytes and packets). (Inform side modules like
                                                                                                                                  -
                                                                                                                                  2226 * Send_bandwidth_estimator with any required individual ack info like RTTs.)
                                                                                                                                  -
                                                                                                                                  2227 * Ignore acks of packets not in m_snd_flying_pkts* (not In-flight).
                                                                                                                                  -
                                                                                                                                  2228 * 2. Tally up which packets are exposed as Dropped by the above m_snd_flying_pkts* updates.
                                                                                                                                  -
                                                                                                                                  2229 * Keep track of total loss stats (bytes and packets). However, when doing the latter ignore
                                                                                                                                  -
                                                                                                                                  2230 * any packet P for which P.m_sent_when < m_snd_last_loss_event_when.
                                                                                                                                  -
                                                                                                                                  2231 * 3. If at least 1 packet exposed as Dropped in step 2, call
                                                                                                                                  -
                                                                                                                                  2232 * m_snd_cong_ctl->on_loss_event(...stats...); and set m_snd_last_loss_event_when to the current time,
                                                                                                                                  -
                                                                                                                                  2233 * marking this the start of a new loss event.
                                                                                                                                  -
                                                                                                                                  2234 * 4. If at least 1 packet exposed as Acknowledged in step 1, call
                                                                                                                                  -
                                                                                                                                  2235 * m_snd_cong_ctl->on_acks(...stats...). */
                                                                                                                                  -
                                                                                                                                  2236
                                                                                                                                  -
                                                                                                                                  2237 // Set up work state and save certain "before" values.
                                                                                                                                  -
                                                                                                                                  2238
                                                                                                                                  -
                                                                                                                                  2239 // For RTT at least. Use steady, high-res clock. Use one coherent value for entire method to simulate simultaneity.
                                                                                                                                  -
                                                                                                                                  2240 const Fine_time_pt time_now = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  2241
                                                                                                                                  -
                                                                                                                                  2242 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  2243 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  2244 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  -
                                                                                                                                  2245 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  2246 /* These guys are only stored in Peer_socket (instead of creating locally here) for a bit of performance. Reuse now.
                                                                                                                                  -
                                                                                                                                  2247 * Note that clear() is a very fast operation; it will essentially just set the internal element count to 0. */
                                                                                                                                  -
                                                                                                                                  2248 auto& pkts_marked_to_drop = sock->m_snd_temp_pkts_marked_to_drop;
                                                                                                                                  -
                                                                                                                                  2249 pkts_marked_to_drop.clear();
                                                                                                                                  -
                                                                                                                                  2250
                                                                                                                                  -
                                                                                                                                  2251 // To check, at the end, whether we've changed can_send() false => true.
                                                                                                                                  -
                                                                                                                                  2252 const bool could_send_before_acks = can_send(sock);
                                                                                                                                  -
                                                                                                                                  2253 // To check, at the end, whether we've changed snd_deqable() false => true.
                                                                                                                                  -
                                                                                                                                  2254 const bool had_rexmit_data_before_acks = !sock->m_snd_rexmit_q.empty();
                                                                                                                                  -
                                                                                                                                  2255
                                                                                                                                  -
                                                                                                                                  2256 /* Includes each order number (unique packet ID) for which the packet was acknowledged.
                                                                                                                                  -
                                                                                                                                  2257 * Used for Drop_timer events to register at the bottom; and also to feed the priority queue high_ack_count_q
                                                                                                                                  -
                                                                                                                                  2258 * (explained below in detail). */
                                                                                                                                  -
                                                                                                                                  2259 unordered_set<Peer_socket::order_num_t> flying_now_acked_pkts;
                                                                                                                                  -
                                                                                                                                  2260
                                                                                                                                  -
                                                                                                                                  2261 // These are the N, M arguments to on_acks() described just above in big comment.
                                                                                                                                  -
                                                                                                                                  2262 size_t clean_acked_bytes = 0;
                                                                                                                                  -
                                                                                                                                  2263 size_t clean_acked_packets = 0;
                                                                                                                                  -
                                                                                                                                  2264
                                                                                                                                  -
                                                                                                                                  2265 /* The are the individual T, N' (RTT, acked_bytes, sent_cwnd_bytes) arguments to pass to on_individual_ack() described
                                                                                                                                  -
                                                                                                                                  2266 * just above in big comment. We will be accumulating these across all the acks in the loop below. */
                                                                                                                                  -
                                                                                                                                  2267 using Clean_acked_packet = tuple<Fine_duration, size_t, size_t>;
                                                                                                                                  -
                                                                                                                                  2268 vector<Clean_acked_packet> clean_acked_packet_events;
                                                                                                                                  -
                                                                                                                                  2269 clean_acked_packet_events.reserve(min(acked_packets.size(), snd_flying_pkts_by_when.size())); // Small optimization.
                                                                                                                                  +
                                                                                                                                  2184 * Now the only remaining thing is to justify combining the ack and drop events in one (each). For
                                                                                                                                  +
                                                                                                                                  2185 * acknowledgments, it's straightforward: so far, most Congestion_control_strategy modules
                                                                                                                                  +
                                                                                                                                  2186 * don't need to know about each individual ack, so for simplicity/efficiency we can just combine
                                                                                                                                  +
                                                                                                                                  2187 * them. (However, some algorithms do need it; e.g., FAST would need it; still, many don't.
                                                                                                                                  +
                                                                                                                                  2188 * Other modules, like Send_bandwidth_estimator, may also care about individual acks.)
                                                                                                                                  +
                                                                                                                                  2189 *
                                                                                                                                  +
                                                                                                                                  2190 * What about the drop events? Why combine all the drops into one? Should we include all the
                                                                                                                                  +
                                                                                                                                  2191 * drops into the one? To answer, I use as a reference DCCP CCID 2 RFC 4341 (standards track)
                                                                                                                                  +
                                                                                                                                  2192 * which describes a protocol similar to ours and implies the following model. Basically, over
                                                                                                                                  +
                                                                                                                                  2193 * time, the pipe experiences a series of 0 or more congestion events (more accurately loss
                                                                                                                                  +
                                                                                                                                  2194 * events). Two loss events cannot overlap in this implied model. Thus any given Dropped packet
                                                                                                                                  +
                                                                                                                                  2195 * belongs to exactly one loss event. Here is how the RFC (section 5) more or less formally
                                                                                                                                  +
                                                                                                                                  2196 * defines whether 2 packets belong to one event: "As in TCP, two losses [...] are considered part
                                                                                                                                  +
                                                                                                                                  2197 * of a single congestion event when the second packet was sent before the loss [...] of the first
                                                                                                                                  +
                                                                                                                                  2198 * packet was detected." Presumably the text also assumes that the "second" packet was
                                                                                                                                  +
                                                                                                                                  2199 * found to be dropped either at the same or later time as the "first" packet was found to be
                                                                                                                                  +
                                                                                                                                  2200 * dropped (otherwise the text makes no sense, as the very earliest Dropped packet would be in the
                                                                                                                                  +
                                                                                                                                  2201 * same congestion event as the very last Dropped packed in a very long session). Let's build an
                                                                                                                                  +
                                                                                                                                  2202 * algorithm inductively based on this definition.
                                                                                                                                  +
                                                                                                                                  2203 *
                                                                                                                                  +
                                                                                                                                  2204 * At first there are no loss events. We get a group of acks which render another group of
                                                                                                                                  +
                                                                                                                                  2205 * packets P1, P2, ... (in order of increasing sequence number) Dropped. Certainly P1 is in a
                                                                                                                                  +
                                                                                                                                  2206 * loss event; call it L1. P2 was found to be dropped at the same or later time as P1; and it was
                                                                                                                                  +
                                                                                                                                  2207 * obviously sent before L1 was detected (which was NOW; call it T1). So P2 is in loss event L1.
                                                                                                                                  +
                                                                                                                                  2208 * Similarly, so is P3, P4, .... Now let's say some time passes and we get more acks and thus
                                                                                                                                  +
                                                                                                                                  2209 * dropped packets P7, P8, P9, .... Suppose P7 was sent before T1 (but found Dropped at T2 > T1),
                                                                                                                                  +
                                                                                                                                  2210 * which is quite possible (e.g., T2 could be just after T1). Then by the above definition P7 is
                                                                                                                                  +
                                                                                                                                  2211 * in loss event L1 (no new loss event). P8 could be in the same situation. In fact, all Dropped
                                                                                                                                  +
                                                                                                                                  2212 * packets from this ack group may be in L1. Suppose, conversely, that P9 was sent AFTER T1. By
                                                                                                                                  +
                                                                                                                                  2213 * the above definition, it is part of a new loss event L2, detected at T2. Now P10, is certainly
                                                                                                                                  +
                                                                                                                                  2214 * in L2 as well, since it was sent before T2, obviously. Thus we can, for each Dropped packet P,
                                                                                                                                  +
                                                                                                                                  2215 * determine whether it's part of the preceding loss event or part of a new one.
                                                                                                                                  +
                                                                                                                                  2216 *
                                                                                                                                  +
                                                                                                                                  2217 * Intuitively, it makes sense as well. If, say, we got 5 dropped packets at the same time, and
                                                                                                                                  +
                                                                                                                                  2218 * informed Congestion_control_classic (Reno) with 5 calls to on_loss_event(), then CWND would get
                                                                                                                                  +
                                                                                                                                  2219 * halved 5 times! Intuitively that's not right (and way too conservative). More likely the 5
                                                                                                                                  +
                                                                                                                                  2220 * packets belong to the same congestion or loss event, so CWND should only be halved once. Then
                                                                                                                                  +
                                                                                                                                  2221 * the only question is how to group packets into separate loss events. The above algorithm,
                                                                                                                                  +
                                                                                                                                  2222 * roughly speaking, considers two packets as part of the same loss event if they're within an RTT
                                                                                                                                  +
                                                                                                                                  2223 * of each other (indeed RFC 4341 says one can use the SRTT to approximate the above algorithm,
                                                                                                                                  +
                                                                                                                                  2224 * although we choose to use the exact definition instead).
                                                                                                                                  +
                                                                                                                                  2225 *
                                                                                                                                  +
                                                                                                                                  2226 * Therefore the final algorithm is justified and is as follows:
                                                                                                                                  +
                                                                                                                                  2227 *
                                                                                                                                  +
                                                                                                                                  2228 * 0. Before the current method is ever called, set time stamp m_snd_last_loss_event_when =
                                                                                                                                  +
                                                                                                                                  2229 * -infinity.
                                                                                                                                  +
                                                                                                                                  2230 * 1. Scan all acknowledgments, updating m_snd_flying_pkts* and m_snd_flying_bytes.
                                                                                                                                  +
                                                                                                                                  2231 * Keep track of total acknowledgment stats (bytes and packets). (Inform side modules like
                                                                                                                                  +
                                                                                                                                  2232 * Send_bandwidth_estimator with any required individual ack info like RTTs.)
                                                                                                                                  +
                                                                                                                                  2233 * Ignore acks of packets not in m_snd_flying_pkts* (not In-flight).
                                                                                                                                  +
                                                                                                                                  2234 * 2. Tally up which packets are exposed as Dropped by the above m_snd_flying_pkts* updates.
                                                                                                                                  +
                                                                                                                                  2235 * Keep track of total loss stats (bytes and packets). However, when doing the latter ignore
                                                                                                                                  +
                                                                                                                                  2236 * any packet P for which P.m_sent_when < m_snd_last_loss_event_when.
                                                                                                                                  +
                                                                                                                                  2237 * 3. If at least 1 packet exposed as Dropped in step 2, call
                                                                                                                                  +
                                                                                                                                  2238 * m_snd_cong_ctl->on_loss_event(...stats...); and set m_snd_last_loss_event_when to the current time,
                                                                                                                                  +
                                                                                                                                  2239 * marking this the start of a new loss event.
                                                                                                                                  +
                                                                                                                                  2240 * 4. If at least 1 packet exposed as Acknowledged in step 1, call
                                                                                                                                  +
                                                                                                                                  2241 * m_snd_cong_ctl->on_acks(...stats...). */
                                                                                                                                  +
                                                                                                                                  2242
                                                                                                                                  +
                                                                                                                                  2243 // Set up work state and save certain "before" values.
                                                                                                                                  +
                                                                                                                                  2244
                                                                                                                                  +
                                                                                                                                  2245 // For RTT at least. Use steady, high-res clock. Use one coherent value for entire method to simulate simultaneity.
                                                                                                                                  +
                                                                                                                                  2246 const Fine_time_pt time_now = Fine_clock::now();
                                                                                                                                  +
                                                                                                                                  2247
                                                                                                                                  +
                                                                                                                                  2248 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  2249 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  2250 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  +
                                                                                                                                  2251 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  2252 /* These guys are only stored in Peer_socket (instead of creating locally here) for a bit of performance. Reuse now.
                                                                                                                                  +
                                                                                                                                  2253 * Note that clear() is a very fast operation; it will essentially just set the internal element count to 0. */
                                                                                                                                  +
                                                                                                                                  2254 auto& pkts_marked_to_drop = sock->m_snd_temp_pkts_marked_to_drop;
                                                                                                                                  +
                                                                                                                                  2255 pkts_marked_to_drop.clear();
                                                                                                                                  +
                                                                                                                                  2256
                                                                                                                                  +
                                                                                                                                  2257 // To check, at the end, whether we've changed can_send() false => true.
                                                                                                                                  +
                                                                                                                                  2258 const bool could_send_before_acks = can_send(sock);
                                                                                                                                  +
                                                                                                                                  2259 // To check, at the end, whether we've changed snd_deqable() false => true.
                                                                                                                                  +
                                                                                                                                  2260 const bool had_rexmit_data_before_acks = !sock->m_snd_rexmit_q.empty();
                                                                                                                                  +
                                                                                                                                  2261
                                                                                                                                  +
                                                                                                                                  2262 /* Includes each order number (unique packet ID) for which the packet was acknowledged.
                                                                                                                                  +
                                                                                                                                  2263 * Used for Drop_timer events to register at the bottom; and also to feed the priority queue high_ack_count_q
                                                                                                                                  +
                                                                                                                                  2264 * (explained below in detail). */
                                                                                                                                  +
                                                                                                                                  2265 unordered_set<Peer_socket::order_num_t> flying_now_acked_pkts;
                                                                                                                                  +
                                                                                                                                  2266
                                                                                                                                  +
                                                                                                                                  2267 // These are the N, M arguments to on_acks() described just above in big comment.
                                                                                                                                  +
                                                                                                                                  2268 size_t clean_acked_bytes = 0;
                                                                                                                                  +
                                                                                                                                  2269 size_t clean_acked_packets = 0;
                                                                                                                                  2270
                                                                                                                                  -
                                                                                                                                  2271 /* Handle each acknowledgment in the order that the corresponding packet was received by other
                                                                                                                                  -
                                                                                                                                  2272 * side (earliest to latest) per above discussion. */
                                                                                                                                  -
                                                                                                                                  2273 for (const Ack_packet::Individual_ack::Const_ptr ack : acked_packets)
                                                                                                                                  -
                                                                                                                                  2274 {
                                                                                                                                  -
                                                                                                                                  2275 /* Use helper to classify this individual ack as one of the following:
                                                                                                                                  -
                                                                                                                                  2276 * - Malformed/illegal. => error_ack is true. Else:
                                                                                                                                  -
                                                                                                                                  2277 * - Legal but referring to an already-acknowledged packet, or arriving too late. => dupe_or_late is true.
                                                                                                                                  -
                                                                                                                                  2278 * - The packet being acknowledged is unknown. => flying_pkt_it == past_oldest() (a/k/a end()).
                                                                                                                                  -
                                                                                                                                  2279 * - The packet being acknowledged is known. => flying_pkt_it points to that acked packet.
                                                                                                                                  -
                                                                                                                                  2280 * - Legal and acking a not-yet-acked packet, arriving in time. => dupe_or_late is false.
                                                                                                                                  -
                                                                                                                                  2281 * => flying_pkt_it points to that acked packet.
                                                                                                                                  -
                                                                                                                                  2282 * Note: The helper takes care of snd_stats updating, closing socket on error, and relevant logging. */
                                                                                                                                  -
                                                                                                                                  2283
                                                                                                                                  - -
                                                                                                                                  2285 bool dupe_or_late;
                                                                                                                                  -
                                                                                                                                  2286
                                                                                                                                  -
                                                                                                                                  2287 const bool error_ack = !categorize_individual_ack(socket_id, sock, ack, &dupe_or_late, &flying_pkt_it);
                                                                                                                                  -
                                                                                                                                  2288 if (error_ack)
                                                                                                                                  -
                                                                                                                                  2289 {
                                                                                                                                  -
                                                                                                                                  2290 return; // Fatal error for entire socket (malformed ack, etc.). Socket is closed; all logged; bail out now.
                                                                                                                                  -
                                                                                                                                  2291 }
                                                                                                                                  -
                                                                                                                                  2292 // else
                                                                                                                                  -
                                                                                                                                  2293
                                                                                                                                  -
                                                                                                                                  2294 // Note these may never be initialized.
                                                                                                                                  -
                                                                                                                                  2295 Fine_duration round_trip_time;
                                                                                                                                  - -
                                                                                                                                  2297 const Peer_socket::Sent_packet::Sent_when* sent_when;
                                                                                                                                  -
                                                                                                                                  2298
                                                                                                                                  -
                                                                                                                                  2299 // Compute RTT, assuming we ID'ed the original DATA. (RTT logged even if we still throw away the ack just below.)
                                                                                                                                  -
                                                                                                                                  2300 if (flying_pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  -
                                                                                                                                  2301 {
                                                                                                                                  -
                                                                                                                                  2302 // Use helper to compute RTT and, as a side effect, get `Sent_when* sent_when` set to point to appriate structure.
                                                                                                                                  -
                                                                                                                                  2303 flying_pkt = flying_pkt_it->second;
                                                                                                                                  -
                                                                                                                                  2304 round_trip_time = compute_rtt_on_ack(flying_pkt, time_now, ack, &sent_when); // It logs details.
                                                                                                                                  -
                                                                                                                                  2305 } // Done computing (if possible) RTT and logging it.
                                                                                                                                  -
                                                                                                                                  2306
                                                                                                                                  -
                                                                                                                                  2307 if (dupe_or_late)
                                                                                                                                  -
                                                                                                                                  2308 {
                                                                                                                                  -
                                                                                                                                  2309 continue; // Do NOT return! There may well be valid individual acks after it. All logged; get out now.
                                                                                                                                  -
                                                                                                                                  2310 }
                                                                                                                                  -
                                                                                                                                  2311
                                                                                                                                  -
                                                                                                                                  2312 // else it's an in-time acking of DATA packet that has not yet been acked (is considered In-flight)!
                                                                                                                                  -
                                                                                                                                  2313 assert(!dupe_or_late);
                                                                                                                                  -
                                                                                                                                  2314 // The following is guaranteed by helper above, since !dupe_or_late. Hence, also, flying_pkt, sent_when, RTT set.
                                                                                                                                  -
                                                                                                                                  2315 assert(flying_pkt_it != snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  -
                                                                                                                                  2316 assert(flying_pkt);
                                                                                                                                  +
                                                                                                                                  2271 /* The are the individual T, N' (RTT, acked_bytes, sent_cwnd_bytes) arguments to pass to on_individual_ack() described
                                                                                                                                  +
                                                                                                                                  2272 * just above in big comment. We will be accumulating these across all the acks in the loop below. */
                                                                                                                                  +
                                                                                                                                  2273 using Clean_acked_packet = tuple<Fine_duration, size_t, size_t>;
                                                                                                                                  +
                                                                                                                                  2274 vector<Clean_acked_packet> clean_acked_packet_events;
                                                                                                                                  +
                                                                                                                                  2275 clean_acked_packet_events.reserve(min(acked_packets.size(), snd_flying_pkts_by_when.size())); // Small optimization.
                                                                                                                                  +
                                                                                                                                  2276
                                                                                                                                  +
                                                                                                                                  2277 /* Handle each acknowledgment in the order that the corresponding packet was received by other
                                                                                                                                  +
                                                                                                                                  2278 * side (earliest to latest) per above discussion. */
                                                                                                                                  +
                                                                                                                                  2279 for (const Ack_packet::Individual_ack::Const_ptr ack : acked_packets)
                                                                                                                                  +
                                                                                                                                  2280 {
                                                                                                                                  +
                                                                                                                                  2281 /* Use helper to classify this individual ack as one of the following:
                                                                                                                                  +
                                                                                                                                  2282 * - Malformed/illegal. => error_ack is true. Else:
                                                                                                                                  +
                                                                                                                                  2283 * - Legal but referring to an already-acknowledged packet, or arriving too late. => dupe_or_late is true.
                                                                                                                                  +
                                                                                                                                  2284 * - The packet being acknowledged is unknown. => flying_pkt_it == past_oldest() (a/k/a end()).
                                                                                                                                  +
                                                                                                                                  2285 * - The packet being acknowledged is known. => flying_pkt_it points to that acked packet.
                                                                                                                                  +
                                                                                                                                  2286 * - Legal and acking a not-yet-acked packet, arriving in time. => dupe_or_late is false.
                                                                                                                                  +
                                                                                                                                  2287 * => flying_pkt_it points to that acked packet.
                                                                                                                                  +
                                                                                                                                  2288 * Note: The helper takes care of snd_stats updating, closing socket on error, and relevant logging. */
                                                                                                                                  +
                                                                                                                                  2289
                                                                                                                                  + +
                                                                                                                                  2291 bool dupe_or_late;
                                                                                                                                  +
                                                                                                                                  2292
                                                                                                                                  +
                                                                                                                                  2293 const bool error_ack = !categorize_individual_ack(socket_id, sock, ack, &dupe_or_late, &flying_pkt_it);
                                                                                                                                  +
                                                                                                                                  2294 if (error_ack)
                                                                                                                                  +
                                                                                                                                  2295 {
                                                                                                                                  +
                                                                                                                                  2296 return; // Fatal error for entire socket (malformed ack, etc.). Socket is closed; all logged; bail out now.
                                                                                                                                  +
                                                                                                                                  2297 }
                                                                                                                                  +
                                                                                                                                  2298 // else
                                                                                                                                  +
                                                                                                                                  2299
                                                                                                                                  +
                                                                                                                                  2300 // Note these may never be initialized.
                                                                                                                                  +
                                                                                                                                  2301 Fine_duration round_trip_time;
                                                                                                                                  + +
                                                                                                                                  2303 const Peer_socket::Sent_packet::Sent_when* sent_when;
                                                                                                                                  +
                                                                                                                                  2304
                                                                                                                                  +
                                                                                                                                  2305 // Compute RTT, assuming we ID'ed the original DATA. (RTT logged even if we still throw away the ack just below.)
                                                                                                                                  +
                                                                                                                                  2306 if (flying_pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  +
                                                                                                                                  2307 {
                                                                                                                                  +
                                                                                                                                  2308 // Use helper to compute RTT and, as a side effect, get `Sent_when* sent_when` set to point to appriate structure.
                                                                                                                                  +
                                                                                                                                  2309 flying_pkt = flying_pkt_it->second;
                                                                                                                                  +
                                                                                                                                  2310 round_trip_time = compute_rtt_on_ack(flying_pkt, time_now, ack, &sent_when); // It logs details.
                                                                                                                                  +
                                                                                                                                  2311 } // Done computing (if possible) RTT and logging it.
                                                                                                                                  +
                                                                                                                                  2312
                                                                                                                                  +
                                                                                                                                  2313 if (dupe_or_late)
                                                                                                                                  +
                                                                                                                                  2314 {
                                                                                                                                  +
                                                                                                                                  2315 continue; // Do NOT return! There may well be valid individual acks after it. All logged; get out now.
                                                                                                                                  +
                                                                                                                                  2316 }
                                                                                                                                  2317
                                                                                                                                  -
                                                                                                                                  2318 // Update SRTT, etc.
                                                                                                                                  -
                                                                                                                                  2319 new_round_trip_time_sample(sock, round_trip_time);
                                                                                                                                  -
                                                                                                                                  2320
                                                                                                                                  -
                                                                                                                                  2321 /* Similarly, inform congestion control (see big comment at top of method). Some strategies
                                                                                                                                  -
                                                                                                                                  2322 * use individual acks to gauge the pipe's properties. Save the info to
                                                                                                                                  -
                                                                                                                                  2323 * later call on_individual_ack(). Why not just call
                                                                                                                                  -
                                                                                                                                  2324 * it here? Answer: Congestion_control_strategy interface specifies that
                                                                                                                                  -
                                                                                                                                  2325 * on_individual_ack() must be called AFTER on_loss_event() (which can only be called once
                                                                                                                                  -
                                                                                                                                  2326 * we've fully updated snd_flying_pkts, thus handled all acks). It also specifies that
                                                                                                                                  -
                                                                                                                                  2327 * snd_flying_pkts must be updated to reflect the handled ack. So we have no choice but
                                                                                                                                  -
                                                                                                                                  2328 * to save it. (@todo Performance?) */
                                                                                                                                  -
                                                                                                                                  2329 const size_t bytes_acked = flying_pkt->m_size;
                                                                                                                                  -
                                                                                                                                  2330 const size_t cwnd_bytes = sent_when->m_sent_cwnd_bytes;
                                                                                                                                  -
                                                                                                                                  2331 clean_acked_packet_events.emplace_back(round_trip_time, bytes_acked, cwnd_bytes);
                                                                                                                                  -
                                                                                                                                  2332
                                                                                                                                  -
                                                                                                                                  2333 // Maintain invariant. Packet acknowledged, so remove from In-flight packet list and related structures.
                                                                                                                                  -
                                                                                                                                  2334 snd_flying_pkts_erase_one(sock, flying_pkt_it);
                                                                                                                                  -
                                                                                                                                  2335
                                                                                                                                  -
                                                                                                                                  2336 // Bona fide In-flight->Acknowledged data; accumulate to inform congestion control below.
                                                                                                                                  -
                                                                                                                                  2337 clean_acked_bytes += bytes_acked;
                                                                                                                                  -
                                                                                                                                  2338 ++clean_acked_packets;
                                                                                                                                  -
                                                                                                                                  2339
                                                                                                                                  -
                                                                                                                                  2340 /* If we got here, then it is in fact what we consider a valid acknowledgment of packet
                                                                                                                                  -
                                                                                                                                  2341 * sent at time sent_when. Therefore, we should increment m_acks_after_me for any packet that has NOT
                                                                                                                                  -
                                                                                                                                  2342 * been acknowledged that was sent earlier than sent_when. (Later we'd consider Dropped any
                                                                                                                                  -
                                                                                                                                  2343 * packets for which this value is too high, as in TCP Fast Recovery/Retransmit.) Note that if
                                                                                                                                  -
                                                                                                                                  2344 * retransmission is off, that's the same as all packets with a lower first sequence number.
                                                                                                                                  -
                                                                                                                                  2345 * However if retransmission is on, then a packet may have a lower sequence number but be sent
                                                                                                                                  -
                                                                                                                                  2346 * later. Thus we use sent_when and not seq_num.
                                                                                                                                  -
                                                                                                                                  2347 *
                                                                                                                                  -
                                                                                                                                  2348 * Naively, we could just have a for () loop here to increment all such data members. However
                                                                                                                                  -
                                                                                                                                  2349 * that's inefficient -- order O(k * n), where k = acked_packets.size() and n =
                                                                                                                                  -
                                                                                                                                  2350 * snd_flying_pkts*.size(), in the worst case. Moreover, some of the Sent_packet structs in
                                                                                                                                  -
                                                                                                                                  2351 * which we increment m_acks_after_me may be acknowledged and thus erased from snd_flying_pkts*
                                                                                                                                  -
                                                                                                                                  2352 * in subsequent iterations of the for () loop we are in, wasting that work.
                                                                                                                                  +
                                                                                                                                  2318 // else it's an in-time acking of DATA packet that has not yet been acked (is considered In-flight)!
                                                                                                                                  +
                                                                                                                                  2319 assert(!dupe_or_late);
                                                                                                                                  +
                                                                                                                                  2320 // The following is guaranteed by helper above, since !dupe_or_late. Hence, also, flying_pkt, sent_when, RTT set.
                                                                                                                                  +
                                                                                                                                  2321 assert(flying_pkt_it != snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  +
                                                                                                                                  2322 assert(flying_pkt);
                                                                                                                                  +
                                                                                                                                  2323
                                                                                                                                  +
                                                                                                                                  2324 // Update SRTT, etc.
                                                                                                                                  +
                                                                                                                                  2325 new_round_trip_time_sample(sock, round_trip_time);
                                                                                                                                  +
                                                                                                                                  2326
                                                                                                                                  +
                                                                                                                                  2327 /* Similarly, inform congestion control (see big comment at top of method). Some strategies
                                                                                                                                  +
                                                                                                                                  2328 * use individual acks to gauge the pipe's properties. Save the info to
                                                                                                                                  +
                                                                                                                                  2329 * later call on_individual_ack(). Why not just call
                                                                                                                                  +
                                                                                                                                  2330 * it here? Answer: Congestion_control_strategy interface specifies that
                                                                                                                                  +
                                                                                                                                  2331 * on_individual_ack() must be called AFTER on_loss_event() (which can only be called once
                                                                                                                                  +
                                                                                                                                  2332 * we've fully updated snd_flying_pkts, thus handled all acks). It also specifies that
                                                                                                                                  +
                                                                                                                                  2333 * snd_flying_pkts must be updated to reflect the handled ack. So we have no choice but
                                                                                                                                  +
                                                                                                                                  2334 * to save it. (@todo Performance?) */
                                                                                                                                  +
                                                                                                                                  2335 const size_t bytes_acked = flying_pkt->m_size;
                                                                                                                                  +
                                                                                                                                  2336 const size_t cwnd_bytes = sent_when->m_sent_cwnd_bytes;
                                                                                                                                  +
                                                                                                                                  2337 clean_acked_packet_events.emplace_back(round_trip_time, bytes_acked, cwnd_bytes);
                                                                                                                                  +
                                                                                                                                  2338
                                                                                                                                  +
                                                                                                                                  2339 // Maintain invariant. Packet acknowledged, so remove from In-flight packet list and related structures.
                                                                                                                                  +
                                                                                                                                  2340 snd_flying_pkts_erase_one(sock, flying_pkt_it);
                                                                                                                                  +
                                                                                                                                  2341
                                                                                                                                  +
                                                                                                                                  2342 // Bona fide In-flight->Acknowledged data; accumulate to inform congestion control below.
                                                                                                                                  +
                                                                                                                                  2343 clean_acked_bytes += bytes_acked;
                                                                                                                                  +
                                                                                                                                  2344 ++clean_acked_packets;
                                                                                                                                  +
                                                                                                                                  2345
                                                                                                                                  +
                                                                                                                                  2346 /* If we got here, then it is in fact what we consider a valid acknowledgment of packet
                                                                                                                                  +
                                                                                                                                  2347 * sent at time sent_when. Therefore, we should increment m_acks_after_me for any packet that has NOT
                                                                                                                                  +
                                                                                                                                  2348 * been acknowledged that was sent earlier than sent_when. (Later we'd consider Dropped any
                                                                                                                                  +
                                                                                                                                  2349 * packets for which this value is too high, as in TCP Fast Recovery/Retransmit.) Note that if
                                                                                                                                  +
                                                                                                                                  2350 * retransmission is off, that's the same as all packets with a lower first sequence number.
                                                                                                                                  +
                                                                                                                                  2351 * However if retransmission is on, then a packet may have a lower sequence number but be sent
                                                                                                                                  +
                                                                                                                                  2352 * later. Thus we use sent_when and not seq_num.
                                                                                                                                  2353 *
                                                                                                                                  -
                                                                                                                                  2354 * So instead we count the individual acks in a hash map that maps sent_when to the number of
                                                                                                                                  -
                                                                                                                                  2355 * times (in this ACK) that sequence number's packet was validly acknowledged. This is O(k)
                                                                                                                                  -
                                                                                                                                  2356 * amortized total. Then elsewhere we use that hash map to more efficiently update m_acks_after_me
                                                                                                                                  -
                                                                                                                                  2357 * where appropriate. In addition, this hash map is used to register certain Drop_timer
                                                                                                                                  -
                                                                                                                                  2358 * at the end of the method. */
                                                                                                                                  -
                                                                                                                                  2359
                                                                                                                                  -
                                                                                                                                  2360 /* Note that we track these by "order number"; each sent packet (no matter if retransmitted or
                                                                                                                                  -
                                                                                                                                  2361 * not) gets a unique order number, higher than all previous. Since no two packets will have
                                                                                                                                  -
                                                                                                                                  2362 * the same order number, we keep a set of order numbers. */
                                                                                                                                  -
                                                                                                                                  2363 flying_now_acked_pkts.insert(sent_when->m_order_num);
                                                                                                                                  -
                                                                                                                                  2364 } // for (all acked_packets)
                                                                                                                                  +
                                                                                                                                  2354 * Naively, we could just have a for () loop here to increment all such data members. However
                                                                                                                                  +
                                                                                                                                  2355 * that's inefficient -- order O(k * n), where k = acked_packets.size() and n =
                                                                                                                                  +
                                                                                                                                  2356 * snd_flying_pkts*.size(), in the worst case. Moreover, some of the Sent_packet structs in
                                                                                                                                  +
                                                                                                                                  2357 * which we increment m_acks_after_me may be acknowledged and thus erased from snd_flying_pkts*
                                                                                                                                  +
                                                                                                                                  2358 * in subsequent iterations of the for () loop we are in, wasting that work.
                                                                                                                                  +
                                                                                                                                  2359 *
                                                                                                                                  +
                                                                                                                                  2360 * So instead we count the individual acks in a hash map that maps sent_when to the number of
                                                                                                                                  +
                                                                                                                                  2361 * times (in this ACK) that sequence number's packet was validly acknowledged. This is O(k)
                                                                                                                                  +
                                                                                                                                  2362 * amortized total. Then elsewhere we use that hash map to more efficiently update m_acks_after_me
                                                                                                                                  +
                                                                                                                                  2363 * where appropriate. In addition, this hash map is used to register certain Drop_timer
                                                                                                                                  +
                                                                                                                                  2364 * at the end of the method. */
                                                                                                                                  2365
                                                                                                                                  -
                                                                                                                                  2366 /* snd_flying_pkts* is updated w/r/t removing the In-flight-now-acked packets. Now, realize that
                                                                                                                                  -
                                                                                                                                  2367 * for a given packet P still In-flight, if packets sent BEFORE it have just become acked, intuitively
                                                                                                                                  -
                                                                                                                                  2368 * it raises the probability P has been lost and should be considered Dropped. In fact, as explained in
                                                                                                                                  -
                                                                                                                                  2369 * helper categorize_pkts_as_dropped_on_acks(), if one finds the latest-sent such packet P, then all
                                                                                                                                  -
                                                                                                                                  2370 * packets sent before it should all be dropped as well. So, let's find this latest-sent P: */
                                                                                                                                  -
                                                                                                                                  2371 const Peer_socket::Sent_pkt_ordered_by_when_iter last_dropped_pkt_it
                                                                                                                                  -
                                                                                                                                  2372 = categorize_pkts_as_dropped_on_acks(sock, flying_now_acked_pkts);
                                                                                                                                  -
                                                                                                                                  2373
                                                                                                                                  -
                                                                                                                                  2374 /* OK, so P and all In-flight packets sent before it must be dropped. This helper takes all the actions
                                                                                                                                  -
                                                                                                                                  2375 * necessary (or at least records data we use to take such actions below) w/r/t all those packets.
                                                                                                                                  -
                                                                                                                                  2376 * Namely: erases them from snd_flying_pkts*; accumulates packet and bytes counts to do with these
                                                                                                                                  -
                                                                                                                                  2377 * dropped packets; saves the packet IDs from Drop timer purposes into pkts_marked_to_drop. */
                                                                                                                                  -
                                                                                                                                  2378 size_t dropped_pkts;
                                                                                                                                  -
                                                                                                                                  2379 size_t dropped_bytes;
                                                                                                                                  -
                                                                                                                                  2380 size_t cong_ctl_dropped_bytes;
                                                                                                                                  -
                                                                                                                                  2381 size_t cong_ctl_dropped_pkts;
                                                                                                                                  -
                                                                                                                                  2382 if (!drop_pkts_on_acks(sock, last_dropped_pkt_it,
                                                                                                                                  -
                                                                                                                                  2383 &cong_ctl_dropped_pkts, &cong_ctl_dropped_bytes,
                                                                                                                                  -
                                                                                                                                  2384 &dropped_pkts, &dropped_bytes, &pkts_marked_to_drop))
                                                                                                                                  -
                                                                                                                                  2385 {
                                                                                                                                  -
                                                                                                                                  2386 return; // Already closed/logged/etc. (too many retransmissions probably).
                                                                                                                                  -
                                                                                                                                  2387 }
                                                                                                                                  -
                                                                                                                                  2388
                                                                                                                                  -
                                                                                                                                  2389 // As long promised since the top of this method, let congestion control (and B/W estimator) know what happened!
                                                                                                                                  -
                                                                                                                                  2390
                                                                                                                                  -
                                                                                                                                  2391 /* Bandwidth estimation: It can be useful to estimate the available outgoing bandwidth (available
                                                                                                                                  -
                                                                                                                                  2392 * meaning the total bandwidth of the empty pipe minus any other traffic other than this
                                                                                                                                  -
                                                                                                                                  2393 * connection [NetFlow or otherwise] currently occupying this pipe). Mostly it's useful for certain
                                                                                                                                  -
                                                                                                                                  2394 * congestion control strategies like Congestion_control_classic_with_bandwidth_est, but it may be
                                                                                                                                  -
                                                                                                                                  2395 * good information to have if only for the user's general information. Therefore we keep an
                                                                                                                                  -
                                                                                                                                  2396 * independent m_snd_bandwidth_estimator regardless of the congestion control strategy in use.
                                                                                                                                  -
                                                                                                                                  2397 * Like Congestion_control_strategy, it updates its state based on events. It currently cares
                                                                                                                                  -
                                                                                                                                  2398 * about at least one event: on_acks(N), where N is the number of bytes acknowledged. This is
                                                                                                                                  -
                                                                                                                                  2399 * very similar to the on_acks(N, M) event for congestion control (see above). None of the other
                                                                                                                                  -
                                                                                                                                  2400 * aspects of the above discussion (such as loss events) apply to m_snd_bandwidth_estimator. */
                                                                                                                                  -
                                                                                                                                  2401
                                                                                                                                  -
                                                                                                                                  2402 // Note that the order is as required by Congestion_control_strategy() API: loss, individual acks, consolidated acks.
                                                                                                                                  -
                                                                                                                                  2403
                                                                                                                                  -
                                                                                                                                  2404 // Report loss event info to congestion control.
                                                                                                                                  -
                                                                                                                                  2405 if (dropped_pkts != 0)
                                                                                                                                  -
                                                                                                                                  2406 {
                                                                                                                                  -
                                                                                                                                  2407 // @todo Might be too verbose to keep it as INFO!
                                                                                                                                  -
                                                                                                                                  2408 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2409 "Considering Dropped: [" << dropped_bytes << "] bytes = [" << dropped_pkts << "] packets.");
                                                                                                                                  -
                                                                                                                                  2410
                                                                                                                                  -
                                                                                                                                  2411 if (cong_ctl_dropped_pkts != 0) // Again, cong_ctl_dropped_pkts != dropped_pkts, potentially.
                                                                                                                                  -
                                                                                                                                  2412 {
                                                                                                                                  -
                                                                                                                                  2413 // New loss event!
                                                                                                                                  -
                                                                                                                                  2414 assert(cong_ctl_dropped_bytes != 0); // Empty blocks not allowed (should have been eliminated by now).
                                                                                                                                  -
                                                                                                                                  2415
                                                                                                                                  -
                                                                                                                                  2416 FLOW_LOG_INFO("cong_ctl [" << sock << "] update: loss event: "
                                                                                                                                  -
                                                                                                                                  2417 "Dropped [" << cong_ctl_dropped_bytes << "] bytes "
                                                                                                                                  -
                                                                                                                                  2418 "= [" << cong_ctl_dropped_pkts << "] packets.");
                                                                                                                                  -
                                                                                                                                  2419
                                                                                                                                  -
                                                                                                                                  2420 sock->m_snd_cong_ctl->on_loss_event(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  -
                                                                                                                                  2421 sock->m_snd_last_loss_event_when = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  2422
                                                                                                                                  -
                                                                                                                                  2423 // As a silver lining, we probably got some nice new acknowledgments following that drop.
                                                                                                                                  -
                                                                                                                                  2424 }
                                                                                                                                  -
                                                                                                                                  2425 }
                                                                                                                                  -
                                                                                                                                  2426 else
                                                                                                                                  -
                                                                                                                                  2427 {
                                                                                                                                  -
                                                                                                                                  2428 assert(dropped_pkts == 0);
                                                                                                                                  -
                                                                                                                                  2429 assert(cong_ctl_dropped_pkts == 0);
                                                                                                                                  -
                                                                                                                                  2430 }
                                                                                                                                  -
                                                                                                                                  2431
                                                                                                                                  -
                                                                                                                                  2432 if (clean_acked_packets != 0)
                                                                                                                                  +
                                                                                                                                  2366 /* Note that we track these by "order number"; each sent packet (no matter if retransmitted or
                                                                                                                                  +
                                                                                                                                  2367 * not) gets a unique order number, higher than all previous. Since no two packets will have
                                                                                                                                  +
                                                                                                                                  2368 * the same order number, we keep a set of order numbers. */
                                                                                                                                  +
                                                                                                                                  2369 flying_now_acked_pkts.insert(sent_when->m_order_num);
                                                                                                                                  +
                                                                                                                                  2370 } // for (all acked_packets)
                                                                                                                                  +
                                                                                                                                  2371
                                                                                                                                  +
                                                                                                                                  2372 /* snd_flying_pkts* is updated w/r/t removing the In-flight-now-acked packets. Now, realize that
                                                                                                                                  +
                                                                                                                                  2373 * for a given packet P still In-flight, if packets sent BEFORE it have just become acked, intuitively
                                                                                                                                  +
                                                                                                                                  2374 * it raises the probability P has been lost and should be considered Dropped. In fact, as explained in
                                                                                                                                  +
                                                                                                                                  2375 * helper categorize_pkts_as_dropped_on_acks(), if one finds the latest-sent such packet P, then all
                                                                                                                                  +
                                                                                                                                  2376 * packets sent before it should all be dropped as well. So, let's find this latest-sent P: */
                                                                                                                                  +
                                                                                                                                  2377 const Peer_socket::Sent_pkt_ordered_by_when_iter last_dropped_pkt_it
                                                                                                                                  +
                                                                                                                                  2378 = categorize_pkts_as_dropped_on_acks(sock, flying_now_acked_pkts);
                                                                                                                                  +
                                                                                                                                  2379
                                                                                                                                  +
                                                                                                                                  2380 /* OK, so P and all In-flight packets sent before it must be dropped. This helper takes all the actions
                                                                                                                                  +
                                                                                                                                  2381 * necessary (or at least records data we use to take such actions below) w/r/t all those packets.
                                                                                                                                  +
                                                                                                                                  2382 * Namely: erases them from snd_flying_pkts*; accumulates packet and bytes counts to do with these
                                                                                                                                  +
                                                                                                                                  2383 * dropped packets; saves the packet IDs from Drop timer purposes into pkts_marked_to_drop. */
                                                                                                                                  +
                                                                                                                                  2384 size_t dropped_pkts;
                                                                                                                                  +
                                                                                                                                  2385 size_t dropped_bytes;
                                                                                                                                  +
                                                                                                                                  2386 size_t cong_ctl_dropped_bytes;
                                                                                                                                  +
                                                                                                                                  2387 size_t cong_ctl_dropped_pkts;
                                                                                                                                  +
                                                                                                                                  2388 if (!drop_pkts_on_acks(sock, last_dropped_pkt_it,
                                                                                                                                  +
                                                                                                                                  2389 &cong_ctl_dropped_pkts, &cong_ctl_dropped_bytes,
                                                                                                                                  +
                                                                                                                                  2390 &dropped_pkts, &dropped_bytes, &pkts_marked_to_drop))
                                                                                                                                  +
                                                                                                                                  2391 {
                                                                                                                                  +
                                                                                                                                  2392 return; // Already closed/logged/etc. (too many retransmissions probably).
                                                                                                                                  +
                                                                                                                                  2393 }
                                                                                                                                  +
                                                                                                                                  2394
                                                                                                                                  +
                                                                                                                                  2395 // As long promised since the top of this method, let congestion control (and B/W estimator) know what happened!
                                                                                                                                  +
                                                                                                                                  2396
                                                                                                                                  +
                                                                                                                                  2397 /* Bandwidth estimation: It can be useful to estimate the available outgoing bandwidth (available
                                                                                                                                  +
                                                                                                                                  2398 * meaning the total bandwidth of the empty pipe minus any other traffic other than this
                                                                                                                                  +
                                                                                                                                  2399 * connection [NetFlow or otherwise] currently occupying this pipe). Mostly it's useful for certain
                                                                                                                                  +
                                                                                                                                  2400 * congestion control strategies like Congestion_control_classic_with_bandwidth_est, but it may be
                                                                                                                                  +
                                                                                                                                  2401 * good information to have if only for the user's general information. Therefore we keep an
                                                                                                                                  +
                                                                                                                                  2402 * independent m_snd_bandwidth_estimator regardless of the congestion control strategy in use.
                                                                                                                                  +
                                                                                                                                  2403 * Like Congestion_control_strategy, it updates its state based on events. It currently cares
                                                                                                                                  +
                                                                                                                                  2404 * about at least one event: on_acks(N), where N is the number of bytes acknowledged. This is
                                                                                                                                  +
                                                                                                                                  2405 * very similar to the on_acks(N, M) event for congestion control (see above). None of the other
                                                                                                                                  +
                                                                                                                                  2406 * aspects of the above discussion (such as loss events) apply to m_snd_bandwidth_estimator. */
                                                                                                                                  +
                                                                                                                                  2407
                                                                                                                                  +
                                                                                                                                  2408 // Note that the order is as required by Congestion_control_strategy() API: loss, individual acks, consolidated acks.
                                                                                                                                  +
                                                                                                                                  2409
                                                                                                                                  +
                                                                                                                                  2410 // Report loss event info to congestion control.
                                                                                                                                  +
                                                                                                                                  2411 if (dropped_pkts != 0)
                                                                                                                                  +
                                                                                                                                  2412 {
                                                                                                                                  +
                                                                                                                                  2413 // @todo Might be too verbose to keep it as INFO!
                                                                                                                                  +
                                                                                                                                  2414 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2415 "Considering Dropped: [" << dropped_bytes << "] bytes = [" << dropped_pkts << "] packets.");
                                                                                                                                  +
                                                                                                                                  2416
                                                                                                                                  +
                                                                                                                                  2417 if (cong_ctl_dropped_pkts != 0) // Again, cong_ctl_dropped_pkts != dropped_pkts, potentially.
                                                                                                                                  +
                                                                                                                                  2418 {
                                                                                                                                  +
                                                                                                                                  2419 // New loss event!
                                                                                                                                  +
                                                                                                                                  2420 assert(cong_ctl_dropped_bytes != 0); // Empty blocks not allowed (should have been eliminated by now).
                                                                                                                                  +
                                                                                                                                  2421
                                                                                                                                  +
                                                                                                                                  2422 FLOW_LOG_INFO("cong_ctl [" << sock << "] update: loss event: "
                                                                                                                                  +
                                                                                                                                  2423 "Dropped [" << cong_ctl_dropped_bytes << "] bytes "
                                                                                                                                  +
                                                                                                                                  2424 "= [" << cong_ctl_dropped_pkts << "] packets.");
                                                                                                                                  +
                                                                                                                                  2425
                                                                                                                                  +
                                                                                                                                  2426 sock->m_snd_cong_ctl->on_loss_event(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  +
                                                                                                                                  2427 sock->m_snd_last_loss_event_when = Fine_clock::now();
                                                                                                                                  +
                                                                                                                                  2428
                                                                                                                                  +
                                                                                                                                  2429 // As a silver lining, we probably got some nice new acknowledgments following that drop.
                                                                                                                                  +
                                                                                                                                  2430 }
                                                                                                                                  +
                                                                                                                                  2431 }
                                                                                                                                  +
                                                                                                                                  2432 else
                                                                                                                                  2433 {
                                                                                                                                  -
                                                                                                                                  2434 assert(clean_acked_bytes != 0); // Empty blocks not allowed (should have been eliminated by now).
                                                                                                                                  -
                                                                                                                                  2435 assert(!clean_acked_packet_events.empty());
                                                                                                                                  -
                                                                                                                                  2436
                                                                                                                                  -
                                                                                                                                  2437 // Report individual (clean) acks to congestion control.
                                                                                                                                  -
                                                                                                                                  2438 for (const auto& [rtt, bytes, cwnd_bytes] : clean_acked_packet_events)
                                                                                                                                  -
                                                                                                                                  2439 {
                                                                                                                                  -
                                                                                                                                  2440 FLOW_LOG_TRACE("cong_ctl [" << sock << "] update: clean individual acknowledgment: "
                                                                                                                                  -
                                                                                                                                  2441 "[" << sock->bytes_blocks_str(bytes) << "] with RTT [" << round<milliseconds>(rtt) <<
                                                                                                                                  -
                                                                                                                                  2442 "] and sent_cwnd_bytes [" << cwnd_bytes << "].");
                                                                                                                                  -
                                                                                                                                  2443
                                                                                                                                  -
                                                                                                                                  2444 sock->m_snd_cong_ctl->on_individual_ack(rtt, bytes, cwnd_bytes);
                                                                                                                                  -
                                                                                                                                  2445 }
                                                                                                                                  -
                                                                                                                                  2446
                                                                                                                                  -
                                                                                                                                  2447 FLOW_LOG_TRACE("cong_ctl/bw_est [" << sock << "] update: clean acknowledgments: "
                                                                                                                                  -
                                                                                                                                  2448 "[" << sock->bytes_blocks_str(clean_acked_bytes) << "] = "
                                                                                                                                  -
                                                                                                                                  2449 "[" << clean_acked_packets << "] packets.");
                                                                                                                                  -
                                                                                                                                  2450
                                                                                                                                  -
                                                                                                                                  2451 // Report the totality of (clean) acks to congestion control and bandwidth estimator.
                                                                                                                                  -
                                                                                                                                  2452 sock->m_snd_bandwidth_estimator->on_acks(clean_acked_bytes);
                                                                                                                                  -
                                                                                                                                  2453 sock->m_snd_cong_ctl->on_acks(clean_acked_bytes, clean_acked_packets);
                                                                                                                                  -
                                                                                                                                  2454 }
                                                                                                                                  -
                                                                                                                                  2455
                                                                                                                                  -
                                                                                                                                  2456 /* For debugging it can be useful to log socket state right after loss and handling everything.
                                                                                                                                  -
                                                                                                                                  2457 * Do so but only if the last time we so logged was some time ago; this is a CPU-intensive
                                                                                                                                  -
                                                                                                                                  2458 * operation.
                                                                                                                                  -
                                                                                                                                  2459 *
                                                                                                                                  -
                                                                                                                                  2460 * Also, register dropped data in snd_stats. */
                                                                                                                                  -
                                                                                                                                  2461 if (dropped_pkts != 0)
                                                                                                                                  -
                                                                                                                                  2462 {
                                                                                                                                  -
                                                                                                                                  2463 // Register that we have convered N bytes over M packets from In-flight to Acknowledged.
                                                                                                                                  -
                                                                                                                                  2464 snd_stats.dropped_data(dropped_bytes, dropped_pkts);
                                                                                                                                  -
                                                                                                                                  2465
                                                                                                                                  -
                                                                                                                                  2466 const seconds MIN_TIME_BETWEEN_LOGS(1);
                                                                                                                                  -
                                                                                                                                  2467 const Fine_duration since_last_loss_sock_log = Fine_clock::now() - m_last_loss_sock_log_when;
                                                                                                                                  -
                                                                                                                                  2468
                                                                                                                                  -
                                                                                                                                  2469 if (since_last_loss_sock_log > MIN_TIME_BETWEEN_LOGS)
                                                                                                                                  -
                                                                                                                                  2470 {
                                                                                                                                  -
                                                                                                                                  2471 FLOW_LOG_INFO("Will log socket state on loss, because last such loss-driven logging was "
                                                                                                                                  -
                                                                                                                                  2472 "[" << round<milliseconds>(since_last_loss_sock_log) << " >"
                                                                                                                                  -
                                                                                                                                  2473 " " << MIN_TIME_BETWEEN_LOGS << "] ago.");
                                                                                                                                  -
                                                                                                                                  2474 sock_log_detail(sock);
                                                                                                                                  -
                                                                                                                                  2475 m_last_loss_sock_log_when = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  2476 }
                                                                                                                                  -
                                                                                                                                  2477 else
                                                                                                                                  -
                                                                                                                                  2478 {
                                                                                                                                  -
                                                                                                                                  2479 FLOW_LOG_INFO("Will NOT log socket state on loss, because last such loss-driven logging was "
                                                                                                                                  -
                                                                                                                                  2480 "[" << round<milliseconds>(since_last_loss_sock_log) << " <="
                                                                                                                                  -
                                                                                                                                  2481 " " << MIN_TIME_BETWEEN_LOGS << "] ago.");
                                                                                                                                  +
                                                                                                                                  2434 assert(dropped_pkts == 0);
                                                                                                                                  +
                                                                                                                                  2435 assert(cong_ctl_dropped_pkts == 0);
                                                                                                                                  +
                                                                                                                                  2436 }
                                                                                                                                  +
                                                                                                                                  2437
                                                                                                                                  +
                                                                                                                                  2438 if (clean_acked_packets != 0)
                                                                                                                                  +
                                                                                                                                  2439 {
                                                                                                                                  +
                                                                                                                                  2440 assert(clean_acked_bytes != 0); // Empty blocks not allowed (should have been eliminated by now).
                                                                                                                                  +
                                                                                                                                  2441 assert(!clean_acked_packet_events.empty());
                                                                                                                                  +
                                                                                                                                  2442
                                                                                                                                  +
                                                                                                                                  2443 // Report individual (clean) acks to congestion control.
                                                                                                                                  +
                                                                                                                                  2444 for (const auto& [rtt, bytes, cwnd_bytes] : clean_acked_packet_events)
                                                                                                                                  +
                                                                                                                                  2445 {
                                                                                                                                  +
                                                                                                                                  2446 FLOW_LOG_TRACE("cong_ctl [" << sock << "] update: clean individual acknowledgment: "
                                                                                                                                  +
                                                                                                                                  2447 "[" << sock->bytes_blocks_str(bytes) << "] with RTT [" << round<milliseconds>(rtt) <<
                                                                                                                                  +
                                                                                                                                  2448 "] and sent_cwnd_bytes [" << cwnd_bytes << "].");
                                                                                                                                  +
                                                                                                                                  2449
                                                                                                                                  +
                                                                                                                                  2450 sock->m_snd_cong_ctl->on_individual_ack(rtt, bytes, cwnd_bytes);
                                                                                                                                  +
                                                                                                                                  2451 }
                                                                                                                                  +
                                                                                                                                  2452
                                                                                                                                  +
                                                                                                                                  2453 FLOW_LOG_TRACE("cong_ctl/bw_est [" << sock << "] update: clean acknowledgments: "
                                                                                                                                  +
                                                                                                                                  2454 "[" << sock->bytes_blocks_str(clean_acked_bytes) << "] = "
                                                                                                                                  +
                                                                                                                                  2455 "[" << clean_acked_packets << "] packets.");
                                                                                                                                  +
                                                                                                                                  2456
                                                                                                                                  +
                                                                                                                                  2457 // Report the totality of (clean) acks to congestion control and bandwidth estimator.
                                                                                                                                  +
                                                                                                                                  2458 sock->m_snd_bandwidth_estimator->on_acks(clean_acked_bytes);
                                                                                                                                  +
                                                                                                                                  2459 sock->m_snd_cong_ctl->on_acks(clean_acked_bytes, clean_acked_packets);
                                                                                                                                  +
                                                                                                                                  2460 }
                                                                                                                                  +
                                                                                                                                  2461
                                                                                                                                  +
                                                                                                                                  2462 /* For debugging it can be useful to log socket state right after loss and handling everything.
                                                                                                                                  +
                                                                                                                                  2463 * Do so but only if the last time we so logged was some time ago; this is a CPU-intensive
                                                                                                                                  +
                                                                                                                                  2464 * operation.
                                                                                                                                  +
                                                                                                                                  2465 *
                                                                                                                                  +
                                                                                                                                  2466 * Also, register dropped data in snd_stats. */
                                                                                                                                  +
                                                                                                                                  2467 if (dropped_pkts != 0)
                                                                                                                                  +
                                                                                                                                  2468 {
                                                                                                                                  +
                                                                                                                                  2469 // Register that we have convered N bytes over M packets from In-flight to Acknowledged.
                                                                                                                                  +
                                                                                                                                  2470 snd_stats.dropped_data(dropped_bytes, dropped_pkts);
                                                                                                                                  +
                                                                                                                                  2471
                                                                                                                                  +
                                                                                                                                  2472 const seconds MIN_TIME_BETWEEN_LOGS(1);
                                                                                                                                  +
                                                                                                                                  2473 const Fine_duration since_last_loss_sock_log = Fine_clock::now() - m_last_loss_sock_log_when;
                                                                                                                                  +
                                                                                                                                  2474
                                                                                                                                  +
                                                                                                                                  2475 if (since_last_loss_sock_log > MIN_TIME_BETWEEN_LOGS)
                                                                                                                                  +
                                                                                                                                  2476 {
                                                                                                                                  +
                                                                                                                                  2477 FLOW_LOG_INFO("Will log socket state on loss, because last such loss-driven logging was "
                                                                                                                                  +
                                                                                                                                  2478 "[" << round<milliseconds>(since_last_loss_sock_log) << " >"
                                                                                                                                  +
                                                                                                                                  2479 " " << MIN_TIME_BETWEEN_LOGS << "] ago.");
                                                                                                                                  +
                                                                                                                                  2480 sock_log_detail(sock);
                                                                                                                                  +
                                                                                                                                  2481 m_last_loss_sock_log_when = Fine_clock::now();
                                                                                                                                  2482 }
                                                                                                                                  -
                                                                                                                                  2483 }
                                                                                                                                  -
                                                                                                                                  2484
                                                                                                                                  -
                                                                                                                                  2485 // Log the send window state after the above changes (if at least TRACE enabled).
                                                                                                                                  -
                                                                                                                                  2486 log_snd_window(sock);
                                                                                                                                  -
                                                                                                                                  2487
                                                                                                                                  -
                                                                                                                                  2488 /* Handle possible effect of above activities on the Drop Timer. (It may get disabled or restarted anew.)
                                                                                                                                  -
                                                                                                                                  2489 * Why not just do this right when we erase the associated packets from snd_flying_pkts*? Answer: We don't want to
                                                                                                                                  -
                                                                                                                                  2490 * trigger disruptive behavior like possibly retransmitting everything in the middle of all that accounting
                                                                                                                                  -
                                                                                                                                  2491 * which is not yet complete. Now it's complete, so it's the right time to handle this.
                                                                                                                                  -
                                                                                                                                  2492 *
                                                                                                                                  -
                                                                                                                                  2493 * Recall that snd_flying_pkts* have been updated and no longer contain the associated packets' info. */
                                                                                                                                  -
                                                                                                                                  2494
                                                                                                                                  -
                                                                                                                                  2495 const Drop_timer::Ptr drop_timer = sock->m_snd_drop_timer;
                                                                                                                                  -
                                                                                                                                  2496 drop_timer->start_contemporaneous_events();
                                                                                                                                  -
                                                                                                                                  2497
                                                                                                                                  -
                                                                                                                                  2498 for (const auto pkt_order_num : flying_now_acked_pkts)
                                                                                                                                  -
                                                                                                                                  2499 {
                                                                                                                                  -
                                                                                                                                  2500 drop_timer->on_ack(pkt_order_num);
                                                                                                                                  -
                                                                                                                                  2501 drop_timer->on_packet_no_longer_in_flight(pkt_order_num);
                                                                                                                                  -
                                                                                                                                  2502 }
                                                                                                                                  -
                                                                                                                                  2503 for (const auto pkt_order_num : pkts_marked_to_drop)
                                                                                                                                  -
                                                                                                                                  2504 {
                                                                                                                                  -
                                                                                                                                  2505 drop_timer->on_packet_no_longer_in_flight(pkt_order_num);
                                                                                                                                  -
                                                                                                                                  2506 }
                                                                                                                                  -
                                                                                                                                  2507
                                                                                                                                  -
                                                                                                                                  2508 drop_timer->end_contemporaneous_events();
                                                                                                                                  -
                                                                                                                                  2509
                                                                                                                                  -
                                                                                                                                  2510 /* As avertised, handle the rcv_wnd update: the latest ACK we are handling here contains the
                                                                                                                                  -
                                                                                                                                  2511 * latest info about the Receive buffer space on the other side that is available. */
                                                                                                                                  -
                                                                                                                                  2512 if (sock->m_snd_pending_rcv_wnd != sock->m_snd_remote_rcv_wnd)
                                                                                                                                  -
                                                                                                                                  2513 {
                                                                                                                                  -
                                                                                                                                  2514 FLOW_LOG_TRACE("Other side advertised "
                                                                                                                                  -
                                                                                                                                  2515 "rcv_wnd change [" << sock->m_snd_remote_rcv_wnd << "] => [" << sock->m_snd_pending_rcv_wnd << "].");
                                                                                                                                  -
                                                                                                                                  2516 sock->m_snd_remote_rcv_wnd = sock->m_snd_pending_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  2517 /* Why have this intermediate m_snd_pending_rcv_wnd thing at all then? Answer: can_send(),
                                                                                                                                  -
                                                                                                                                  2518 * checked at the start of this method and saved into could_send_before_acks, uses the "before
                                                                                                                                  -
                                                                                                                                  2519 * handling the ACKs" state, which should not yet include the receive window update. Then
                                                                                                                                  -
                                                                                                                                  2520 * since we update m_snd_remote_rcv_wnd after that is computed, but before can_send() is
                                                                                                                                  -
                                                                                                                                  2521 * re-checked just below, we are able to see if the ACKs have changed can_send() from false to
                                                                                                                                  -
                                                                                                                                  2522 * true. */
                                                                                                                                  -
                                                                                                                                  2523
                                                                                                                                  -
                                                                                                                                  2524 /* Register whether after this window update, if we had a packet to send and no data In-flight,
                                                                                                                                  -
                                                                                                                                  2525 * we would be able to send at least one full DATA packet or not (i.e., can_send() would return
                                                                                                                                  -
                                                                                                                                  2526 * true). That is, register whether Receive window is ~0. */
                                                                                                                                  -
                                                                                                                                  2527 sock->m_snd_stats.updated_rcv_wnd(sock->m_snd_remote_rcv_wnd < sock->max_block_size());
                                                                                                                                  -
                                                                                                                                  2528 }
                                                                                                                                  +
                                                                                                                                  2483 else
                                                                                                                                  +
                                                                                                                                  2484 {
                                                                                                                                  +
                                                                                                                                  2485 FLOW_LOG_INFO("Will NOT log socket state on loss, because last such loss-driven logging was "
                                                                                                                                  +
                                                                                                                                  2486 "[" << round<milliseconds>(since_last_loss_sock_log) << " <="
                                                                                                                                  +
                                                                                                                                  2487 " " << MIN_TIME_BETWEEN_LOGS << "] ago.");
                                                                                                                                  +
                                                                                                                                  2488 }
                                                                                                                                  +
                                                                                                                                  2489 }
                                                                                                                                  +
                                                                                                                                  2490
                                                                                                                                  +
                                                                                                                                  2491 // Log the send window state after the above changes (if at least TRACE enabled).
                                                                                                                                  +
                                                                                                                                  2492 log_snd_window(sock);
                                                                                                                                  +
                                                                                                                                  2493
                                                                                                                                  +
                                                                                                                                  2494 /* Handle possible effect of above activities on the Drop Timer. (It may get disabled or restarted anew.)
                                                                                                                                  +
                                                                                                                                  2495 * Why not just do this right when we erase the associated packets from snd_flying_pkts*? Answer: We don't want to
                                                                                                                                  +
                                                                                                                                  2496 * trigger disruptive behavior like possibly retransmitting everything in the middle of all that accounting
                                                                                                                                  +
                                                                                                                                  2497 * which is not yet complete. Now it's complete, so it's the right time to handle this.
                                                                                                                                  +
                                                                                                                                  2498 *
                                                                                                                                  +
                                                                                                                                  2499 * Recall that snd_flying_pkts* have been updated and no longer contain the associated packets' info. */
                                                                                                                                  +
                                                                                                                                  2500
                                                                                                                                  +
                                                                                                                                  2501 const Drop_timer::Ptr drop_timer = sock->m_snd_drop_timer;
                                                                                                                                  +
                                                                                                                                  2502 drop_timer->start_contemporaneous_events();
                                                                                                                                  +
                                                                                                                                  2503
                                                                                                                                  +
                                                                                                                                  2504 for (const auto pkt_order_num : flying_now_acked_pkts)
                                                                                                                                  +
                                                                                                                                  2505 {
                                                                                                                                  +
                                                                                                                                  2506 drop_timer->on_ack(pkt_order_num);
                                                                                                                                  +
                                                                                                                                  2507 drop_timer->on_packet_no_longer_in_flight(pkt_order_num);
                                                                                                                                  +
                                                                                                                                  2508 }
                                                                                                                                  +
                                                                                                                                  2509 for (const auto pkt_order_num : pkts_marked_to_drop)
                                                                                                                                  +
                                                                                                                                  2510 {
                                                                                                                                  +
                                                                                                                                  2511 drop_timer->on_packet_no_longer_in_flight(pkt_order_num);
                                                                                                                                  +
                                                                                                                                  2512 }
                                                                                                                                  +
                                                                                                                                  2513
                                                                                                                                  +
                                                                                                                                  2514 drop_timer->end_contemporaneous_events();
                                                                                                                                  +
                                                                                                                                  2515
                                                                                                                                  +
                                                                                                                                  2516 /* As avertised, handle the rcv_wnd update: the latest ACK we are handling here contains the
                                                                                                                                  +
                                                                                                                                  2517 * latest info about the Receive buffer space on the other side that is available. */
                                                                                                                                  +
                                                                                                                                  2518 if (sock->m_snd_pending_rcv_wnd != sock->m_snd_remote_rcv_wnd)
                                                                                                                                  +
                                                                                                                                  2519 {
                                                                                                                                  +
                                                                                                                                  2520 FLOW_LOG_TRACE("Other side advertised "
                                                                                                                                  +
                                                                                                                                  2521 "rcv_wnd change [" << sock->m_snd_remote_rcv_wnd << "] => [" << sock->m_snd_pending_rcv_wnd << "].");
                                                                                                                                  +
                                                                                                                                  2522 sock->m_snd_remote_rcv_wnd = sock->m_snd_pending_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  2523 /* Why have this intermediate m_snd_pending_rcv_wnd thing at all then? Answer: can_send(),
                                                                                                                                  +
                                                                                                                                  2524 * checked at the start of this method and saved into could_send_before_acks, uses the "before
                                                                                                                                  +
                                                                                                                                  2525 * handling the ACKs" state, which should not yet include the receive window update. Then
                                                                                                                                  +
                                                                                                                                  2526 * since we update m_snd_remote_rcv_wnd after that is computed, but before can_send() is
                                                                                                                                  +
                                                                                                                                  2527 * re-checked just below, we are able to see if the ACKs have changed can_send() from false to
                                                                                                                                  +
                                                                                                                                  2528 * true. */
                                                                                                                                  2529
                                                                                                                                  -
                                                                                                                                  2530 /* We've received ACKs and thus have quite likely reduced the number of bytes we
                                                                                                                                  -
                                                                                                                                  2531 * consider In-flight. Moreover we may have increased CWND. Moreover we may have added packets
                                                                                                                                  -
                                                                                                                                  2532 * to retransmit queue (if retransmission is on). Moreover we may have increased m_snd_remote_rcv_wnd.
                                                                                                                                  -
                                                                                                                                  2533 * Therefore can_send() may now return true while at the beginning of the method it returned
                                                                                                                                  -
                                                                                                                                  2534 * false; and similarly for snd_deqable(). So have send_worker() check and send more if possible.
                                                                                                                                  -
                                                                                                                                  2535 * See Node::send() for discussion of overall strategy on this topic. */
                                                                                                                                  -
                                                                                                                                  2536 if ((!could_send_before_acks) || (rexmit_on && (!had_rexmit_data_before_acks)))
                                                                                                                                  -
                                                                                                                                  2537 {
                                                                                                                                  -
                                                                                                                                  2538 send_worker(sock, true);
                                                                                                                                  -
                                                                                                                                  2539 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  -
                                                                                                                                  2540 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  -
                                                                                                                                  2541 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  2542 }
                                                                                                                                  -
                                                                                                                                  2543} // Node::handle_accumulated_acks()
                                                                                                                                  -
                                                                                                                                  2544
                                                                                                                                  - - -
                                                                                                                                  2547 bool* dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter* acked_pkt_it)
                                                                                                                                  -
                                                                                                                                  2548{
                                                                                                                                  -
                                                                                                                                  2549 assert(dupe_or_late);
                                                                                                                                  -
                                                                                                                                  2550 assert(acked_pkt_it);
                                                                                                                                  -
                                                                                                                                  2551
                                                                                                                                  -
                                                                                                                                  2552 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  -
                                                                                                                                  2553 * as of this writing. It figures out whether the given individual ack is invalid, valid but duplicate/late, or
                                                                                                                                  -
                                                                                                                                  2554 * valid and on-time. Results go into the return value and *dupe_or_late and *acked_pkt_it. */
                                                                                                                                  -
                                                                                                                                  2555
                                                                                                                                  -
                                                                                                                                  2556 /* Now to discuss what happens when an ACK is received, with a seemingly valid sequence number
                                                                                                                                  -
                                                                                                                                  2557 * (i.e., in [m_snd_init_seq_num + 1, m_snd_next_seq_num - 1] range) -- but the corresponding
                                                                                                                                  -
                                                                                                                                  2558 * packet is not in m_snd_flying_pkts_by_seq_num. What does this mean? One, unlikely, possibility is
                                                                                                                                  -
                                                                                                                                  2559 * that it's a fake/wrong acknowledgment, not pertaining to any packet we'd sent but in the range
                                                                                                                                  -
                                                                                                                                  2560 * of sequence numbers we did send (in other words, the sequence number is in the right range but
                                                                                                                                  -
                                                                                                                                  2561 * doesn't correspond to a first sequence number of a packet we'd really sent). Unfortunately we
                                                                                                                                  -
                                                                                                                                  2562 * have no way to detect that fully, since it's not in m_snd_flying_pkts_by_seq_num, and that's basically the only
                                                                                                                                  -
                                                                                                                                  2563 * place we store packet boundaries of sent packets. Suppose we eliminate that possibility.
                                                                                                                                  -
                                                                                                                                  2564 *
                                                                                                                                  -
                                                                                                                                  2565 * Then the only remaining possibility is that this acknowledgment is a duplicate of a previous
                                                                                                                                  -
                                                                                                                                  2566 * one, which had caused us to remove that packet from m_snd_flying_pkts_by_seq_num. So, how DO we handle
                                                                                                                                  -
                                                                                                                                  2567 * a duplicate acknowledgment? We already know they got packet, as we've already measured RTT
                                                                                                                                  -
                                                                                                                                  2568 * from the previous copy of this ack, so there's nothing useful for us. Conclusion: ignore
                                                                                                                                  -
                                                                                                                                  2569 * duplicate acknowledgments.
                                                                                                                                  +
                                                                                                                                  2530 /* Register whether after this window update, if we had a packet to send and no data In-flight,
                                                                                                                                  +
                                                                                                                                  2531 * we would be able to send at least one full DATA packet or not (i.e., can_send() would return
                                                                                                                                  +
                                                                                                                                  2532 * true). That is, register whether Receive window is ~0. */
                                                                                                                                  +
                                                                                                                                  2533 sock->m_snd_stats.updated_rcv_wnd(sock->m_snd_remote_rcv_wnd < sock->max_block_size());
                                                                                                                                  +
                                                                                                                                  2534 }
                                                                                                                                  +
                                                                                                                                  2535
                                                                                                                                  +
                                                                                                                                  2536 /* We've received ACKs and thus have quite likely reduced the number of bytes we
                                                                                                                                  +
                                                                                                                                  2537 * consider In-flight. Moreover we may have increased CWND. Moreover we may have added packets
                                                                                                                                  +
                                                                                                                                  2538 * to retransmit queue (if retransmission is on). Moreover we may have increased m_snd_remote_rcv_wnd.
                                                                                                                                  +
                                                                                                                                  2539 * Therefore can_send() may now return true while at the beginning of the method it returned
                                                                                                                                  +
                                                                                                                                  2540 * false; and similarly for snd_deqable(). So have send_worker() check and send more if possible.
                                                                                                                                  +
                                                                                                                                  2541 * See Node::send() for discussion of overall strategy on this topic. */
                                                                                                                                  +
                                                                                                                                  2542 if ((!could_send_before_acks) || (rexmit_on && (!had_rexmit_data_before_acks)))
                                                                                                                                  +
                                                                                                                                  2543 {
                                                                                                                                  +
                                                                                                                                  2544 send_worker(sock, true);
                                                                                                                                  +
                                                                                                                                  2545 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  +
                                                                                                                                  2546 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  +
                                                                                                                                  2547 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  2548 }
                                                                                                                                  +
                                                                                                                                  2549} // Node::handle_accumulated_acks()
                                                                                                                                  +
                                                                                                                                  2550
                                                                                                                                  + + +
                                                                                                                                  2553 bool* dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter* acked_pkt_it)
                                                                                                                                  +
                                                                                                                                  2554{
                                                                                                                                  +
                                                                                                                                  2555 assert(dupe_or_late);
                                                                                                                                  +
                                                                                                                                  2556 assert(acked_pkt_it);
                                                                                                                                  +
                                                                                                                                  2557
                                                                                                                                  +
                                                                                                                                  2558 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  +
                                                                                                                                  2559 * as of this writing. It figures out whether the given individual ack is invalid, valid but duplicate/late, or
                                                                                                                                  +
                                                                                                                                  2560 * valid and on-time. Results go into the return value and *dupe_or_late and *acked_pkt_it. */
                                                                                                                                  +
                                                                                                                                  2561
                                                                                                                                  +
                                                                                                                                  2562 /* Now to discuss what happens when an ACK is received, with a seemingly valid sequence number
                                                                                                                                  +
                                                                                                                                  2563 * (i.e., in [m_snd_init_seq_num + 1, m_snd_next_seq_num - 1] range) -- but the corresponding
                                                                                                                                  +
                                                                                                                                  2564 * packet is not in m_snd_flying_pkts_by_seq_num. What does this mean? One, unlikely, possibility is
                                                                                                                                  +
                                                                                                                                  2565 * that it's a fake/wrong acknowledgment, not pertaining to any packet we'd sent but in the range
                                                                                                                                  +
                                                                                                                                  2566 * of sequence numbers we did send (in other words, the sequence number is in the right range but
                                                                                                                                  +
                                                                                                                                  2567 * doesn't correspond to a first sequence number of a packet we'd really sent). Unfortunately we
                                                                                                                                  +
                                                                                                                                  2568 * have no way to detect that fully, since it's not in m_snd_flying_pkts_by_seq_num, and that's basically the only
                                                                                                                                  +
                                                                                                                                  2569 * place we store packet boundaries of sent packets. Suppose we eliminate that possibility.
                                                                                                                                  2570 *
                                                                                                                                  -
                                                                                                                                  2571 * Note that the above discussion pertains to a dupe ack where both the sequence number and the
                                                                                                                                  -
                                                                                                                                  2572 * retransmission ID are the same as a previous one. If the retransmission ID is different (only
                                                                                                                                  -
                                                                                                                                  2573 * legal when retransmission is enabled), that's a different situation -- the acknowledgment is
                                                                                                                                  -
                                                                                                                                  2574 * not duplicate but rather acknowledging a different send attempt for the same-numbered packet.
                                                                                                                                  -
                                                                                                                                  2575 * That is less of a corner case and is handled below explicitly.
                                                                                                                                  +
                                                                                                                                  2571 * Then the only remaining possibility is that this acknowledgment is a duplicate of a previous
                                                                                                                                  +
                                                                                                                                  2572 * one, which had caused us to remove that packet from m_snd_flying_pkts_by_seq_num. So, how DO we handle
                                                                                                                                  +
                                                                                                                                  2573 * a duplicate acknowledgment? We already know they got packet, as we've already measured RTT
                                                                                                                                  +
                                                                                                                                  2574 * from the previous copy of this ack, so there's nothing useful for us. Conclusion: ignore
                                                                                                                                  +
                                                                                                                                  2575 * duplicate acknowledgments.
                                                                                                                                  2576 *
                                                                                                                                  -
                                                                                                                                  2577 * Sent, unacknowledged packets are eventually considered Dropped. In terms of our data structures
                                                                                                                                  -
                                                                                                                                  2578 * they are handled just like acknowledged ones. Therefore, an acknowledgment of such a Dropped
                                                                                                                                  -
                                                                                                                                  2579 * packet may arrive. This is a "late" acknowledgment. It is treated just like a duplicate
                                                                                                                                  -
                                                                                                                                  2580 * acknowledgment (in fact, there is no way to tell them apart). (Note that a packet is still
                                                                                                                                  -
                                                                                                                                  2581 * considered Dropped even if retransmission is on -- it's just that in that case it's also queued
                                                                                                                                  -
                                                                                                                                  2582 * on the retransmission queue to be re-sent when possible.)
                                                                                                                                  -
                                                                                                                                  2583 *
                                                                                                                                  -
                                                                                                                                  2584 * Another caveat is that two acknowledgments that are duplicates of each other can get
                                                                                                                                  -
                                                                                                                                  2585 * mis-ordered and thus arrive in opposite order. Thus the one with the longer one-way time would
                                                                                                                                  -
                                                                                                                                  2586 * yield the higher RTT, while the shorter one would get ignored. However, RTT measurement is an
                                                                                                                                  -
                                                                                                                                  2587 * art, not a science, so this is acceptable.
                                                                                                                                  -
                                                                                                                                  2588 *
                                                                                                                                  -
                                                                                                                                  2589 * @todo Acknowledgments themselves could actually be identified with something other other
                                                                                                                                  -
                                                                                                                                  2590 * than sequence numbers and retransmission IDs; e.g., with reflected sender time stamps. Then
                                                                                                                                  -
                                                                                                                                  2591 * one could do fancier stuff... but let's not overdo it for now. */
                                                                                                                                  -
                                                                                                                                  2592
                                                                                                                                  -
                                                                                                                                  2593 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  2594 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  2595 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  2596 auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  -
                                                                                                                                  2597 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  +
                                                                                                                                  2577 * Note that the above discussion pertains to a dupe ack where both the sequence number and the
                                                                                                                                  +
                                                                                                                                  2578 * retransmission ID are the same as a previous one. If the retransmission ID is different (only
                                                                                                                                  +
                                                                                                                                  2579 * legal when retransmission is enabled), that's a different situation -- the acknowledgment is
                                                                                                                                  +
                                                                                                                                  2580 * not duplicate but rather acknowledging a different send attempt for the same-numbered packet.
                                                                                                                                  +
                                                                                                                                  2581 * That is less of a corner case and is handled below explicitly.
                                                                                                                                  +
                                                                                                                                  2582 *
                                                                                                                                  +
                                                                                                                                  2583 * Sent, unacknowledged packets are eventually considered Dropped. In terms of our data structures
                                                                                                                                  +
                                                                                                                                  2584 * they are handled just like acknowledged ones. Therefore, an acknowledgment of such a Dropped
                                                                                                                                  +
                                                                                                                                  2585 * packet may arrive. This is a "late" acknowledgment. It is treated just like a duplicate
                                                                                                                                  +
                                                                                                                                  2586 * acknowledgment (in fact, there is no way to tell them apart). (Note that a packet is still
                                                                                                                                  +
                                                                                                                                  2587 * considered Dropped even if retransmission is on -- it's just that in that case it's also queued
                                                                                                                                  +
                                                                                                                                  2588 * on the retransmission queue to be re-sent when possible.)
                                                                                                                                  +
                                                                                                                                  2589 *
                                                                                                                                  +
                                                                                                                                  2590 * Another caveat is that two acknowledgments that are duplicates of each other can get
                                                                                                                                  +
                                                                                                                                  2591 * mis-ordered and thus arrive in opposite order. Thus the one with the longer one-way time would
                                                                                                                                  +
                                                                                                                                  2592 * yield the higher RTT, while the shorter one would get ignored. However, RTT measurement is an
                                                                                                                                  +
                                                                                                                                  2593 * art, not a science, so this is acceptable.
                                                                                                                                  +
                                                                                                                                  2594 *
                                                                                                                                  +
                                                                                                                                  2595 * @todo Acknowledgments themselves could actually be identified with something other other
                                                                                                                                  +
                                                                                                                                  2596 * than sequence numbers and retransmission IDs; e.g., with reflected sender time stamps. Then
                                                                                                                                  +
                                                                                                                                  2597 * one could do fancier stuff... but let's not overdo it for now. */
                                                                                                                                  2598
                                                                                                                                  -
                                                                                                                                  2599 // First sequence number in acknowledged packet.
                                                                                                                                  -
                                                                                                                                  2600 const Sequence_number& seq_num = ack->m_seq_num;
                                                                                                                                  -
                                                                                                                                  2601 // Retransmission ID (0 = first attempt, 1 = 1st retransmission, 2 = 2nd, ...).
                                                                                                                                  -
                                                                                                                                  2602 const unsigned int rexmit_id = ack->m_rexmit_id;
                                                                                                                                  -
                                                                                                                                  2603 assert(rexmit_on || (rexmit_id == 0)); // Should be guaranteed by deserialization.
                                                                                                                                  +
                                                                                                                                  2599 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  2600 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  2601 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  2602 auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  +
                                                                                                                                  2603 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  2604
                                                                                                                                  -
                                                                                                                                  2605 // Register one individual acknowledgment of unknown # of bytes of data (may or may not be acceptable).
                                                                                                                                  -
                                                                                                                                  2606 snd_stats.received_ack();
                                                                                                                                  -
                                                                                                                                  2607
                                                                                                                                  -
                                                                                                                                  2608 /* Ensure it's within the range of sequence numbers we've already sent.
                                                                                                                                  -
                                                                                                                                  2609 * Note that this doesn't really guarantee its validity. It could be in that range but still
                                                                                                                                  -
                                                                                                                                  2610 * not correspond to any packet we'd actually sent. We try to detect that below. */
                                                                                                                                  -
                                                                                                                                  2611
                                                                                                                                  -
                                                                                                                                  2612 if (!util::in_open_open_range(sock->m_snd_init_seq_num, seq_num, sock->m_snd_next_seq_num))
                                                                                                                                  -
                                                                                                                                  2613 {
                                                                                                                                  -
                                                                                                                                  2614 /* Either the other side is an a-hole, or somehow a socket_id was reused from a recent
                                                                                                                                  -
                                                                                                                                  2615 * connection, which we do try to avoid like the plague. Therefore, send them an RST and
                                                                                                                                  -
                                                                                                                                  2616 * abort connection. If they send more data packets to this port (which is quite possible;
                                                                                                                                  -
                                                                                                                                  2617 * many could already be on the way), they'll get more RSTs still. */
                                                                                                                                  -
                                                                                                                                  2618
                                                                                                                                  -
                                                                                                                                  2619 // Interesting/rare enough to log a WARNING.
                                                                                                                                  -
                                                                                                                                  2620 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2621 "Received [ACK]; "
                                                                                                                                  -
                                                                                                                                  2622 "acknowledgment [" << seq_num << ", ...) is outside (ISN, snd_next) "
                                                                                                                                  -
                                                                                                                                  2623 "range (" << sock->m_snd_init_seq_num << ", " << sock->m_snd_next_seq_num << ").");
                                                                                                                                  +
                                                                                                                                  2605 // First sequence number in acknowledged packet.
                                                                                                                                  +
                                                                                                                                  2606 const Sequence_number& seq_num = ack->m_seq_num;
                                                                                                                                  +
                                                                                                                                  2607 // Retransmission ID (0 = first attempt, 1 = 1st retransmission, 2 = 2nd, ...).
                                                                                                                                  +
                                                                                                                                  2608 const unsigned int rexmit_id = ack->m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  2609 assert(rexmit_on || (rexmit_id == 0)); // Should be guaranteed by deserialization.
                                                                                                                                  +
                                                                                                                                  2610
                                                                                                                                  +
                                                                                                                                  2611 // Register one individual acknowledgment of unknown # of bytes of data (may or may not be acceptable).
                                                                                                                                  +
                                                                                                                                  2612 snd_stats.received_ack();
                                                                                                                                  +
                                                                                                                                  2613
                                                                                                                                  +
                                                                                                                                  2614 /* Ensure it's within the range of sequence numbers we've already sent.
                                                                                                                                  +
                                                                                                                                  2615 * Note that this doesn't really guarantee its validity. It could be in that range but still
                                                                                                                                  +
                                                                                                                                  2616 * not correspond to any packet we'd actually sent. We try to detect that below. */
                                                                                                                                  +
                                                                                                                                  2617
                                                                                                                                  +
                                                                                                                                  2618 if (!util::in_open_open_range(sock->m_snd_init_seq_num, seq_num, sock->m_snd_next_seq_num))
                                                                                                                                  +
                                                                                                                                  2619 {
                                                                                                                                  +
                                                                                                                                  2620 /* Either the other side is an a-hole, or somehow a socket_id was reused from a recent
                                                                                                                                  +
                                                                                                                                  2621 * connection, which we do try to avoid like the plague. Therefore, send them an RST and
                                                                                                                                  +
                                                                                                                                  2622 * abort connection. If they send more data packets to this port (which is quite possible;
                                                                                                                                  +
                                                                                                                                  2623 * many could already be on the way), they'll get more RSTs still. */
                                                                                                                                  2624
                                                                                                                                  -
                                                                                                                                  2625 // Register one individual acknowledgment of unknown # of bytes of data (not acceptable due to error).
                                                                                                                                  -
                                                                                                                                  2626 snd_stats.error_ack();
                                                                                                                                  -
                                                                                                                                  2627
                                                                                                                                  -
                                                                                                                                  2628 /* Close connection in our structures (inform user if necessary as well). Pre-conditions
                                                                                                                                  -
                                                                                                                                  2629 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  -
                                                                                                                                  2630 * S_ESTABLISHED); 3rd arg contains the reason for the close (yes). This will empty the Send
                                                                                                                                  -
                                                                                                                                  2631 * and Receive buffers. That is OK, because this is the abrupt type of close (error). */
                                                                                                                                  -
                                                                                                                                  2632 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  - -
                                                                                                                                  2634 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  -
                                                                                                                                  2635 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  -
                                                                                                                                  2636 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  2637 return false; // Other out-params are meaningless.
                                                                                                                                  -
                                                                                                                                  2638 }
                                                                                                                                  -
                                                                                                                                  2639 // else within sane range.
                                                                                                                                  -
                                                                                                                                  2640
                                                                                                                                  -
                                                                                                                                  2641 // Check if the sequence number matches that of one of the packets we've sent and want acnowledged.
                                                                                                                                  -
                                                                                                                                  2642 *acked_pkt_it = snd_flying_pkts_by_when.find(seq_num);
                                                                                                                                  -
                                                                                                                                  2643 if (*acked_pkt_it == snd_flying_pkts_by_when.past_oldest()) // A/k/a end().
                                                                                                                                  -
                                                                                                                                  2644 {
                                                                                                                                  -
                                                                                                                                  2645 /* No such packet. Assuming no foul play/dumbassery, it's probably a duplicate acknowledgment
                                                                                                                                  -
                                                                                                                                  2646 * (i.e., we've already sent and got the ack, removing that packet from snd_flying_pkts*)
                                                                                                                                  -
                                                                                                                                  2647 * or a late acknowledgment (i.e., we've already sent and eventually considered Dropped the
                                                                                                                                  -
                                                                                                                                  2648 * the packet, removing it from snd_flying_pkts*).
                                                                                                                                  -
                                                                                                                                  2649 *
                                                                                                                                  -
                                                                                                                                  2650 * There is a corner case if retransmission is on. Suppose we sent packet P, consider it
                                                                                                                                  -
                                                                                                                                  2651 * Dropped (removing it from snd_flying_pkts*), and thus we place it on retransmission
                                                                                                                                  -
                                                                                                                                  2652 * queue. Suppose there is not enough CWND space to send it right away, so while it's pending
                                                                                                                                  -
                                                                                                                                  2653 * on that queue, we now get a late ack for it. Ideally in this case we'd remember it was in
                                                                                                                                  -
                                                                                                                                  2654 * retransmission queue, remove it from there, and basically act as if we hadn't removed it
                                                                                                                                  -
                                                                                                                                  2655 * from snd_flying_pkts* and got the ack for it. Instead we're just going to ignore this
                                                                                                                                  -
                                                                                                                                  2656 * information and needlessly retransmit. So why do this? Answer: It is troublesome to
                                                                                                                                  -
                                                                                                                                  2657 * design and code this. The part where we wouldn't retransmit it is fairly straightforward
                                                                                                                                  -
                                                                                                                                  2658 * and is a nice @todo. However acting as if it was normally ACKed after all is complex; for
                                                                                                                                  -
                                                                                                                                  2659 * instance, since we thought it was Dropped, we already informed m_cong_ctl of the loss event
                                                                                                                                  -
                                                                                                                                  2660 * -- how can we undo that in a clean way? It does not seem worth it. Again, checking
                                                                                                                                  -
                                                                                                                                  2661 * and updating the retransmission queue, though, is a nice @todo (but would ideally need fast
                                                                                                                                  -
                                                                                                                                  2662 * lookup into that linked list so not totally trivial).
                                                                                                                                  -
                                                                                                                                  2663 *
                                                                                                                                  -
                                                                                                                                  2664 * So, let's say that the concession described in the previous paragraph is OK.
                                                                                                                                  -
                                                                                                                                  2665 *
                                                                                                                                  -
                                                                                                                                  2666 * Could also be invalid. We only know seq_num (one boundary of packet), so how do we detect
                                                                                                                                  -
                                                                                                                                  2667 * it's invalid? One case where we know it's invalid is if this left boundary happens to be
                                                                                                                                  -
                                                                                                                                  2668 * straddled by a sequence number range in an element of snd_flying_pkts_by_seq. That would mean
                                                                                                                                  -
                                                                                                                                  2669 * that the same sequence number is in two different packets, which is in no way legal.
                                                                                                                                  -
                                                                                                                                  2670 * Example: we sent [5, 10), then received ACK with [7, ...). 7 is inside [5, 10) and is
                                                                                                                                  -
                                                                                                                                  2671 * thus illegal. */
                                                                                                                                  -
                                                                                                                                  2672
                                                                                                                                  -
                                                                                                                                  2673 /* Here's the technique we use. snd_flying_pkts_by_seq.upper_bound(S) gets the first packet
                                                                                                                                  -
                                                                                                                                  2674 * [U1, U2) such that U1 > S. Let prev(P) denote the packet preceding P in
                                                                                                                                  -
                                                                                                                                  2675 * snd_flying_pkts_by_seq; let prev([U1, U2)) = [L1, L2). Note that [U1, U2) may not exist
                                                                                                                                  -
                                                                                                                                  2676 * -- i.e., nothing after S is in the map. If so, [U1, U2) == snd_flying_pkts_by_seq.end(). Even
                                                                                                                                  -
                                                                                                                                  2677 * in that case [L1, L2) = prev([U1, U2)) MAY still exist; it is the last element of
                                                                                                                                  -
                                                                                                                                  2678 * snd_flying_pkts_by_seq in that situation.
                                                                                                                                  -
                                                                                                                                  2679 *
                                                                                                                                  -
                                                                                                                                  2680 * Given that, here are all the situations that mean P is straddled by a packet:
                                                                                                                                  -
                                                                                                                                  2681 *
                                                                                                                                  -
                                                                                                                                  2682 * - S inside [U1, U2) or any packet after it.
                                                                                                                                  -
                                                                                                                                  2683 * - Impossible. U1 > S by definition; so S is not inside any packet at U1 or later.
                                                                                                                                  -
                                                                                                                                  2684 * - S inside [L1, L2).
                                                                                                                                  -
                                                                                                                                  2685 * - Possible. We know S > L1, since otherwise S <= L1, which means we can't be inside this
                                                                                                                                  -
                                                                                                                                  2686 * if (and we are), or snd_flying_pkts_by_seq.upper_bound(S) == [L1, L2) (not true, since
                                                                                                                                  -
                                                                                                                                  2687 * snd_flying_pkts_by_seq.upper_bound(S) == [U1, U2), which != [L1, L2)). So, since S > L1,
                                                                                                                                  -
                                                                                                                                  2688 * we must check for S < L2. If true, S is straddled.
                                                                                                                                  -
                                                                                                                                  2689 * - S inside some packet [K1, K2) before [L1, L2).
                                                                                                                                  -
                                                                                                                                  2690 * - Impossible. Suppose S is inside [K1, K2) immediately preceding [L1, L2). Then
                                                                                                                                  -
                                                                                                                                  2691 * snd_flying_pkts_by_seq.upper_bound(S) == [L1, L2). But we already know
                                                                                                                                  -
                                                                                                                                  2692 * snd_flying_pkts_by_seq.upper_bound(S) == [U1, U2) (which != [L1, L2)). So that's
                                                                                                                                  -
                                                                                                                                  2693 * impossible. Repeat this logic for all packets [K1, K2) preceding [L1, L2) to show that
                                                                                                                                  -
                                                                                                                                  2694 * it can't be straddled by any of those either.
                                                                                                                                  -
                                                                                                                                  2695 *
                                                                                                                                  -
                                                                                                                                  2696 * Therefore, S is straddled by a packet if and only if:
                                                                                                                                  -
                                                                                                                                  2697 * - prev(snd_flying_pkts_by_seq.upper_bound(S)) exists; call it [L1, L2); and
                                                                                                                                  -
                                                                                                                                  2698 * - S < L2.
                                                                                                                                  -
                                                                                                                                  2699 *
                                                                                                                                  -
                                                                                                                                  2700 * This can be further restated as:
                                                                                                                                  -
                                                                                                                                  2701 * - snd_flying_pkts_by_seq.upper_bound(S) != snd_flying_pkts_by_seq.begin(); and
                                                                                                                                  -
                                                                                                                                  2702 * - (letting [L1, L2) = prev(snd_flying_pkts_by_seq.upper_bound(S)))
                                                                                                                                  -
                                                                                                                                  2703 * S < L2.
                                                                                                                                  -
                                                                                                                                  2704 *
                                                                                                                                  -
                                                                                                                                  2705 * So check for that. */
                                                                                                                                  -
                                                                                                                                  2706
                                                                                                                                  -
                                                                                                                                  2707 // Find U.
                                                                                                                                  -
                                                                                                                                  2708 Peer_socket::Sent_pkt_ordered_by_seq_const_iter pkt_it = snd_flying_pkts_by_seq.upper_bound(seq_num);
                                                                                                                                  -
                                                                                                                                  2709 // Check that prev(U) exists.
                                                                                                                                  -
                                                                                                                                  2710 if (pkt_it != snd_flying_pkts_by_seq.begin())
                                                                                                                                  -
                                                                                                                                  2711 {
                                                                                                                                  -
                                                                                                                                  2712 // prev(U) = L exists. Compute L.
                                                                                                                                  -
                                                                                                                                  2713 --pkt_it;
                                                                                                                                  -
                                                                                                                                  2714 // Compute [L1, L2), and check for straddling: S < L2. pkt_it->second points into snd_flying_pkts_by_when.
                                                                                                                                  -
                                                                                                                                  2715 Sequence_number l1, l2;
                                                                                                                                  -
                                                                                                                                  2716 get_seq_num_range(pkt_it->second, &l1, &l2);
                                                                                                                                  -
                                                                                                                                  2717
                                                                                                                                  -
                                                                                                                                  2718 assert(l1 < seq_num); // Sanity-check of upper_bound().
                                                                                                                                  -
                                                                                                                                  2719 if (seq_num < l2)
                                                                                                                                  -
                                                                                                                                  2720 {
                                                                                                                                  -
                                                                                                                                  2721 // Straddles. Other side is sending us bad stuff. As above, warn and RST/close.
                                                                                                                                  -
                                                                                                                                  2722
                                                                                                                                  -
                                                                                                                                  2723 // Register one individual acknowledgment of unknown # of bytes of data (not acceptable due to error).
                                                                                                                                  -
                                                                                                                                  2724 snd_stats.error_ack();
                                                                                                                                  -
                                                                                                                                  2725
                                                                                                                                  -
                                                                                                                                  2726 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2727 "Received [ACK]; "
                                                                                                                                  -
                                                                                                                                  2728 "acknowledgment [" << seq_num << ", ...) is at least partially inside "
                                                                                                                                  -
                                                                                                                                  2729 "packet [" << l1 << ", " << l2 << ").");
                                                                                                                                  -
                                                                                                                                  2730 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_SEQ_NUM_ARITHMETIC_FAILURE, true);
                                                                                                                                  -
                                                                                                                                  2731 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  -
                                                                                                                                  2732 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  -
                                                                                                                                  2733 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  2734 return false; // Other out-params are meaningless.
                                                                                                                                  -
                                                                                                                                  2735 }
                                                                                                                                  -
                                                                                                                                  2736 // else if (seq_num >= l2) { It's past [L1, L2); does not straddle. }
                                                                                                                                  -
                                                                                                                                  2737 }
                                                                                                                                  -
                                                                                                                                  2738 // else { Legit because there is no packet L that could possibly straddle seq_num. }
                                                                                                                                  -
                                                                                                                                  2739
                                                                                                                                  -
                                                                                                                                  2740 /* OK, so NOW do we know it's a duplicate/late acknowledgment? Well, no. Suppose we sent packet
                                                                                                                                  -
                                                                                                                                  2741 * [5, 10) and get ACK with [5, ...). That's fine. So we erase [5, 10) from
                                                                                                                                  -
                                                                                                                                  2742 * snd_flying_pkts_by_seq. Now say we get ACK with [7, ...). Well, that's in the
                                                                                                                                  -
                                                                                                                                  2743 * [m_snd_next_seq_num, m_snd_next_seq_num) range certainly; and it doesn't get straddled by
                                                                                                                                  -
                                                                                                                                  2744 * any member of snd_flying_pkts_by_seq. Yet it's certainly invalid: we never sent (and could've
                                                                                                                                  -
                                                                                                                                  2745 * never sent) [7, ...). We can't know that, however, since [5, 10) is gone from
                                                                                                                                  -
                                                                                                                                  2746 * snd_flying_pkts_by_seq. Is this OK? More or less, yes. What do we do with a duplicate/late
                                                                                                                                  -
                                                                                                                                  2747 * acknowledgment just below? We log and ignore it. That doesn't seem harmful. NORMALLY
                                                                                                                                  -
                                                                                                                                  2748 * when something is invalid we'd RST and close connection, but here we can't know we should
                                                                                                                                  -
                                                                                                                                  2749 * do that; however ignoring it still seems fine and better than doggedly inventing data
                                                                                                                                  -
                                                                                                                                  2750 * structures to detect this corner case.
                                                                                                                                  -
                                                                                                                                  2751 *
                                                                                                                                  -
                                                                                                                                  2752 * What about m_snd_cong_ctl? Should we report this in m_snd_cong_ctl->on_acks()?
                                                                                                                                  -
                                                                                                                                  2753 * No. on_acks() specifically documents that it wants info on
                                                                                                                                  -
                                                                                                                                  2754 * In-flight->Acknowledged acknowledgments, not duplicates. (Briefly,
                                                                                                                                  -
                                                                                                                                  2755 * that's because it's measuring sent data in the pipe; acknowledgment duplication has unclear
                                                                                                                                  -
                                                                                                                                  2756 * implications about what it's acknowledging; it is unlikely that it represents more pipe
                                                                                                                                  -
                                                                                                                                  2757 * being available than if only one acknolwedgment had been received. In any case this should
                                                                                                                                  -
                                                                                                                                  2758 * hopefully be pretty rare and thus not too significant either way.)
                                                                                                                                  -
                                                                                                                                  2759 *
                                                                                                                                  -
                                                                                                                                  2760 * Same reasoning for not counting it in m_snd_bandwidth_estimator->on_acks(). */
                                                                                                                                  -
                                                                                                                                  2761
                                                                                                                                  -
                                                                                                                                  2762 // Per above discussion, ignore duplicate (or maybe invalid, but we can't know/assume that) acknowledgment.
                                                                                                                                  -
                                                                                                                                  2763
                                                                                                                                  -
                                                                                                                                  2764 // Register one individual acknowledgment of unknown # of bytes of data (late, dupe, or maybe invalid).
                                                                                                                                  -
                                                                                                                                  2765 snd_stats.late_or_dupe_ack();
                                                                                                                                  -
                                                                                                                                  2766
                                                                                                                                  -
                                                                                                                                  2767 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2768 "Acknowledged packet [" << seq_num << ", ...) is duplicate or late (or invalid). "
                                                                                                                                  -
                                                                                                                                  2769 "RTT unknown. Ignoring.");
                                                                                                                                  -
                                                                                                                                  2770
                                                                                                                                  -
                                                                                                                                  2771 // Ensure out-params indicating a dupe/late ack such that the packet being acked is not known.
                                                                                                                                  -
                                                                                                                                  2772 *dupe_or_late = true;
                                                                                                                                  -
                                                                                                                                  2773 assert(*acked_pkt_it == snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  -
                                                                                                                                  2774 return true;
                                                                                                                                  -
                                                                                                                                  2775 } // if (seq_num is not in snd_flying_pkts*) // i.e., duplicate/late acknowledgment with unknown acked packet.
                                                                                                                                  -
                                                                                                                                  2776 // else if (seq_num IS in snd_flying_pkts*): *acked_pkt_it points to snd_flying_pkts_by_when[seq_num].
                                                                                                                                  -
                                                                                                                                  2777 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  -
                                                                                                                                  2778
                                                                                                                                  -
                                                                                                                                  2779 // It's an ack of sequence number we'd sent, but if retransmission is on it may not be of the one we LAST sent.
                                                                                                                                  -
                                                                                                                                  2780
                                                                                                                                  -
                                                                                                                                  2781 const Peer_socket::Sent_packet& acked_pkt = *((*acked_pkt_it)->second);
                                                                                                                                  -
                                                                                                                                  2782 const unsigned int acked_rexmit_id = rexmit_on ? acked_pkt.m_packet->m_rexmit_id : 0;
                                                                                                                                  -
                                                                                                                                  2783 Sequence_number seq_num_end; // Get sequence number just past last datum in packet.
                                                                                                                                  -
                                                                                                                                  2784 get_seq_num_range(*acked_pkt_it, 0, &seq_num_end);
                                                                                                                                  -
                                                                                                                                  2785
                                                                                                                                  -
                                                                                                                                  2786 // Note that both rexmit_id and acked_rexmit_id are guaranteed 0 at this point if !rexmit_on.
                                                                                                                                  -
                                                                                                                                  2787
                                                                                                                                  -
                                                                                                                                  2788 if (rexmit_id > acked_rexmit_id)
                                                                                                                                  -
                                                                                                                                  2789 {
                                                                                                                                  -
                                                                                                                                  2790 // This is entirely illegal. Can't acknowledge a packet copy we hadn't sent yet.
                                                                                                                                  -
                                                                                                                                  2791 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2792 "Acknowledged packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  2793 "rexmit_id [" << int(rexmit_id) << "] "
                                                                                                                                  -
                                                                                                                                  2794 "exceeds highest sent rexmit_id [" << int(acked_rexmit_id) << "].");
                                                                                                                                  -
                                                                                                                                  2795 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_SEQ_NUM_ARITHMETIC_FAILURE, true);
                                                                                                                                  -
                                                                                                                                  2796 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  -
                                                                                                                                  2797 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  -
                                                                                                                                  2798 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  2799 return false; // Other out-params are meaningless.
                                                                                                                                  -
                                                                                                                                  2800 }
                                                                                                                                  -
                                                                                                                                  2801 // else if (rexmit_id <= acked_rexmit_id)
                                                                                                                                  -
                                                                                                                                  2802
                                                                                                                                  -
                                                                                                                                  2803 if (rexmit_id != acked_rexmit_id)
                                                                                                                                  -
                                                                                                                                  2804 {
                                                                                                                                  -
                                                                                                                                  2805 assert(rexmit_id < acked_rexmit_id);
                                                                                                                                  -
                                                                                                                                  2806
                                                                                                                                  -
                                                                                                                                  2807 /* This is legal: it's possible we had sent packet P, considered it Dropped, retransmitted it
                                                                                                                                  -
                                                                                                                                  2808 * (thus incrementing rexmit_id), and have now received a late acknowledgment of the
                                                                                                                                  -
                                                                                                                                  2809 * PREVIOUS attempt to send P (before retransmission). We could actually consider this
                                                                                                                                  -
                                                                                                                                  2810 * entirely equivalent to simply getting the last attempt acked. In fact I specifically kept
                                                                                                                                  -
                                                                                                                                  2811 * an array for m_sent_when, so that we can even compute accurate RTT. Yet, at least for now,
                                                                                                                                  -
                                                                                                                                  2812 * I am going to ignore such an acknowledgment. Reasons:
                                                                                                                                  -
                                                                                                                                  2813 *
                                                                                                                                  -
                                                                                                                                  2814 * - The RTT may be an outlier affected by some random event; we considered it Dropped, so
                                                                                                                                  -
                                                                                                                                  2815 * if those heuristics are generally sound, getting a late ack is suspicious.
                                                                                                                                  -
                                                                                                                                  2816 *
                                                                                                                                  -
                                                                                                                                  2817 * - Suppose I do take the RTT and report to congestion control, use for SRTT computation,
                                                                                                                                  -
                                                                                                                                  2818 * and remove from snd_flying_pkts*. I've in effect recorded a loss but then also
                                                                                                                                  -
                                                                                                                                  2819 * reported a successful retransmission, even though the ack is not for the retransmission
                                                                                                                                  -
                                                                                                                                  2820 * but more like a correction on the original loss. That's potentially fine, but chances
                                                                                                                                  -
                                                                                                                                  2821 * are I will soon receive the ack for the latest transmission, which is what I was really
                                                                                                                                  -
                                                                                                                                  2822 * expecting. That one will now be considered a late ack and will be ignored, even though
                                                                                                                                  -
                                                                                                                                  2823 * that RTT is actually probably more accurate, since chances are it arrived before the
                                                                                                                                  -
                                                                                                                                  2824 * retransmission would've been considered Dropped as well. So, basically, we're kind of
                                                                                                                                  -
                                                                                                                                  2825 * trying to use the "two wrongs make a right" philosophy, which seems messy.
                                                                                                                                  -
                                                                                                                                  2826 *
                                                                                                                                  -
                                                                                                                                  2827 * - Earlier in the method, I mentioned that if we detect P as dropped and queue it for
                                                                                                                                  -
                                                                                                                                  2828 * retransmission but get P acked *before* we get a chance to retransmit, then we consider
                                                                                                                                  -
                                                                                                                                  2829 * that ack as late and ignore it (and will still retransmit P). The reasons for that are
                                                                                                                                  -
                                                                                                                                  2830 * given in that comment. However, given that we made that decision, it would seem
                                                                                                                                  -
                                                                                                                                  2831 * strange to follow a different philosophy just because we did happen to get to
                                                                                                                                  -
                                                                                                                                  2832 * retransmit P. That would be inconsistent.
                                                                                                                                  -
                                                                                                                                  2833 *
                                                                                                                                  -
                                                                                                                                  2834 * - Keeping it in perspective, it should be fairly rare that a packet we considered Dropped
                                                                                                                                  -
                                                                                                                                  2835 * is acked after all. So it is perhaps not worth the trouble to go crazy about this
                                                                                                                                  -
                                                                                                                                  2836 * corner case.
                                                                                                                                  -
                                                                                                                                  2837 *
                                                                                                                                  -
                                                                                                                                  2838 * Nevertheless, a @todo would be to experimentally measure the effect of this policy and
                                                                                                                                  -
                                                                                                                                  2839 * decide whether it is sound. In that case also consider the aforementioned "P is acked
                                                                                                                                  -
                                                                                                                                  2840 * after queued for retransmission but before retransmitted" corner case. */
                                                                                                                                  -
                                                                                                                                  2841
                                                                                                                                  -
                                                                                                                                  2842 // Register one individual acknowledgment of unknown # of bytes of data (late).
                                                                                                                                  -
                                                                                                                                  2843 snd_stats.late_or_dupe_ack();
                                                                                                                                  -
                                                                                                                                  2844
                                                                                                                                  -
                                                                                                                                  2845 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  2846 "Acknowledged packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  2847 "order_num [" << acked_pkt.m_sent_when[rexmit_id].m_order_num << "] "
                                                                                                                                  -
                                                                                                                                  2848 "rexmit_id [" << int(rexmit_id) << "] "
                                                                                                                                  -
                                                                                                                                  2849 "is less than highest sent [" << int(acked_rexmit_id) << "]. Ignoring.");
                                                                                                                                  +
                                                                                                                                  2625 // Interesting/rare enough to log a WARNING.
                                                                                                                                  +
                                                                                                                                  2626 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2627 "Received [ACK]; "
                                                                                                                                  +
                                                                                                                                  2628 "acknowledgment [" << seq_num << ", ...) is outside (ISN, snd_next) "
                                                                                                                                  +
                                                                                                                                  2629 "range (" << sock->m_snd_init_seq_num << ", " << sock->m_snd_next_seq_num << ").");
                                                                                                                                  +
                                                                                                                                  2630
                                                                                                                                  +
                                                                                                                                  2631 // Register one individual acknowledgment of unknown # of bytes of data (not acceptable due to error).
                                                                                                                                  +
                                                                                                                                  2632 snd_stats.error_ack();
                                                                                                                                  +
                                                                                                                                  2633
                                                                                                                                  +
                                                                                                                                  2634 /* Close connection in our structures (inform user if necessary as well). Pre-conditions
                                                                                                                                  +
                                                                                                                                  2635 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  +
                                                                                                                                  2636 * S_ESTABLISHED); 3rd arg contains the reason for the close (yes). This will empty the Send
                                                                                                                                  +
                                                                                                                                  2637 * and Receive buffers. That is OK, because this is the abrupt type of close (error). */
                                                                                                                                  +
                                                                                                                                  2638 rst_and_close_connection_immediately(socket_id, sock,
                                                                                                                                  + +
                                                                                                                                  2640 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  +
                                                                                                                                  2641 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  +
                                                                                                                                  2642 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  2643 return false; // Other out-params are meaningless.
                                                                                                                                  +
                                                                                                                                  2644 }
                                                                                                                                  +
                                                                                                                                  2645 // else within sane range.
                                                                                                                                  +
                                                                                                                                  2646
                                                                                                                                  +
                                                                                                                                  2647 // Check if the sequence number matches that of one of the packets we've sent and want acnowledged.
                                                                                                                                  +
                                                                                                                                  2648 *acked_pkt_it = snd_flying_pkts_by_when.find(seq_num);
                                                                                                                                  +
                                                                                                                                  2649 if (*acked_pkt_it == snd_flying_pkts_by_when.past_oldest()) // A/k/a end().
                                                                                                                                  +
                                                                                                                                  2650 {
                                                                                                                                  +
                                                                                                                                  2651 /* No such packet. Assuming no foul play/dumbassery, it's probably a duplicate acknowledgment
                                                                                                                                  +
                                                                                                                                  2652 * (i.e., we've already sent and got the ack, removing that packet from snd_flying_pkts*)
                                                                                                                                  +
                                                                                                                                  2653 * or a late acknowledgment (i.e., we've already sent and eventually considered Dropped the
                                                                                                                                  +
                                                                                                                                  2654 * the packet, removing it from snd_flying_pkts*).
                                                                                                                                  +
                                                                                                                                  2655 *
                                                                                                                                  +
                                                                                                                                  2656 * There is a corner case if retransmission is on. Suppose we sent packet P, consider it
                                                                                                                                  +
                                                                                                                                  2657 * Dropped (removing it from snd_flying_pkts*), and thus we place it on retransmission
                                                                                                                                  +
                                                                                                                                  2658 * queue. Suppose there is not enough CWND space to send it right away, so while it's pending
                                                                                                                                  +
                                                                                                                                  2659 * on that queue, we now get a late ack for it. Ideally in this case we'd remember it was in
                                                                                                                                  +
                                                                                                                                  2660 * retransmission queue, remove it from there, and basically act as if we hadn't removed it
                                                                                                                                  +
                                                                                                                                  2661 * from snd_flying_pkts* and got the ack for it. Instead we're just going to ignore this
                                                                                                                                  +
                                                                                                                                  2662 * information and needlessly retransmit. So why do this? Answer: It is troublesome to
                                                                                                                                  +
                                                                                                                                  2663 * design and code this. The part where we wouldn't retransmit it is fairly straightforward
                                                                                                                                  +
                                                                                                                                  2664 * and is a nice @todo. However acting as if it was normally ACKed after all is complex; for
                                                                                                                                  +
                                                                                                                                  2665 * instance, since we thought it was Dropped, we already informed m_cong_ctl of the loss event
                                                                                                                                  +
                                                                                                                                  2666 * -- how can we undo that in a clean way? It does not seem worth it. Again, checking
                                                                                                                                  +
                                                                                                                                  2667 * and updating the retransmission queue, though, is a nice @todo (but would ideally need fast
                                                                                                                                  +
                                                                                                                                  2668 * lookup into that linked list so not totally trivial).
                                                                                                                                  +
                                                                                                                                  2669 *
                                                                                                                                  +
                                                                                                                                  2670 * So, let's say that the concession described in the previous paragraph is OK.
                                                                                                                                  +
                                                                                                                                  2671 *
                                                                                                                                  +
                                                                                                                                  2672 * Could also be invalid. We only know seq_num (one boundary of packet), so how do we detect
                                                                                                                                  +
                                                                                                                                  2673 * it's invalid? One case where we know it's invalid is if this left boundary happens to be
                                                                                                                                  +
                                                                                                                                  2674 * straddled by a sequence number range in an element of snd_flying_pkts_by_seq. That would mean
                                                                                                                                  +
                                                                                                                                  2675 * that the same sequence number is in two different packets, which is in no way legal.
                                                                                                                                  +
                                                                                                                                  2676 * Example: we sent [5, 10), then received ACK with [7, ...). 7 is inside [5, 10) and is
                                                                                                                                  +
                                                                                                                                  2677 * thus illegal. */
                                                                                                                                  +
                                                                                                                                  2678
                                                                                                                                  +
                                                                                                                                  2679 /* Here's the technique we use. snd_flying_pkts_by_seq.upper_bound(S) gets the first packet
                                                                                                                                  +
                                                                                                                                  2680 * [U1, U2) such that U1 > S. Let prev(P) denote the packet preceding P in
                                                                                                                                  +
                                                                                                                                  2681 * snd_flying_pkts_by_seq; let prev([U1, U2)) = [L1, L2). Note that [U1, U2) may not exist
                                                                                                                                  +
                                                                                                                                  2682 * -- i.e., nothing after S is in the map. If so, [U1, U2) == snd_flying_pkts_by_seq.end(). Even
                                                                                                                                  +
                                                                                                                                  2683 * in that case [L1, L2) = prev([U1, U2)) MAY still exist; it is the last element of
                                                                                                                                  +
                                                                                                                                  2684 * snd_flying_pkts_by_seq in that situation.
                                                                                                                                  +
                                                                                                                                  2685 *
                                                                                                                                  +
                                                                                                                                  2686 * Given that, here are all the situations that mean P is straddled by a packet:
                                                                                                                                  +
                                                                                                                                  2687 *
                                                                                                                                  +
                                                                                                                                  2688 * - S inside [U1, U2) or any packet after it.
                                                                                                                                  +
                                                                                                                                  2689 * - Impossible. U1 > S by definition; so S is not inside any packet at U1 or later.
                                                                                                                                  +
                                                                                                                                  2690 * - S inside [L1, L2).
                                                                                                                                  +
                                                                                                                                  2691 * - Possible. We know S > L1, since otherwise S <= L1, which means we can't be inside this
                                                                                                                                  +
                                                                                                                                  2692 * if (and we are), or snd_flying_pkts_by_seq.upper_bound(S) == [L1, L2) (not true, since
                                                                                                                                  +
                                                                                                                                  2693 * snd_flying_pkts_by_seq.upper_bound(S) == [U1, U2), which != [L1, L2)). So, since S > L1,
                                                                                                                                  +
                                                                                                                                  2694 * we must check for S < L2. If true, S is straddled.
                                                                                                                                  +
                                                                                                                                  2695 * - S inside some packet [K1, K2) before [L1, L2).
                                                                                                                                  +
                                                                                                                                  2696 * - Impossible. Suppose S is inside [K1, K2) immediately preceding [L1, L2). Then
                                                                                                                                  +
                                                                                                                                  2697 * snd_flying_pkts_by_seq.upper_bound(S) == [L1, L2). But we already know
                                                                                                                                  +
                                                                                                                                  2698 * snd_flying_pkts_by_seq.upper_bound(S) == [U1, U2) (which != [L1, L2)). So that's
                                                                                                                                  +
                                                                                                                                  2699 * impossible. Repeat this logic for all packets [K1, K2) preceding [L1, L2) to show that
                                                                                                                                  +
                                                                                                                                  2700 * it can't be straddled by any of those either.
                                                                                                                                  +
                                                                                                                                  2701 *
                                                                                                                                  +
                                                                                                                                  2702 * Therefore, S is straddled by a packet if and only if:
                                                                                                                                  +
                                                                                                                                  2703 * - prev(snd_flying_pkts_by_seq.upper_bound(S)) exists; call it [L1, L2); and
                                                                                                                                  +
                                                                                                                                  2704 * - S < L2.
                                                                                                                                  +
                                                                                                                                  2705 *
                                                                                                                                  +
                                                                                                                                  2706 * This can be further restated as:
                                                                                                                                  +
                                                                                                                                  2707 * - snd_flying_pkts_by_seq.upper_bound(S) != snd_flying_pkts_by_seq.begin(); and
                                                                                                                                  +
                                                                                                                                  2708 * - (letting [L1, L2) = prev(snd_flying_pkts_by_seq.upper_bound(S)))
                                                                                                                                  +
                                                                                                                                  2709 * S < L2.
                                                                                                                                  +
                                                                                                                                  2710 *
                                                                                                                                  +
                                                                                                                                  2711 * So check for that. */
                                                                                                                                  +
                                                                                                                                  2712
                                                                                                                                  +
                                                                                                                                  2713 // Find U.
                                                                                                                                  +
                                                                                                                                  2714 Peer_socket::Sent_pkt_ordered_by_seq_const_iter pkt_it = snd_flying_pkts_by_seq.upper_bound(seq_num);
                                                                                                                                  +
                                                                                                                                  2715 // Check that prev(U) exists.
                                                                                                                                  +
                                                                                                                                  2716 if (pkt_it != snd_flying_pkts_by_seq.begin())
                                                                                                                                  +
                                                                                                                                  2717 {
                                                                                                                                  +
                                                                                                                                  2718 // prev(U) = L exists. Compute L.
                                                                                                                                  +
                                                                                                                                  2719 --pkt_it;
                                                                                                                                  +
                                                                                                                                  2720 // Compute [L1, L2), and check for straddling: S < L2. pkt_it->second points into snd_flying_pkts_by_when.
                                                                                                                                  +
                                                                                                                                  2721 Sequence_number l1, l2;
                                                                                                                                  +
                                                                                                                                  2722 get_seq_num_range(pkt_it->second, &l1, &l2);
                                                                                                                                  +
                                                                                                                                  2723
                                                                                                                                  +
                                                                                                                                  2724 assert(l1 < seq_num); // Sanity-check of upper_bound().
                                                                                                                                  +
                                                                                                                                  2725 if (seq_num < l2)
                                                                                                                                  +
                                                                                                                                  2726 {
                                                                                                                                  +
                                                                                                                                  2727 // Straddles. Other side is sending us bad stuff. As above, warn and RST/close.
                                                                                                                                  +
                                                                                                                                  2728
                                                                                                                                  +
                                                                                                                                  2729 // Register one individual acknowledgment of unknown # of bytes of data (not acceptable due to error).
                                                                                                                                  +
                                                                                                                                  2730 snd_stats.error_ack();
                                                                                                                                  +
                                                                                                                                  2731
                                                                                                                                  +
                                                                                                                                  2732 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2733 "Received [ACK]; "
                                                                                                                                  +
                                                                                                                                  2734 "acknowledgment [" << seq_num << ", ...) is at least partially inside "
                                                                                                                                  +
                                                                                                                                  2735 "packet [" << l1 << ", " << l2 << ").");
                                                                                                                                  +
                                                                                                                                  2736 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_SEQ_NUM_ARITHMETIC_FAILURE, true);
                                                                                                                                  +
                                                                                                                                  2737 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  +
                                                                                                                                  2738 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  +
                                                                                                                                  2739 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  2740 return false; // Other out-params are meaningless.
                                                                                                                                  +
                                                                                                                                  2741 }
                                                                                                                                  +
                                                                                                                                  2742 // else if (seq_num >= l2) { It's past [L1, L2); does not straddle. }
                                                                                                                                  +
                                                                                                                                  2743 }
                                                                                                                                  +
                                                                                                                                  2744 // else { Legit because there is no packet L that could possibly straddle seq_num. }
                                                                                                                                  +
                                                                                                                                  2745
                                                                                                                                  +
                                                                                                                                  2746 /* OK, so NOW do we know it's a duplicate/late acknowledgment? Well, no. Suppose we sent packet
                                                                                                                                  +
                                                                                                                                  2747 * [5, 10) and get ACK with [5, ...). That's fine. So we erase [5, 10) from
                                                                                                                                  +
                                                                                                                                  2748 * snd_flying_pkts_by_seq. Now say we get ACK with [7, ...). Well, that's in the
                                                                                                                                  +
                                                                                                                                  2749 * [m_snd_next_seq_num, m_snd_next_seq_num) range certainly; and it doesn't get straddled by
                                                                                                                                  +
                                                                                                                                  2750 * any member of snd_flying_pkts_by_seq. Yet it's certainly invalid: we never sent (and could've
                                                                                                                                  +
                                                                                                                                  2751 * never sent) [7, ...). We can't know that, however, since [5, 10) is gone from
                                                                                                                                  +
                                                                                                                                  2752 * snd_flying_pkts_by_seq. Is this OK? More or less, yes. What do we do with a duplicate/late
                                                                                                                                  +
                                                                                                                                  2753 * acknowledgment just below? We log and ignore it. That doesn't seem harmful. NORMALLY
                                                                                                                                  +
                                                                                                                                  2754 * when something is invalid we'd RST and close connection, but here we can't know we should
                                                                                                                                  +
                                                                                                                                  2755 * do that; however ignoring it still seems fine and better than doggedly inventing data
                                                                                                                                  +
                                                                                                                                  2756 * structures to detect this corner case.
                                                                                                                                  +
                                                                                                                                  2757 *
                                                                                                                                  +
                                                                                                                                  2758 * What about m_snd_cong_ctl? Should we report this in m_snd_cong_ctl->on_acks()?
                                                                                                                                  +
                                                                                                                                  2759 * No. on_acks() specifically documents that it wants info on
                                                                                                                                  +
                                                                                                                                  2760 * In-flight->Acknowledged acknowledgments, not duplicates. (Briefly,
                                                                                                                                  +
                                                                                                                                  2761 * that's because it's measuring sent data in the pipe; acknowledgment duplication has unclear
                                                                                                                                  +
                                                                                                                                  2762 * implications about what it's acknowledging; it is unlikely that it represents more pipe
                                                                                                                                  +
                                                                                                                                  2763 * being available than if only one acknolwedgment had been received. In any case this should
                                                                                                                                  +
                                                                                                                                  2764 * hopefully be pretty rare and thus not too significant either way.)
                                                                                                                                  +
                                                                                                                                  2765 *
                                                                                                                                  +
                                                                                                                                  2766 * Same reasoning for not counting it in m_snd_bandwidth_estimator->on_acks(). */
                                                                                                                                  +
                                                                                                                                  2767
                                                                                                                                  +
                                                                                                                                  2768 // Per above discussion, ignore duplicate (or maybe invalid, but we can't know/assume that) acknowledgment.
                                                                                                                                  +
                                                                                                                                  2769
                                                                                                                                  +
                                                                                                                                  2770 // Register one individual acknowledgment of unknown # of bytes of data (late, dupe, or maybe invalid).
                                                                                                                                  +
                                                                                                                                  2771 snd_stats.late_or_dupe_ack();
                                                                                                                                  +
                                                                                                                                  2772
                                                                                                                                  +
                                                                                                                                  2773 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2774 "Acknowledged packet [" << seq_num << ", ...) is duplicate or late (or invalid). "
                                                                                                                                  +
                                                                                                                                  2775 "RTT unknown. Ignoring.");
                                                                                                                                  +
                                                                                                                                  2776
                                                                                                                                  +
                                                                                                                                  2777 // Ensure out-params indicating a dupe/late ack such that the packet being acked is not known.
                                                                                                                                  +
                                                                                                                                  2778 *dupe_or_late = true;
                                                                                                                                  +
                                                                                                                                  2779 assert(*acked_pkt_it == snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  +
                                                                                                                                  2780 return true;
                                                                                                                                  +
                                                                                                                                  2781 } // if (seq_num is not in snd_flying_pkts*) // i.e., duplicate/late acknowledgment with unknown acked packet.
                                                                                                                                  +
                                                                                                                                  2782 // else if (seq_num IS in snd_flying_pkts*): *acked_pkt_it points to snd_flying_pkts_by_when[seq_num].
                                                                                                                                  +
                                                                                                                                  2783 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  +
                                                                                                                                  2784
                                                                                                                                  +
                                                                                                                                  2785 // It's an ack of sequence number we'd sent, but if retransmission is on it may not be of the one we LAST sent.
                                                                                                                                  +
                                                                                                                                  2786
                                                                                                                                  +
                                                                                                                                  2787 const Peer_socket::Sent_packet& acked_pkt = *((*acked_pkt_it)->second);
                                                                                                                                  +
                                                                                                                                  2788 const unsigned int acked_rexmit_id = rexmit_on ? acked_pkt.m_packet->m_rexmit_id : 0;
                                                                                                                                  +
                                                                                                                                  2789 Sequence_number seq_num_end; // Get sequence number just past last datum in packet.
                                                                                                                                  +
                                                                                                                                  2790 get_seq_num_range(*acked_pkt_it, 0, &seq_num_end);
                                                                                                                                  +
                                                                                                                                  2791
                                                                                                                                  +
                                                                                                                                  2792 // Note that both rexmit_id and acked_rexmit_id are guaranteed 0 at this point if !rexmit_on.
                                                                                                                                  +
                                                                                                                                  2793
                                                                                                                                  +
                                                                                                                                  2794 if (rexmit_id > acked_rexmit_id)
                                                                                                                                  +
                                                                                                                                  2795 {
                                                                                                                                  +
                                                                                                                                  2796 // This is entirely illegal. Can't acknowledge a packet copy we hadn't sent yet.
                                                                                                                                  +
                                                                                                                                  2797 FLOW_LOG_WARNING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2798 "Acknowledged packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  2799 "rexmit_id [" << int(rexmit_id) << "] "
                                                                                                                                  +
                                                                                                                                  2800 "exceeds highest sent rexmit_id [" << int(acked_rexmit_id) << "].");
                                                                                                                                  +
                                                                                                                                  2801 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_SEQ_NUM_ARITHMETIC_FAILURE, true);
                                                                                                                                  +
                                                                                                                                  2802 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  +
                                                                                                                                  2803 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  +
                                                                                                                                  2804 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  2805 return false; // Other out-params are meaningless.
                                                                                                                                  +
                                                                                                                                  2806 }
                                                                                                                                  +
                                                                                                                                  2807 // else if (rexmit_id <= acked_rexmit_id)
                                                                                                                                  +
                                                                                                                                  2808
                                                                                                                                  +
                                                                                                                                  2809 if (rexmit_id != acked_rexmit_id)
                                                                                                                                  +
                                                                                                                                  2810 {
                                                                                                                                  +
                                                                                                                                  2811 assert(rexmit_id < acked_rexmit_id);
                                                                                                                                  +
                                                                                                                                  2812
                                                                                                                                  +
                                                                                                                                  2813 /* This is legal: it's possible we had sent packet P, considered it Dropped, retransmitted it
                                                                                                                                  +
                                                                                                                                  2814 * (thus incrementing rexmit_id), and have now received a late acknowledgment of the
                                                                                                                                  +
                                                                                                                                  2815 * PREVIOUS attempt to send P (before retransmission). We could actually consider this
                                                                                                                                  +
                                                                                                                                  2816 * entirely equivalent to simply getting the last attempt acked. In fact I specifically kept
                                                                                                                                  +
                                                                                                                                  2817 * an array for m_sent_when, so that we can even compute accurate RTT. Yet, at least for now,
                                                                                                                                  +
                                                                                                                                  2818 * I am going to ignore such an acknowledgment. Reasons:
                                                                                                                                  +
                                                                                                                                  2819 *
                                                                                                                                  +
                                                                                                                                  2820 * - The RTT may be an outlier affected by some random event; we considered it Dropped, so
                                                                                                                                  +
                                                                                                                                  2821 * if those heuristics are generally sound, getting a late ack is suspicious.
                                                                                                                                  +
                                                                                                                                  2822 *
                                                                                                                                  +
                                                                                                                                  2823 * - Suppose I do take the RTT and report to congestion control, use for SRTT computation,
                                                                                                                                  +
                                                                                                                                  2824 * and remove from snd_flying_pkts*. I've in effect recorded a loss but then also
                                                                                                                                  +
                                                                                                                                  2825 * reported a successful retransmission, even though the ack is not for the retransmission
                                                                                                                                  +
                                                                                                                                  2826 * but more like a correction on the original loss. That's potentially fine, but chances
                                                                                                                                  +
                                                                                                                                  2827 * are I will soon receive the ack for the latest transmission, which is what I was really
                                                                                                                                  +
                                                                                                                                  2828 * expecting. That one will now be considered a late ack and will be ignored, even though
                                                                                                                                  +
                                                                                                                                  2829 * that RTT is actually probably more accurate, since chances are it arrived before the
                                                                                                                                  +
                                                                                                                                  2830 * retransmission would've been considered Dropped as well. So, basically, we're kind of
                                                                                                                                  +
                                                                                                                                  2831 * trying to use the "two wrongs make a right" philosophy, which seems messy.
                                                                                                                                  +
                                                                                                                                  2832 *
                                                                                                                                  +
                                                                                                                                  2833 * - Earlier in the method, I mentioned that if we detect P as dropped and queue it for
                                                                                                                                  +
                                                                                                                                  2834 * retransmission but get P acked *before* we get a chance to retransmit, then we consider
                                                                                                                                  +
                                                                                                                                  2835 * that ack as late and ignore it (and will still retransmit P). The reasons for that are
                                                                                                                                  +
                                                                                                                                  2836 * given in that comment. However, given that we made that decision, it would seem
                                                                                                                                  +
                                                                                                                                  2837 * strange to follow a different philosophy just because we did happen to get to
                                                                                                                                  +
                                                                                                                                  2838 * retransmit P. That would be inconsistent.
                                                                                                                                  +
                                                                                                                                  2839 *
                                                                                                                                  +
                                                                                                                                  2840 * - Keeping it in perspective, it should be fairly rare that a packet we considered Dropped
                                                                                                                                  +
                                                                                                                                  2841 * is acked after all. So it is perhaps not worth the trouble to go crazy about this
                                                                                                                                  +
                                                                                                                                  2842 * corner case.
                                                                                                                                  +
                                                                                                                                  2843 *
                                                                                                                                  +
                                                                                                                                  2844 * Nevertheless, a @todo would be to experimentally measure the effect of this policy and
                                                                                                                                  +
                                                                                                                                  2845 * decide whether it is sound. In that case also consider the aforementioned "P is acked
                                                                                                                                  +
                                                                                                                                  2846 * after queued for retransmission but before retransmitted" corner case. */
                                                                                                                                  +
                                                                                                                                  2847
                                                                                                                                  +
                                                                                                                                  2848 // Register one individual acknowledgment of unknown # of bytes of data (late).
                                                                                                                                  +
                                                                                                                                  2849 snd_stats.late_or_dupe_ack();
                                                                                                                                  2850
                                                                                                                                  -
                                                                                                                                  2851 // Ensure out-params indicating a dupe/late ack of a specific known sent packet.
                                                                                                                                  -
                                                                                                                                  2852 *dupe_or_late = true;
                                                                                                                                  -
                                                                                                                                  2853 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  -
                                                                                                                                  2854 return true;
                                                                                                                                  -
                                                                                                                                  2855 }
                                                                                                                                  -
                                                                                                                                  2856 // else
                                                                                                                                  -
                                                                                                                                  2857 assert(rexmit_id == acked_rexmit_id);
                                                                                                                                  -
                                                                                                                                  2858
                                                                                                                                  -
                                                                                                                                  2859 // Do not log this mainstream case; only the exceptions above. RTT will probably be logged separately.
                                                                                                                                  -
                                                                                                                                  2860
                                                                                                                                  -
                                                                                                                                  2861 // Register one individual acknowledgment of N bytes of data (converts from In-flight to Acknowledged).
                                                                                                                                  -
                                                                                                                                  2862 snd_stats.good_ack(acked_pkt.m_size);
                                                                                                                                  -
                                                                                                                                  2863
                                                                                                                                  -
                                                                                                                                  2864 // Ensure out-params indicating an in-time, first ack of a specific known sent packet.
                                                                                                                                  -
                                                                                                                                  2865 *dupe_or_late = false;
                                                                                                                                  -
                                                                                                                                  2866 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  -
                                                                                                                                  2867 return true;
                                                                                                                                  -
                                                                                                                                  2868} // Node::categorize_individual_ack()
                                                                                                                                  +
                                                                                                                                  2851 FLOW_LOG_INFO("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  2852 "Acknowledged packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  2853 "order_num [" << acked_pkt.m_sent_when[rexmit_id].m_order_num << "] "
                                                                                                                                  +
                                                                                                                                  2854 "rexmit_id [" << int(rexmit_id) << "] "
                                                                                                                                  +
                                                                                                                                  2855 "is less than highest sent [" << int(acked_rexmit_id) << "]. Ignoring.");
                                                                                                                                  +
                                                                                                                                  2856
                                                                                                                                  +
                                                                                                                                  2857 // Ensure out-params indicating a dupe/late ack of a specific known sent packet.
                                                                                                                                  +
                                                                                                                                  2858 *dupe_or_late = true;
                                                                                                                                  +
                                                                                                                                  2859 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  +
                                                                                                                                  2860 return true;
                                                                                                                                  +
                                                                                                                                  2861 }
                                                                                                                                  +
                                                                                                                                  2862 // else
                                                                                                                                  +
                                                                                                                                  2863 assert(rexmit_id == acked_rexmit_id);
                                                                                                                                  +
                                                                                                                                  2864
                                                                                                                                  +
                                                                                                                                  2865 // Do not log this mainstream case; only the exceptions above. RTT will probably be logged separately.
                                                                                                                                  +
                                                                                                                                  2866
                                                                                                                                  +
                                                                                                                                  2867 // Register one individual acknowledgment of N bytes of data (converts from In-flight to Acknowledged).
                                                                                                                                  +
                                                                                                                                  2868 snd_stats.good_ack(acked_pkt.m_size);
                                                                                                                                  2869
                                                                                                                                  - -
                                                                                                                                  2871 const Fine_time_pt& time_now,
                                                                                                                                  - -
                                                                                                                                  2873 const Peer_socket::Sent_packet::Sent_when** sent_when) const
                                                                                                                                  -
                                                                                                                                  2874{
                                                                                                                                  -
                                                                                                                                  2875 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  2876 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  2877
                                                                                                                                  -
                                                                                                                                  2878 Fine_duration round_trip_time;
                                                                                                                                  -
                                                                                                                                  2879
                                                                                                                                  -
                                                                                                                                  2880 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  -
                                                                                                                                  2881 * as of this writing. It computes the RTT implied by the given individual ack and also returns the Sent_when
                                                                                                                                  -
                                                                                                                                  2882 * (which contains info on when the original packet was sent) structure as an out-param. */
                                                                                                                                  +
                                                                                                                                  2870 // Ensure out-params indicating an in-time, first ack of a specific known sent packet.
                                                                                                                                  +
                                                                                                                                  2871 *dupe_or_late = false;
                                                                                                                                  +
                                                                                                                                  2872 assert(*acked_pkt_it != snd_flying_pkts_by_when.past_oldest()); // A/k/a end().
                                                                                                                                  +
                                                                                                                                  2873 return true;
                                                                                                                                  +
                                                                                                                                  2874} // Node::categorize_individual_ack()
                                                                                                                                  +
                                                                                                                                  2875
                                                                                                                                  + +
                                                                                                                                  2877 const Fine_time_pt& time_now,
                                                                                                                                  + +
                                                                                                                                  2879 const Peer_socket::Sent_packet::Sent_when** sent_when) const
                                                                                                                                  +
                                                                                                                                  2880{
                                                                                                                                  +
                                                                                                                                  2881 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  2882 using boost::chrono::round;
                                                                                                                                  2883
                                                                                                                                  -
                                                                                                                                  2884 /* RTT subtleties:
                                                                                                                                  -
                                                                                                                                  2885 *
                                                                                                                                  -
                                                                                                                                  2886 * How long did the other side, upon receiving the acked packet, wait before sending this
                                                                                                                                  -
                                                                                                                                  2887 * containing ACK with that individual acknowledgment? Why do we care? For RTT. Why do we
                                                                                                                                  -
                                                                                                                                  2888 * want RTT? To measure how long it takes for a sent packet to reach the receiver (one-way trip
                                                                                                                                  -
                                                                                                                                  2889 * time, or OWTT). Since mesuring OWTT is quite hard/impossible due to lack of absolute clock
                                                                                                                                  -
                                                                                                                                  2890 * synchronization between us and the receiver, RTT/2 is used as the next best way to get OWTT.
                                                                                                                                  -
                                                                                                                                  2891 * We can measure RTT by subtracting our recorded packet send time from the current time (ACK
                                                                                                                                  -
                                                                                                                                  2892 * receipt time). However, the ACK delay introduced by the receiver to reduce ACK overhead has
                                                                                                                                  -
                                                                                                                                  2893 * nothing to do with OWTT; it just (randomly, from the other side's point of view) inflates the RTT.
                                                                                                                                  -
                                                                                                                                  2894 * Thus we subtract the ACK delay from the RTT to get the actual RTT we use for congestion control, etc. */
                                                                                                                                  -
                                                                                                                                  2895
                                                                                                                                  -
                                                                                                                                  2896 const unsigned int rexmit_id = ack->m_rexmit_id;
                                                                                                                                  -
                                                                                                                                  2897 // Get the RTT for the transmission attempt that is actually being acknowledged (always 0 if retransmission off).
                                                                                                                                  -
                                                                                                                                  2898 *sent_when = &(flying_pkt->m_sent_when[rexmit_id]);
                                                                                                                                  -
                                                                                                                                  2899 const Peer_socket::order_num_t order_num = (*sent_when)->m_order_num;
                                                                                                                                  -
                                                                                                                                  2900
                                                                                                                                  -
                                                                                                                                  2901 /* ?second-resolution value (ack_delay) subtracted from max-resolution values. If ack_delay is
                                                                                                                                  -
                                                                                                                                  2902 * also in the max-resolution time unit, then there is no loss of precision. Otherwise we lose
                                                                                                                                  -
                                                                                                                                  2903 * precision by subtracting a number with fewer significant digits from one with more
                                                                                                                                  -
                                                                                                                                  2904 * significant digits. So Ack_delay_time_unit should ideally be Fine_duration, for precise RTT
                                                                                                                                  -
                                                                                                                                  2905 * values (especially for queueing delay-based congestion control algorithms); however that
                                                                                                                                  -
                                                                                                                                  2906 * decision is discussed elsewhere (Low_lvl_packet). */
                                                                                                                                  -
                                                                                                                                  2907 const auto& ack_delay = ack->m_delay;
                                                                                                                                  -
                                                                                                                                  2908 round_trip_time = time_now - (*sent_when)->m_sent_time - ack_delay;
                                                                                                                                  -
                                                                                                                                  2909
                                                                                                                                  -
                                                                                                                                  2910 if (round_trip_time.count() < 0)
                                                                                                                                  -
                                                                                                                                  2911 {
                                                                                                                                  -
                                                                                                                                  2912 /* Because this combines measurements on both sides, and each may have some error (plus or
                                                                                                                                  -
                                                                                                                                  2913 * minus a few hundred microseconds, possibly), and the result can be quite close to zero in
                                                                                                                                  -
                                                                                                                                  2914 * extremely low-latency situations, this may come out to be negative. So assume zero and
                                                                                                                                  -
                                                                                                                                  2915 * log a TRACE message at most.
                                                                                                                                  -
                                                                                                                                  2916 *
                                                                                                                                  -
                                                                                                                                  2917 * @todo Should we put also a ceiling on the RTT?
                                                                                                                                  -
                                                                                                                                  2918 * @todo For the floor, maybe it's better to use a higher guess than zero? */
                                                                                                                                  -
                                                                                                                                  2919 FLOW_LOG_TRACE("Acknowledged packet [" << ack->m_seq_num << ", ...) "
                                                                                                                                  -
                                                                                                                                  2920 "order_num [" << order_num << "] has negative "
                                                                                                                                  -
                                                                                                                                  2921 "RTT [" << round_trip_time << "]; assuming zero. "
                                                                                                                                  -
                                                                                                                                  2922 "Sent at [" << (*sent_when)->m_sent_time << "]; "
                                                                                                                                  -
                                                                                                                                  2923 "received at [" << time_now << "]; "
                                                                                                                                  -
                                                                                                                                  2924 "receiver-reported ACK delay [" << ack_delay << "].");
                                                                                                                                  -
                                                                                                                                  2925 round_trip_time = Fine_duration::zero();
                                                                                                                                  -
                                                                                                                                  2926 }
                                                                                                                                  -
                                                                                                                                  2927 FLOW_LOG_TRACE("Acknowledged packet [" << ack->m_seq_num << ", ...) "
                                                                                                                                  -
                                                                                                                                  2928 "order_num [" << order_num << "] "
                                                                                                                                  -
                                                                                                                                  2929 "has RTT [" << round<milliseconds>(round_trip_time) << "] "
                                                                                                                                  -
                                                                                                                                  2930 "(ACK delay [" << round<milliseconds>(ack_delay) << "]).");
                                                                                                                                  -
                                                                                                                                  2931
                                                                                                                                  -
                                                                                                                                  2932 return round_trip_time;
                                                                                                                                  -
                                                                                                                                  2933} // Node::compute_rtt_on_ack()
                                                                                                                                  -
                                                                                                                                  2934
                                                                                                                                  - - -
                                                                                                                                  2937 const boost::unordered_set<Peer_socket::order_num_t>& flying_now_acked_pkts)
                                                                                                                                  -
                                                                                                                                  2938{
                                                                                                                                  -
                                                                                                                                  2939 using std::priority_queue;
                                                                                                                                  +
                                                                                                                                  2884 Fine_duration round_trip_time;
                                                                                                                                  +
                                                                                                                                  2885
                                                                                                                                  +
                                                                                                                                  2886 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  +
                                                                                                                                  2887 * as of this writing. It computes the RTT implied by the given individual ack and also returns the Sent_when
                                                                                                                                  +
                                                                                                                                  2888 * (which contains info on when the original packet was sent) structure as an out-param. */
                                                                                                                                  +
                                                                                                                                  2889
                                                                                                                                  +
                                                                                                                                  2890 /* RTT subtleties:
                                                                                                                                  +
                                                                                                                                  2891 *
                                                                                                                                  +
                                                                                                                                  2892 * How long did the other side, upon receiving the acked packet, wait before sending this
                                                                                                                                  +
                                                                                                                                  2893 * containing ACK with that individual acknowledgment? Why do we care? For RTT. Why do we
                                                                                                                                  +
                                                                                                                                  2894 * want RTT? To measure how long it takes for a sent packet to reach the receiver (one-way trip
                                                                                                                                  +
                                                                                                                                  2895 * time, or OWTT). Since mesuring OWTT is quite hard/impossible due to lack of absolute clock
                                                                                                                                  +
                                                                                                                                  2896 * synchronization between us and the receiver, RTT/2 is used as the next best way to get OWTT.
                                                                                                                                  +
                                                                                                                                  2897 * We can measure RTT by subtracting our recorded packet send time from the current time (ACK
                                                                                                                                  +
                                                                                                                                  2898 * receipt time). However, the ACK delay introduced by the receiver to reduce ACK overhead has
                                                                                                                                  +
                                                                                                                                  2899 * nothing to do with OWTT; it just (randomly, from the other side's point of view) inflates the RTT.
                                                                                                                                  +
                                                                                                                                  2900 * Thus we subtract the ACK delay from the RTT to get the actual RTT we use for congestion control, etc. */
                                                                                                                                  +
                                                                                                                                  2901
                                                                                                                                  +
                                                                                                                                  2902 const unsigned int rexmit_id = ack->m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  2903 // Get the RTT for the transmission attempt that is actually being acknowledged (always 0 if retransmission off).
                                                                                                                                  +
                                                                                                                                  2904 *sent_when = &(flying_pkt->m_sent_when[rexmit_id]);
                                                                                                                                  +
                                                                                                                                  2905 const Peer_socket::order_num_t order_num = (*sent_when)->m_order_num;
                                                                                                                                  +
                                                                                                                                  2906
                                                                                                                                  +
                                                                                                                                  2907 /* ?second-resolution value (ack_delay) subtracted from max-resolution values. If ack_delay is
                                                                                                                                  +
                                                                                                                                  2908 * also in the max-resolution time unit, then there is no loss of precision. Otherwise we lose
                                                                                                                                  +
                                                                                                                                  2909 * precision by subtracting a number with fewer significant digits from one with more
                                                                                                                                  +
                                                                                                                                  2910 * significant digits. So Ack_delay_time_unit should ideally be Fine_duration, for precise RTT
                                                                                                                                  +
                                                                                                                                  2911 * values (especially for queueing delay-based congestion control algorithms); however that
                                                                                                                                  +
                                                                                                                                  2912 * decision is discussed elsewhere (Low_lvl_packet). */
                                                                                                                                  +
                                                                                                                                  2913 const auto& ack_delay = ack->m_delay;
                                                                                                                                  +
                                                                                                                                  2914 round_trip_time = time_now - (*sent_when)->m_sent_time - ack_delay;
                                                                                                                                  +
                                                                                                                                  2915
                                                                                                                                  +
                                                                                                                                  2916 if (round_trip_time.count() < 0)
                                                                                                                                  +
                                                                                                                                  2917 {
                                                                                                                                  +
                                                                                                                                  2918 /* Because this combines measurements on both sides, and each may have some error (plus or
                                                                                                                                  +
                                                                                                                                  2919 * minus a few hundred microseconds, possibly), and the result can be quite close to zero in
                                                                                                                                  +
                                                                                                                                  2920 * extremely low-latency situations, this may come out to be negative. So assume zero and
                                                                                                                                  +
                                                                                                                                  2921 * log a TRACE message at most.
                                                                                                                                  +
                                                                                                                                  2922 *
                                                                                                                                  +
                                                                                                                                  2923 * @todo Should we put also a ceiling on the RTT?
                                                                                                                                  +
                                                                                                                                  2924 * @todo For the floor, maybe it's better to use a higher guess than zero? */
                                                                                                                                  +
                                                                                                                                  2925 FLOW_LOG_TRACE("Acknowledged packet [" << ack->m_seq_num << ", ...) "
                                                                                                                                  +
                                                                                                                                  2926 "order_num [" << order_num << "] has negative "
                                                                                                                                  +
                                                                                                                                  2927 "RTT [" << round_trip_time << "]; assuming zero. "
                                                                                                                                  +
                                                                                                                                  2928 "Sent at [" << (*sent_when)->m_sent_time << "]; "
                                                                                                                                  +
                                                                                                                                  2929 "received at [" << time_now << "]; "
                                                                                                                                  +
                                                                                                                                  2930 "receiver-reported ACK delay [" << ack_delay << "].");
                                                                                                                                  +
                                                                                                                                  2931 round_trip_time = Fine_duration::zero();
                                                                                                                                  +
                                                                                                                                  2932 }
                                                                                                                                  +
                                                                                                                                  2933 FLOW_LOG_TRACE("Acknowledged packet [" << ack->m_seq_num << ", ...) "
                                                                                                                                  +
                                                                                                                                  2934 "order_num [" << order_num << "] "
                                                                                                                                  +
                                                                                                                                  2935 "has RTT [" << round<milliseconds>(round_trip_time) << "] "
                                                                                                                                  +
                                                                                                                                  2936 "(ACK delay [" << round<milliseconds>(ack_delay) << "]).");
                                                                                                                                  +
                                                                                                                                  2937
                                                                                                                                  +
                                                                                                                                  2938 return round_trip_time;
                                                                                                                                  +
                                                                                                                                  2939} // Node::compute_rtt_on_ack()
                                                                                                                                  2940
                                                                                                                                  -
                                                                                                                                  2941 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  -
                                                                                                                                  2942 * as of this writing. The background is that once a set of individual acks has been processed in the sense that
                                                                                                                                  -
                                                                                                                                  2943 * sock->m_snd_flying_pkts* (which tracks In-flight outbound DATA packets) has been updated by removing the
                                                                                                                                  -
                                                                                                                                  2944 * acked packets (they are no longer In-flight), it's time to also recategorize certain further In-flight
                                                                                                                                  -
                                                                                                                                  2945 * packets as Dropped -- the intuition being that once N packets sent LATER than a given packet P have been
                                                                                                                                  -
                                                                                                                                  2946 * acked, it's highly probable that P has been Dropped by the network. This method determines the packets to drop
                                                                                                                                  -
                                                                                                                                  2947 * in that fashion.
                                                                                                                                  -
                                                                                                                                  2948 *
                                                                                                                                  -
                                                                                                                                  2949 * Now, as explained below, when ack set S causes packet set P' to be Dropped, this (possibly null) set P'
                                                                                                                                  -
                                                                                                                                  2950 * always has the following form: there is some particular packet P which is the most-recently-sent one
                                                                                                                                  -
                                                                                                                                  2951 * that is in P'; and therefore ALL other In-flight packets sent before P must be dropped too and also are in P'.
                                                                                                                                  -
                                                                                                                                  2952 * Thus P is necessary/sufficient to specify P'. Thus this method simply finds and returns a thing pointing to P. */
                                                                                                                                  -
                                                                                                                                  2953
                                                                                                                                  -
                                                                                                                                  2954 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  2955 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  2956
                                                                                                                                  -
                                                                                                                                  2957 /* OK, snd_flying_pkts* has been updated, in that we've removed any Sent_packet entries
                                                                                                                                  -
                                                                                                                                  2958 * corresponding to valid acknolwedgments in this ACK. As promised elsewhere we should also update
                                                                                                                                  -
                                                                                                                                  2959 * the remaining Sent_packets' m_acks_after_me entries and erase any Sent_packets that we consider
                                                                                                                                  -
                                                                                                                                  2960 * Dropped due to too high m_acks_after_me values. (As in TCP Fast Retransmit/Recovery, an
                                                                                                                                  -
                                                                                                                                  2961 * unacknowledged packet is considered Dropped based on the heuristic that a few packets with
                                                                                                                                  -
                                                                                                                                  2962 * higher sequence numbers have been acknowledged. Except since we have Sent_when, that should be
                                                                                                                                  -
                                                                                                                                  2963 * even better than using sequence number ordering as TCP would.)
                                                                                                                                  -
                                                                                                                                  2964 *
                                                                                                                                  -
                                                                                                                                  2965 * (Warning: below and nearby, I make pseudo-code-y leaps, such as saying flying_now_acked_pkts stores
                                                                                                                                  -
                                                                                                                                  2966 * Sent_whens when really it stores order_nums; just bear with me by trusting that it makes the logic
                                                                                                                                  -
                                                                                                                                  2967 * easier to explain, and that the actual structure in code is sufficiently
                                                                                                                                  -
                                                                                                                                  2968 * similar to the wording here to not make a salient difference in practice.)
                                                                                                                                  -
                                                                                                                                  2969 *
                                                                                                                                  -
                                                                                                                                  2970 * Consider the two structures we have now. snd_flying_pkts_by_when (call
                                                                                                                                  -
                                                                                                                                  2971 * it F) is a collection of Sent_packets, each with Sent_packet::m_acks_after_me, ordered by decreasing
                                                                                                                                  -
                                                                                                                                  2972 * Sent_when. flying_now_acked_pkts (call it C) is an unordered collection that contains each Sent_when
                                                                                                                                  -
                                                                                                                                  2973 * (i.e., reference to a send-packet attempt) that has been ACKed. That is, flying_now_acked_pkts tells us
                                                                                                                                  -
                                                                                                                                  2974 * by Sent_when which exact send attempts from the past are acknowledged in this set of accumulated acks.
                                                                                                                                  + + +
                                                                                                                                  2943 const boost::unordered_set<Peer_socket::order_num_t>& flying_now_acked_pkts)
                                                                                                                                  +
                                                                                                                                  2944{
                                                                                                                                  +
                                                                                                                                  2945 using std::priority_queue;
                                                                                                                                  +
                                                                                                                                  2946
                                                                                                                                  +
                                                                                                                                  2947 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  +
                                                                                                                                  2948 * as of this writing. The background is that once a set of individual acks has been processed in the sense that
                                                                                                                                  +
                                                                                                                                  2949 * sock->m_snd_flying_pkts* (which tracks In-flight outbound DATA packets) has been updated by removing the
                                                                                                                                  +
                                                                                                                                  2950 * acked packets (they are no longer In-flight), it's time to also recategorize certain further In-flight
                                                                                                                                  +
                                                                                                                                  2951 * packets as Dropped -- the intuition being that once N packets sent LATER than a given packet P have been
                                                                                                                                  +
                                                                                                                                  2952 * acked, it's highly probable that P has been Dropped by the network. This method determines the packets to drop
                                                                                                                                  +
                                                                                                                                  2953 * in that fashion.
                                                                                                                                  +
                                                                                                                                  2954 *
                                                                                                                                  +
                                                                                                                                  2955 * Now, as explained below, when ack set S causes packet set P' to be Dropped, this (possibly null) set P'
                                                                                                                                  +
                                                                                                                                  2956 * always has the following form: there is some particular packet P which is the most-recently-sent one
                                                                                                                                  +
                                                                                                                                  2957 * that is in P'; and therefore ALL other In-flight packets sent before P must be dropped too and also are in P'.
                                                                                                                                  +
                                                                                                                                  2958 * Thus P is necessary/sufficient to specify P'. Thus this method simply finds and returns a thing pointing to P. */
                                                                                                                                  +
                                                                                                                                  2959
                                                                                                                                  +
                                                                                                                                  2960 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  2961 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  2962
                                                                                                                                  +
                                                                                                                                  2963 /* OK, snd_flying_pkts* has been updated, in that we've removed any Sent_packet entries
                                                                                                                                  +
                                                                                                                                  2964 * corresponding to valid acknolwedgments in this ACK. As promised elsewhere we should also update
                                                                                                                                  +
                                                                                                                                  2965 * the remaining Sent_packets' m_acks_after_me entries and erase any Sent_packets that we consider
                                                                                                                                  +
                                                                                                                                  2966 * Dropped due to too high m_acks_after_me values. (As in TCP Fast Retransmit/Recovery, an
                                                                                                                                  +
                                                                                                                                  2967 * unacknowledged packet is considered Dropped based on the heuristic that a few packets with
                                                                                                                                  +
                                                                                                                                  2968 * higher sequence numbers have been acknowledged. Except since we have Sent_when, that should be
                                                                                                                                  +
                                                                                                                                  2969 * even better than using sequence number ordering as TCP would.)
                                                                                                                                  +
                                                                                                                                  2970 *
                                                                                                                                  +
                                                                                                                                  2971 * (Warning: below and nearby, I make pseudo-code-y leaps, such as saying flying_now_acked_pkts stores
                                                                                                                                  +
                                                                                                                                  2972 * Sent_whens when really it stores order_nums; just bear with me by trusting that it makes the logic
                                                                                                                                  +
                                                                                                                                  2973 * easier to explain, and that the actual structure in code is sufficiently
                                                                                                                                  +
                                                                                                                                  2974 * similar to the wording here to not make a salient difference in practice.)
                                                                                                                                  2975 *
                                                                                                                                  -
                                                                                                                                  2976 * Even less formally -- just for sanity's sake -- F are In-flight packets; C are just-acked packets that were
                                                                                                                                  -
                                                                                                                                  2977 * very recently in F. C may be interleaved among F if viewed in increasing Sent_when order:
                                                                                                                                  -
                                                                                                                                  2978 * e.g., [ F F F F C F C F C C ] (where F represents a still-In-flight send attempt, or an F element;
                                                                                                                                  -
                                                                                                                                  2979 * C a just-acked send attempt, thus a C element; and the order is from earlier/lower Sent_when to
                                                                                                                                  -
                                                                                                                                  2980 * later/higher Sent_when).
                                                                                                                                  +
                                                                                                                                  2976 * Consider the two structures we have now. snd_flying_pkts_by_when (call
                                                                                                                                  +
                                                                                                                                  2977 * it F) is a collection of Sent_packets, each with Sent_packet::m_acks_after_me, ordered by decreasing
                                                                                                                                  +
                                                                                                                                  2978 * Sent_when. flying_now_acked_pkts (call it C) is an unordered collection that contains each Sent_when
                                                                                                                                  +
                                                                                                                                  2979 * (i.e., reference to a send-packet attempt) that has been ACKed. That is, flying_now_acked_pkts tells us
                                                                                                                                  +
                                                                                                                                  2980 * by Sent_when which exact send attempts from the past are acknowledged in this set of accumulated acks.
                                                                                                                                  2981 *
                                                                                                                                  -
                                                                                                                                  2982 * Note that, conceptually, the key sets (Sent_when values) in F and C are disjoint,
                                                                                                                                  -
                                                                                                                                  2983 * since each send attempt has a unique Sent_when value (because it at least consists of a unique m_order_num).
                                                                                                                                  -
                                                                                                                                  2984 * How do we correctly yet efficiently increment m_acks_after_me (call it A) for each
                                                                                                                                  -
                                                                                                                                  2985 * element in F to represent the new ackage? First observe that if F[t].A is incremented by N, then
                                                                                                                                  -
                                                                                                                                  2986 * F[prev(t)].A should be incremented by N PLUS the number of acks for all packets sent at times in range
                                                                                                                                  -
                                                                                                                                  2987 * (prev(t), t), where prev(t) is the element of C with the next lower (ealier) Sent_when.
                                                                                                                                  -
                                                                                                                                  2988 * Consider the example scoreboard above, [ F F F F C F# C F* C C ]. F*.A is incremented by 2, because
                                                                                                                                  -
                                                                                                                                  2989 * plainly there are two Cs after it. Therefore, the preceding F, which is F#,
                                                                                                                                  -
                                                                                                                                  2990 * is also incremented by 2; plus another 1, because there is another C (recall, simply another acknowledgment)
                                                                                                                                  -
                                                                                                                                  2991 * between F# and F*. And so it goes for all the Fs. Side/sanity note: The range is (prev[t], t), not
                                                                                                                                  -
                                                                                                                                  2992 * [prev(t), t), simply because F and C are disjoint; and prev(t) by definition is in F (hence not in C, hence
                                                                                                                                  -
                                                                                                                                  2993 * no ack for that seq. #).
                                                                                                                                  -
                                                                                                                                  2994 *
                                                                                                                                  -
                                                                                                                                  2995 * This suggests a simple inductive algorithm, wherein the latest F element's F[t].A is incremented by I, which
                                                                                                                                  -
                                                                                                                                  2996 * is the count of C elements with Sent_when > t; memorize I; now for each progressively older F[t],
                                                                                                                                  -
                                                                                                                                  2997 * count C elements in (t, next(t)) and increment F[T].A by I += <that count>. Repeat until all Fs incremented.
                                                                                                                                  -
                                                                                                                                  2998 * Ultimately I = # of new valid, acknowledgments. (Recall: scoreboard cannot begin with any Cs, [C C ... ], as
                                                                                                                                  -
                                                                                                                                  2999 * such a C would be acking a non-In-flight send attempt, so a dupe, and we specifically eliminate dupes from
                                                                                                                                  -
                                                                                                                                  3000 * consideration before inserting into C.) So that's O(F.size()) increment operations.
                                                                                                                                  -
                                                                                                                                  3001 *
                                                                                                                                  -
                                                                                                                                  3002 * OK, but how do we get this "count of acks between t and next(t)"? Let t be the last element of
                                                                                                                                  -
                                                                                                                                  3003 * F. For it, that count is the count of all keys > t in C (i.e., the total # of acks for all
                                                                                                                                  -
                                                                                                                                  3004 * packets sent after t). Let the lowest such key (Sent_when value) be `s`. Now let t' = prev(t) as before.
                                                                                                                                  -
                                                                                                                                  3005 * For t', the count of acks sent in (t', t) is the count of all elements in C with keys
                                                                                                                                  -
                                                                                                                                  3006 * in (s', s), where s' is again the lowest key > t'. Having counted that, set s = s, and repeat for each key t' of F.
                                                                                                                                  +
                                                                                                                                  2982 * Even less formally -- just for sanity's sake -- F are In-flight packets; C are just-acked packets that were
                                                                                                                                  +
                                                                                                                                  2983 * very recently in F. C may be interleaved among F if viewed in increasing Sent_when order:
                                                                                                                                  +
                                                                                                                                  2984 * e.g., [ F F F F C F C F C C ] (where F represents a still-In-flight send attempt, or an F element;
                                                                                                                                  +
                                                                                                                                  2985 * C a just-acked send attempt, thus a C element; and the order is from earlier/lower Sent_when to
                                                                                                                                  +
                                                                                                                                  2986 * later/higher Sent_when).
                                                                                                                                  +
                                                                                                                                  2987 *
                                                                                                                                  +
                                                                                                                                  2988 * Note that, conceptually, the key sets (Sent_when values) in F and C are disjoint,
                                                                                                                                  +
                                                                                                                                  2989 * since each send attempt has a unique Sent_when value (because it at least consists of a unique m_order_num).
                                                                                                                                  +
                                                                                                                                  2990 * How do we correctly yet efficiently increment m_acks_after_me (call it A) for each
                                                                                                                                  +
                                                                                                                                  2991 * element in F to represent the new ackage? First observe that if F[t].A is incremented by N, then
                                                                                                                                  +
                                                                                                                                  2992 * F[prev(t)].A should be incremented by N PLUS the number of acks for all packets sent at times in range
                                                                                                                                  +
                                                                                                                                  2993 * (prev(t), t), where prev(t) is the element of C with the next lower (ealier) Sent_when.
                                                                                                                                  +
                                                                                                                                  2994 * Consider the example scoreboard above, [ F F F F C F# C F* C C ]. F*.A is incremented by 2, because
                                                                                                                                  +
                                                                                                                                  2995 * plainly there are two Cs after it. Therefore, the preceding F, which is F#,
                                                                                                                                  +
                                                                                                                                  2996 * is also incremented by 2; plus another 1, because there is another C (recall, simply another acknowledgment)
                                                                                                                                  +
                                                                                                                                  2997 * between F# and F*. And so it goes for all the Fs. Side/sanity note: The range is (prev[t], t), not
                                                                                                                                  +
                                                                                                                                  2998 * [prev(t), t), simply because F and C are disjoint; and prev(t) by definition is in F (hence not in C, hence
                                                                                                                                  +
                                                                                                                                  2999 * no ack for that seq. #).
                                                                                                                                  +
                                                                                                                                  3000 *
                                                                                                                                  +
                                                                                                                                  3001 * This suggests a simple inductive algorithm, wherein the latest F element's F[t].A is incremented by I, which
                                                                                                                                  +
                                                                                                                                  3002 * is the count of C elements with Sent_when > t; memorize I; now for each progressively older F[t],
                                                                                                                                  +
                                                                                                                                  3003 * count C elements in (t, next(t)) and increment F[T].A by I += <that count>. Repeat until all Fs incremented.
                                                                                                                                  +
                                                                                                                                  3004 * Ultimately I = # of new valid, acknowledgments. (Recall: scoreboard cannot begin with any Cs, [C C ... ], as
                                                                                                                                  +
                                                                                                                                  3005 * such a C would be acking a non-In-flight send attempt, so a dupe, and we specifically eliminate dupes from
                                                                                                                                  +
                                                                                                                                  3006 * consideration before inserting into C.) So that's O(F.size()) increment operations.
                                                                                                                                  3007 *
                                                                                                                                  -
                                                                                                                                  3008 * Of course, for that to be practical, C would need to be sorted by Sent_when. Since in reality it's not sorted,
                                                                                                                                  -
                                                                                                                                  3009 * we could first sort it in O(k log k) operations, worst-case, k = C.size(). More convenient, however, is to
                                                                                                                                  -
                                                                                                                                  3010 * construct a priority queue (heap) from C; then keep popping the Sent_whens down to and
                                                                                                                                  -
                                                                                                                                  3011 * including s at each step. That's O(k) to make the heap and O(k log k) total time spent
                                                                                                                                  -
                                                                                                                                  3012 * popping it.
                                                                                                                                  +
                                                                                                                                  3008 * OK, but how do we get this "count of acks between t and next(t)"? Let t be the last element of
                                                                                                                                  +
                                                                                                                                  3009 * F. For it, that count is the count of all keys > t in C (i.e., the total # of acks for all
                                                                                                                                  +
                                                                                                                                  3010 * packets sent after t). Let the lowest such key (Sent_when value) be `s`. Now let t' = prev(t) as before.
                                                                                                                                  +
                                                                                                                                  3011 * For t', the count of acks sent in (t', t) is the count of all elements in C with keys
                                                                                                                                  +
                                                                                                                                  3012 * in (s', s), where s' is again the lowest key > t'. Having counted that, set s = s, and repeat for each key t' of F.
                                                                                                                                  3013 *
                                                                                                                                  -
                                                                                                                                  3014 * The above explanation strikes me as somewhat cryptic, but hopefully the code will clarify it; I was just
                                                                                                                                  -
                                                                                                                                  3015 * trying to explain why the code works. */
                                                                                                                                  -
                                                                                                                                  3016
                                                                                                                                  -
                                                                                                                                  3017 /* Make heap out of flying_now_acked_pkts; top()/pop() will return the element with the highest (latest) Sent_when.
                                                                                                                                  -
                                                                                                                                  3018 * Just store the Sent_when values directly in the heap; std::pair::operator<() will do
                                                                                                                                  -
                                                                                                                                  3019 * the right thing since no element's Sent_when equals another element's Sent_when (they were
                                                                                                                                  -
                                                                                                                                  3020 * stored in a uniquely-keyed dictionary in the first place).
                                                                                                                                  -
                                                                                                                                  3021 *
                                                                                                                                  -
                                                                                                                                  3022 * Let cur_sent_pkt be the element of snd_flying_pkts_by_sent_when we're currently
                                                                                                                                  -
                                                                                                                                  3023 * considering, and it starts at F.newest() and progresses accordingly through F.
                                                                                                                                  -
                                                                                                                                  3024 * Then, invariant: high_ack_count_q contains the acks for all send attempts P where
                                                                                                                                  -
                                                                                                                                  3025 * P.m_sent_when < cur_sent_pkt.m_sent_when. In particular, P.m_sent_when.top < cur_sent_pkt.m_sent_when. */
                                                                                                                                  -
                                                                                                                                  3026 priority_queue<Peer_socket::order_num_t>
                                                                                                                                  -
                                                                                                                                  3027 high_ack_count_q(flying_now_acked_pkts.begin(), flying_now_acked_pkts.end());
                                                                                                                                  -
                                                                                                                                  3028
                                                                                                                                  -
                                                                                                                                  3029 // Invariant: this will be the m_acks_after_me increment applied to the just-considered packet in snd_flying_pkts*.
                                                                                                                                  -
                                                                                                                                  3030 using ack_count_t = Peer_socket::Sent_packet::ack_count_t;
                                                                                                                                  -
                                                                                                                                  3031 ack_count_t ack_increment_after_me = 0;
                                                                                                                                  -
                                                                                                                                  3032
                                                                                                                                  -
                                                                                                                                  3033 // As explained above, start with the first (latest send time) unacked packet and go forward (earlier and earlier).
                                                                                                                                  - -
                                                                                                                                  3035 for (last_dropped_pkt_it = snd_flying_pkts_by_when.newest();
                                                                                                                                  -
                                                                                                                                  3036 last_dropped_pkt_it != snd_flying_pkts_by_when.past_oldest();
                                                                                                                                  -
                                                                                                                                  3037 ++last_dropped_pkt_it) // Up to k repetitions.
                                                                                                                                  -
                                                                                                                                  3038 {
                                                                                                                                  -
                                                                                                                                  3039 Peer_socket::Sent_packet& cur_sent_pkt = *(last_dropped_pkt_it->second);
                                                                                                                                  -
                                                                                                                                  3040 const Peer_socket::Sent_packet::Sent_when& cur_pkt_sent_when = cur_sent_pkt.m_sent_when.back();
                                                                                                                                  -
                                                                                                                                  3041
                                                                                                                                  -
                                                                                                                                  3042 /* We will increment cur_sent_pkt.m_acks_after_me by ack_increment_after_me + X, where X is
                                                                                                                                  -
                                                                                                                                  3043 * the total number of acks for packets with send times between cur_pkt_sent_when and the
                                                                                                                                  -
                                                                                                                                  3044 * cur_pkt_sent_when in the last loop iteration (or infinity if this is the first loop
                                                                                                                                  -
                                                                                                                                  3045 * iteration). The high_ack_count_q invariant we maintain is that high_ack_count_q holds the
                                                                                                                                  -
                                                                                                                                  3046 * ack counts for all packets with Sent_when values EXCEPT those >= the previous
                                                                                                                                  -
                                                                                                                                  3047 * iteration's cur_pkt_sent_when. Therefore, we need only find all elements of high_ack_count_q
                                                                                                                                  -
                                                                                                                                  3048 * whose Sent_whens are > our cur_pkt_sent_when. Since high_ack_count_q.top() is always the ack
                                                                                                                                  -
                                                                                                                                  3049 * count with the highest sent_when in that structure (priority queue), we just pop and sum
                                                                                                                                  -
                                                                                                                                  3050 * until high_ack_count_q.top() < cur_pkt_sent_when. */
                                                                                                                                  -
                                                                                                                                  3051
                                                                                                                                  -
                                                                                                                                  3052 // We've just assigned cur_sent_pkt, breaking invariant; pop until it holds again.
                                                                                                                                  -
                                                                                                                                  3053 while ((!high_ack_count_q.empty()) &&
                                                                                                                                  -
                                                                                                                                  3054 // Compare order numbers -- they are always unique.
                                                                                                                                  -
                                                                                                                                  3055 (high_ack_count_q.top() > cur_pkt_sent_when.m_order_num))
                                                                                                                                  -
                                                                                                                                  3056 {
                                                                                                                                  -
                                                                                                                                  3057 // Found acked packet with sent_when > cur_pkt_sent_when (but < previous iteration's cur_pkt_sent_when).
                                                                                                                                  -
                                                                                                                                  3058 ++ack_increment_after_me; // So add that packet's ack.
                                                                                                                                  -
                                                                                                                                  3059
                                                                                                                                  -
                                                                                                                                  3060 // And remove it, bringing the next highest entry to the top. O(log k).
                                                                                                                                  -
                                                                                                                                  3061 high_ack_count_q.pop(); // Note this maintains the invariant that defines high_ack_count_q.
                                                                                                                                  -
                                                                                                                                  3062 }
                                                                                                                                  -
                                                                                                                                  3063 // Note we've maintained the invariant defining ack_increment_after_me.
                                                                                                                                  -
                                                                                                                                  3064
                                                                                                                                  -
                                                                                                                                  3065 // Hence this many more acks for packets after us have occurred within this ack set.
                                                                                                                                  -
                                                                                                                                  3066 cur_sent_pkt.m_acks_after_me += ack_increment_after_me;
                                                                                                                                  -
                                                                                                                                  3067
                                                                                                                                  -
                                                                                                                                  3068 if (cur_sent_pkt.m_acks_after_me > S_MAX_LATER_ACKS_BEFORE_CONSIDERING_DROPPED)
                                                                                                                                  -
                                                                                                                                  3069 {
                                                                                                                                  -
                                                                                                                                  3070 /* Ah ha! For this packet we've exceeded the limit -- we will consider it Dropped. What
                                                                                                                                  -
                                                                                                                                  3071 * about the next (meaning, earlier-sent) unacknowledged packets? Observe that packets with
                                                                                                                                  -
                                                                                                                                  3072 * earlier send times MUST (if we were to continue the loop in this manner) end up with
                                                                                                                                  -
                                                                                                                                  3073 * equal or larger cur_sent_pkt.m_acks_after_me. (Intuitively: any acknowledgment after
                                                                                                                                  -
                                                                                                                                  3074 * packet P is also after any packet preceding P in the sent_when ordering.) Therefore, we
                                                                                                                                  -
                                                                                                                                  3075 * can break out of the loop and consider Dropped ALL packets from last_dropped_pkt_it to
                                                                                                                                  -
                                                                                                                                  3076 * snd_flying_pkts_by_when.past_oldest(). Yay! */
                                                                                                                                  -
                                                                                                                                  3077
                                                                                                                                  -
                                                                                                                                  3078 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  3079 if (logger_ptr && logger_ptr->should_log(log::Sev::S_TRACE, get_log_component()))
                                                                                                                                  -
                                                                                                                                  3080 {
                                                                                                                                  -
                                                                                                                                  3081 Sequence_number cur_pkt_seq_num, cur_pkt_seq_num_end;
                                                                                                                                  -
                                                                                                                                  3082 get_seq_num_range(last_dropped_pkt_it, &cur_pkt_seq_num, &cur_pkt_seq_num_end);
                                                                                                                                  +
                                                                                                                                  3014 * Of course, for that to be practical, C would need to be sorted by Sent_when. Since in reality it's not sorted,
                                                                                                                                  +
                                                                                                                                  3015 * we could first sort it in O(k log k) operations, worst-case, k = C.size(). More convenient, however, is to
                                                                                                                                  +
                                                                                                                                  3016 * construct a priority queue (heap) from C; then keep popping the Sent_whens down to and
                                                                                                                                  +
                                                                                                                                  3017 * including s at each step. That's O(k) to make the heap and O(k log k) total time spent
                                                                                                                                  +
                                                                                                                                  3018 * popping it.
                                                                                                                                  +
                                                                                                                                  3019 *
                                                                                                                                  +
                                                                                                                                  3020 * The above explanation strikes me as somewhat cryptic, but hopefully the code will clarify it; I was just
                                                                                                                                  +
                                                                                                                                  3021 * trying to explain why the code works. */
                                                                                                                                  +
                                                                                                                                  3022
                                                                                                                                  +
                                                                                                                                  3023 /* Make heap out of flying_now_acked_pkts; top()/pop() will return the element with the highest (latest) Sent_when.
                                                                                                                                  +
                                                                                                                                  3024 * Just store the Sent_when values directly in the heap; std::pair::operator<() will do
                                                                                                                                  +
                                                                                                                                  3025 * the right thing since no element's Sent_when equals another element's Sent_when (they were
                                                                                                                                  +
                                                                                                                                  3026 * stored in a uniquely-keyed dictionary in the first place).
                                                                                                                                  +
                                                                                                                                  3027 *
                                                                                                                                  +
                                                                                                                                  3028 * Let cur_sent_pkt be the element of snd_flying_pkts_by_sent_when we're currently
                                                                                                                                  +
                                                                                                                                  3029 * considering, and it starts at F.newest() and progresses accordingly through F.
                                                                                                                                  +
                                                                                                                                  3030 * Then, invariant: high_ack_count_q contains the acks for all send attempts P where
                                                                                                                                  +
                                                                                                                                  3031 * P.m_sent_when < cur_sent_pkt.m_sent_when. In particular, P.m_sent_when.top < cur_sent_pkt.m_sent_when. */
                                                                                                                                  +
                                                                                                                                  3032 priority_queue<Peer_socket::order_num_t>
                                                                                                                                  +
                                                                                                                                  3033 high_ack_count_q(flying_now_acked_pkts.begin(), flying_now_acked_pkts.end());
                                                                                                                                  +
                                                                                                                                  3034
                                                                                                                                  +
                                                                                                                                  3035 // Invariant: this will be the m_acks_after_me increment applied to the just-considered packet in snd_flying_pkts*.
                                                                                                                                  +
                                                                                                                                  3036 using ack_count_t = Peer_socket::Sent_packet::ack_count_t;
                                                                                                                                  +
                                                                                                                                  3037 ack_count_t ack_increment_after_me = 0;
                                                                                                                                  +
                                                                                                                                  3038
                                                                                                                                  +
                                                                                                                                  3039 // As explained above, start with the first (latest send time) unacked packet and go forward (earlier and earlier).
                                                                                                                                  + +
                                                                                                                                  3041 for (last_dropped_pkt_it = snd_flying_pkts_by_when.newest();
                                                                                                                                  +
                                                                                                                                  3042 last_dropped_pkt_it != snd_flying_pkts_by_when.past_oldest();
                                                                                                                                  +
                                                                                                                                  3043 ++last_dropped_pkt_it) // Up to k repetitions.
                                                                                                                                  +
                                                                                                                                  3044 {
                                                                                                                                  +
                                                                                                                                  3045 Peer_socket::Sent_packet& cur_sent_pkt = *(last_dropped_pkt_it->second);
                                                                                                                                  +
                                                                                                                                  3046 const Peer_socket::Sent_packet::Sent_when& cur_pkt_sent_when = cur_sent_pkt.m_sent_when.back();
                                                                                                                                  +
                                                                                                                                  3047
                                                                                                                                  +
                                                                                                                                  3048 /* We will increment cur_sent_pkt.m_acks_after_me by ack_increment_after_me + X, where X is
                                                                                                                                  +
                                                                                                                                  3049 * the total number of acks for packets with send times between cur_pkt_sent_when and the
                                                                                                                                  +
                                                                                                                                  3050 * cur_pkt_sent_when in the last loop iteration (or infinity if this is the first loop
                                                                                                                                  +
                                                                                                                                  3051 * iteration). The high_ack_count_q invariant we maintain is that high_ack_count_q holds the
                                                                                                                                  +
                                                                                                                                  3052 * ack counts for all packets with Sent_when values EXCEPT those >= the previous
                                                                                                                                  +
                                                                                                                                  3053 * iteration's cur_pkt_sent_when. Therefore, we need only find all elements of high_ack_count_q
                                                                                                                                  +
                                                                                                                                  3054 * whose Sent_whens are > our cur_pkt_sent_when. Since high_ack_count_q.top() is always the ack
                                                                                                                                  +
                                                                                                                                  3055 * count with the highest sent_when in that structure (priority queue), we just pop and sum
                                                                                                                                  +
                                                                                                                                  3056 * until high_ack_count_q.top() < cur_pkt_sent_when. */
                                                                                                                                  +
                                                                                                                                  3057
                                                                                                                                  +
                                                                                                                                  3058 // We've just assigned cur_sent_pkt, breaking invariant; pop until it holds again.
                                                                                                                                  +
                                                                                                                                  3059 while ((!high_ack_count_q.empty()) &&
                                                                                                                                  +
                                                                                                                                  3060 // Compare order numbers -- they are always unique.
                                                                                                                                  +
                                                                                                                                  3061 (high_ack_count_q.top() > cur_pkt_sent_when.m_order_num))
                                                                                                                                  +
                                                                                                                                  3062 {
                                                                                                                                  +
                                                                                                                                  3063 // Found acked packet with sent_when > cur_pkt_sent_when (but < previous iteration's cur_pkt_sent_when).
                                                                                                                                  +
                                                                                                                                  3064 ++ack_increment_after_me; // So add that packet's ack.
                                                                                                                                  +
                                                                                                                                  3065
                                                                                                                                  +
                                                                                                                                  3066 // And remove it, bringing the next highest entry to the top. O(log k).
                                                                                                                                  +
                                                                                                                                  3067 high_ack_count_q.pop(); // Note this maintains the invariant that defines high_ack_count_q.
                                                                                                                                  +
                                                                                                                                  3068 }
                                                                                                                                  +
                                                                                                                                  3069 // Note we've maintained the invariant defining ack_increment_after_me.
                                                                                                                                  +
                                                                                                                                  3070
                                                                                                                                  +
                                                                                                                                  3071 // Hence this many more acks for packets after us have occurred within this ack set.
                                                                                                                                  +
                                                                                                                                  3072 cur_sent_pkt.m_acks_after_me += ack_increment_after_me;
                                                                                                                                  +
                                                                                                                                  3073
                                                                                                                                  +
                                                                                                                                  3074 if (cur_sent_pkt.m_acks_after_me > S_MAX_LATER_ACKS_BEFORE_CONSIDERING_DROPPED)
                                                                                                                                  +
                                                                                                                                  3075 {
                                                                                                                                  +
                                                                                                                                  3076 /* Ah ha! For this packet we've exceeded the limit -- we will consider it Dropped. What
                                                                                                                                  +
                                                                                                                                  3077 * about the next (meaning, earlier-sent) unacknowledged packets? Observe that packets with
                                                                                                                                  +
                                                                                                                                  3078 * earlier send times MUST (if we were to continue the loop in this manner) end up with
                                                                                                                                  +
                                                                                                                                  3079 * equal or larger cur_sent_pkt.m_acks_after_me. (Intuitively: any acknowledgment after
                                                                                                                                  +
                                                                                                                                  3080 * packet P is also after any packet preceding P in the sent_when ordering.) Therefore, we
                                                                                                                                  +
                                                                                                                                  3081 * can break out of the loop and consider Dropped ALL packets from last_dropped_pkt_it to
                                                                                                                                  +
                                                                                                                                  3082 * snd_flying_pkts_by_when.past_oldest(). Yay! */
                                                                                                                                  3083
                                                                                                                                  - -
                                                                                                                                  3085 ("Unacknowledged packet [" << cur_pkt_seq_num << ", " << cur_pkt_seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  3086 "order_num [" << cur_pkt_sent_when.m_order_num << "] has "
                                                                                                                                  -
                                                                                                                                  3087 "had [" << cur_sent_pkt.m_acks_after_me << "] acknowledgments "
                                                                                                                                  -
                                                                                                                                  3088 "for later packets; considering it and "
                                                                                                                                  -
                                                                                                                                  3089 "all unacknowledged packets sent earlier as Dropped.");
                                                                                                                                  -
                                                                                                                                  3090 }
                                                                                                                                  -
                                                                                                                                  3091
                                                                                                                                  -
                                                                                                                                  3092 break;
                                                                                                                                  -
                                                                                                                                  3093 }
                                                                                                                                  -
                                                                                                                                  3094 // else
                                                                                                                                  -
                                                                                                                                  3095
                                                                                                                                  -
                                                                                                                                  3096 // ack_increment_after_me and high_ack_count_q invariants hold, so the next iteration can proceed.
                                                                                                                                  -
                                                                                                                                  3097 } // for (all elements in snd_flying_pkts_by_when, in decreasing m_sent_when order: newest -> oldest)
                                                                                                                                  -
                                                                                                                                  3098
                                                                                                                                  -
                                                                                                                                  3099 return last_dropped_pkt_it;
                                                                                                                                  -
                                                                                                                                  3100} // Node::categorize_pkts_as_dropped_on_acks()
                                                                                                                                  +
                                                                                                                                  3084 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  3085 if (logger_ptr && logger_ptr->should_log(log::Sev::S_TRACE, get_log_component()))
                                                                                                                                  +
                                                                                                                                  3086 {
                                                                                                                                  +
                                                                                                                                  3087 Sequence_number cur_pkt_seq_num, cur_pkt_seq_num_end;
                                                                                                                                  +
                                                                                                                                  3088 get_seq_num_range(last_dropped_pkt_it, &cur_pkt_seq_num, &cur_pkt_seq_num_end);
                                                                                                                                  +
                                                                                                                                  3089
                                                                                                                                  + +
                                                                                                                                  3091 ("Unacknowledged packet [" << cur_pkt_seq_num << ", " << cur_pkt_seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  3092 "order_num [" << cur_pkt_sent_when.m_order_num << "] has "
                                                                                                                                  +
                                                                                                                                  3093 "had [" << cur_sent_pkt.m_acks_after_me << "] acknowledgments "
                                                                                                                                  +
                                                                                                                                  3094 "for later packets; considering it and "
                                                                                                                                  +
                                                                                                                                  3095 "all unacknowledged packets sent earlier as Dropped.");
                                                                                                                                  +
                                                                                                                                  3096 }
                                                                                                                                  +
                                                                                                                                  3097
                                                                                                                                  +
                                                                                                                                  3098 break;
                                                                                                                                  +
                                                                                                                                  3099 }
                                                                                                                                  +
                                                                                                                                  3100 // else
                                                                                                                                  3101
                                                                                                                                  - -
                                                                                                                                  3103 const Peer_socket::Sent_pkt_ordered_by_when_iter& last_dropped_pkt_it,
                                                                                                                                  -
                                                                                                                                  3104 size_t* cong_ctl_dropped_pkts, size_t* cong_ctl_dropped_bytes,
                                                                                                                                  -
                                                                                                                                  3105 size_t* dropped_pkts, size_t* dropped_bytes,
                                                                                                                                  -
                                                                                                                                  3106 std::vector<Peer_socket::order_num_t>* pkts_marked_to_drop)
                                                                                                                                  -
                                                                                                                                  3107{
                                                                                                                                  -
                                                                                                                                  3108 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  -
                                                                                                                                  3109
                                                                                                                                  -
                                                                                                                                  3110 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  -
                                                                                                                                  3111 * as of this writing. The background is that once a set of individual acks has been processed in the sense that
                                                                                                                                  -
                                                                                                                                  3112 * sock->m_snd_flying_pkts* (which tracks In-flight outbound DATA packets) has been updated by removing the
                                                                                                                                  -
                                                                                                                                  3113 * acked packets (they are no longer In-flight), it's time to also recategorize certain further In-flight
                                                                                                                                  -
                                                                                                                                  3114 * packets as Dropped -- the intuition being that once N packets sent LATER than a given packet P have been
                                                                                                                                  -
                                                                                                                                  3115 * acked, it's highly probable that P has been Dropped by the network. This method does that (dropping
                                                                                                                                  -
                                                                                                                                  3116 * all such packets P) and certain related tasks such as tracking the associated loss event(s) for congestion
                                                                                                                                  -
                                                                                                                                  3117 * control.
                                                                                                                                  -
                                                                                                                                  3118 *
                                                                                                                                  -
                                                                                                                                  3119 * Now, as explained elsewhere, when ack set S causes packet set P' to be Dropped, this (possibly null) set P'
                                                                                                                                  -
                                                                                                                                  3120 * always has the following form: there is some particular packet P which is the most-recently-sent one
                                                                                                                                  -
                                                                                                                                  3121 * that is in P'; and therefore ALL other In-flight packets sent before P must be dropped too and also are in P'.
                                                                                                                                  -
                                                                                                                                  3122 * Thus P is necessary/sufficient to specify P'. last_droppped_pkt_it argument points to P' and is determined
                                                                                                                                  -
                                                                                                                                  3123 * elsewhere and used by this helper. */
                                                                                                                                  -
                                                                                                                                  3124
                                                                                                                                  -
                                                                                                                                  3125 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  3126 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  3127 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  3128 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  -
                                                                                                                                  3129
                                                                                                                                  -
                                                                                                                                  3130 /* Pre-condition: all elements starting with (inclusive) last_dropped_pkt_it (within
                                                                                                                                  -
                                                                                                                                  3131 * snd_flying_pkts_by_when) should be considered Dropped. If last_dropped_pkt_it ==
                                                                                                                                  -
                                                                                                                                  3132 * snd_flying_pkts_by_when.past_oldest() a/k/a end(), then none should be considered
                                                                                                                                  -
                                                                                                                                  3133 * Dropped (i.e., no m_acks_after_me became high enough).
                                                                                                                                  -
                                                                                                                                  3134 *
                                                                                                                                  -
                                                                                                                                  3135 * Given that, we have a number of tasks remaining:
                                                                                                                                  -
                                                                                                                                  3136 *
                                                                                                                                  -
                                                                                                                                  3137 * 1. Count the total # of packets and bytes now considered Dropped and pass this to congestion control.
                                                                                                                                  -
                                                                                                                                  3138 * Omit those packets/bytes heuristically determined to belong to a loss event detected in an earlier
                                                                                                                                  -
                                                                                                                                  3139 * call, namely those for which m_sent_when < m_snd_last_loss_event_when.
                                                                                                                                  -
                                                                                                                                  3140 * 2. (If retransmission is enabled) Queue those Dropped packets for retransmission in retransmission queue.
                                                                                                                                  -
                                                                                                                                  3141 * 3. Erase the Dropped packets from snd_flying_packets*.
                                                                                                                                  +
                                                                                                                                  3102 // ack_increment_after_me and high_ack_count_q invariants hold, so the next iteration can proceed.
                                                                                                                                  +
                                                                                                                                  3103 } // for (all elements in snd_flying_pkts_by_when, in decreasing m_sent_when order: newest -> oldest)
                                                                                                                                  +
                                                                                                                                  3104
                                                                                                                                  +
                                                                                                                                  3105 return last_dropped_pkt_it;
                                                                                                                                  +
                                                                                                                                  3106} // Node::categorize_pkts_as_dropped_on_acks()
                                                                                                                                  +
                                                                                                                                  3107
                                                                                                                                  + +
                                                                                                                                  3109 const Peer_socket::Sent_pkt_ordered_by_when_iter& last_dropped_pkt_it,
                                                                                                                                  +
                                                                                                                                  3110 size_t* cong_ctl_dropped_pkts, size_t* cong_ctl_dropped_bytes,
                                                                                                                                  +
                                                                                                                                  3111 size_t* dropped_pkts, size_t* dropped_bytes,
                                                                                                                                  +
                                                                                                                                  3112 std::vector<Peer_socket::order_num_t>* pkts_marked_to_drop)
                                                                                                                                  +
                                                                                                                                  3113{
                                                                                                                                  +
                                                                                                                                  3114 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  +
                                                                                                                                  3115
                                                                                                                                  +
                                                                                                                                  3116 /* This helper of handle_accumulated_acks() exists to make the latter method briefer/readable, not for code reuse
                                                                                                                                  +
                                                                                                                                  3117 * as of this writing. The background is that once a set of individual acks has been processed in the sense that
                                                                                                                                  +
                                                                                                                                  3118 * sock->m_snd_flying_pkts* (which tracks In-flight outbound DATA packets) has been updated by removing the
                                                                                                                                  +
                                                                                                                                  3119 * acked packets (they are no longer In-flight), it's time to also recategorize certain further In-flight
                                                                                                                                  +
                                                                                                                                  3120 * packets as Dropped -- the intuition being that once N packets sent LATER than a given packet P have been
                                                                                                                                  +
                                                                                                                                  3121 * acked, it's highly probable that P has been Dropped by the network. This method does that (dropping
                                                                                                                                  +
                                                                                                                                  3122 * all such packets P) and certain related tasks such as tracking the associated loss event(s) for congestion
                                                                                                                                  +
                                                                                                                                  3123 * control.
                                                                                                                                  +
                                                                                                                                  3124 *
                                                                                                                                  +
                                                                                                                                  3125 * Now, as explained elsewhere, when ack set S causes packet set P' to be Dropped, this (possibly null) set P'
                                                                                                                                  +
                                                                                                                                  3126 * always has the following form: there is some particular packet P which is the most-recently-sent one
                                                                                                                                  +
                                                                                                                                  3127 * that is in P'; and therefore ALL other In-flight packets sent before P must be dropped too and also are in P'.
                                                                                                                                  +
                                                                                                                                  3128 * Thus P is necessary/sufficient to specify P'. last_droppped_pkt_it argument points to P' and is determined
                                                                                                                                  +
                                                                                                                                  3129 * elsewhere and used by this helper. */
                                                                                                                                  +
                                                                                                                                  3130
                                                                                                                                  +
                                                                                                                                  3131 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  3132 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  3133 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  3134 auto& snd_stats = sock->m_snd_stats;
                                                                                                                                  +
                                                                                                                                  3135
                                                                                                                                  +
                                                                                                                                  3136 /* Pre-condition: all elements starting with (inclusive) last_dropped_pkt_it (within
                                                                                                                                  +
                                                                                                                                  3137 * snd_flying_pkts_by_when) should be considered Dropped. If last_dropped_pkt_it ==
                                                                                                                                  +
                                                                                                                                  3138 * snd_flying_pkts_by_when.past_oldest() a/k/a end(), then none should be considered
                                                                                                                                  +
                                                                                                                                  3139 * Dropped (i.e., no m_acks_after_me became high enough).
                                                                                                                                  +
                                                                                                                                  3140 *
                                                                                                                                  +
                                                                                                                                  3141 * Given that, we have a number of tasks remaining:
                                                                                                                                  3142 *
                                                                                                                                  -
                                                                                                                                  3143 * For (non-asymptotic) performance, ideally we want to traverse snd_flying_pkts_by_when just once,
                                                                                                                                  -
                                                                                                                                  3144 * computing what's needed for these. Drilling down a bit:
                                                                                                                                  -
                                                                                                                                  3145 *
                                                                                                                                  -
                                                                                                                                  3146 * (2) and (3) are simple and involve walking over the Dropped range that has been computed (pre-condition above)
                                                                                                                                  -
                                                                                                                                  3147 * and adding-elsewhere or erasing those elements, respectively, though (2) must be done in chronological order
                                                                                                                                  -
                                                                                                                                  3148 * (increasing Sent_when).
                                                                                                                                  -
                                                                                                                                  3149 *
                                                                                                                                  -
                                                                                                                                  3150 * (1) is a matter of walking in anti-chronological (decreasing Sent_when) order over that same range, until
                                                                                                                                  -
                                                                                                                                  3151 * a certain Sent_when threshold is found, and stopping there.
                                                                                                                                  -
                                                                                                                                  3152 *
                                                                                                                                  -
                                                                                                                                  3153 * Thus, the kitchen-sink algorithm emerges: walk through Dropped range in decreasing Sent_when order, so
                                                                                                                                  -
                                                                                                                                  3154 * from last_dropped_pkt_it along snd_flying_pkts_by_when. Accumulate bytes/packets for (1), but stop
                                                                                                                                  -
                                                                                                                                  3155 * accumulating once m_snd_last_loss_event_when is reached w/r/t m_sent_when. Erase from snd_flying_pkts*
                                                                                                                                  -
                                                                                                                                  3156 * (carefully, since we are walking along one of them), for (3). And add to the retransmission queue, but in
                                                                                                                                  -
                                                                                                                                  3157 * reverse order versus the walking order, for (2). */
                                                                                                                                  -
                                                                                                                                  3158
                                                                                                                                  -
                                                                                                                                  3159 *dropped_pkts = snd_flying_pkts_by_when.size(); // We will just compute the final value by subtracting "after."
                                                                                                                                  -
                                                                                                                                  3160 *dropped_bytes = sock->m_snd_flying_bytes; // Ditto.
                                                                                                                                  -
                                                                                                                                  3161
                                                                                                                                  -
                                                                                                                                  3162 *cong_ctl_dropped_bytes = 0;
                                                                                                                                  -
                                                                                                                                  3163 *cong_ctl_dropped_pkts = 0;
                                                                                                                                  -
                                                                                                                                  3164 bool loss_event_finished = false;
                                                                                                                                  -
                                                                                                                                  3165
                                                                                                                                  -
                                                                                                                                  3166 /* We want to add to retransmission queue (if retransmission is on). We also want to traverse
                                                                                                                                  -
                                                                                                                                  3167 * snd_flying_pkts_by_when in forward newest->oldest order (for convenience and also to efficiently compute
                                                                                                                                  -
                                                                                                                                  3168 * cong_ctl_dropped_*). However we want to retransmit in reverse order (oldest->newest). So we
                                                                                                                                  -
                                                                                                                                  3169 * put the packets to retransmit in the latter order into snd_rexmit_q, at the end of the latter.
                                                                                                                                  -
                                                                                                                                  3170 * So, if it was [ABC], and we dropped [DEF], then we want to insert to yield [ABCFED] (ABC->ABCFED).
                                                                                                                                  -
                                                                                                                                  3171 * list<>::insert(it, v) will insert `v` before *it and return iterator to just-inserted element.
                                                                                                                                  -
                                                                                                                                  3172 * So we can memorize the latter and pass it in as `it` in the next insert(), rinse, repeat.
                                                                                                                                  -
                                                                                                                                  3173 * In the above example: ABC->ABC(D)->ABC(E)D->ABC(F)ED. // () is inserted element.
                                                                                                                                  -
                                                                                                                                  3174 * ^ ^ ^ // ^ is "fulcrum": insertion point for insertion following next ->.
                                                                                                                                  -
                                                                                                                                  3175 *
                                                                                                                                  -
                                                                                                                                  3176 * snd_rexmit_q_fulcrum_it, the insertion point, is so named due to being the "fulcrum" between the old and
                                                                                                                                  -
                                                                                                                                  3177 * new parts of snd_rexmit_q. History: Used to use a local new list<> here which would be spliced onto
                                                                                                                                  -
                                                                                                                                  3178 * the real queue at the end; but IMO this is more elegant (and probably a bit speedier). */
                                                                                                                                  -
                                                                                                                                  3179 auto& snd_rexmit_q = sock->m_snd_rexmit_q;
                                                                                                                                  -
                                                                                                                                  3180 decltype(sock->m_snd_rexmit_q)::iterator snd_rexmit_q_fulcrum_it = snd_rexmit_q.end();
                                                                                                                                  -
                                                                                                                                  3181
                                                                                                                                  -
                                                                                                                                  3182 // We are to fill this up, so it should not have anything yet.
                                                                                                                                  -
                                                                                                                                  3183 assert(pkts_marked_to_drop->empty());
                                                                                                                                  -
                                                                                                                                  3184
                                                                                                                                  -
                                                                                                                                  3185 auto pkt_it = last_dropped_pkt_it;
                                                                                                                                  -
                                                                                                                                  3186 while (pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  -
                                                                                                                                  3187 {
                                                                                                                                  -
                                                                                                                                  3188 // We can't just ++pkt_it later on, because we are going to erase() at pkt_it soon, invalidating it.
                                                                                                                                  -
                                                                                                                                  3189 auto next_pkt_it = boost::next(pkt_it);
                                                                                                                                  -
                                                                                                                                  3190 // Now see end of loop body.
                                                                                                                                  -
                                                                                                                                  3191
                                                                                                                                  -
                                                                                                                                  3192 // Accumulate stuff for passing into congestion control at the end.
                                                                                                                                  -
                                                                                                                                  3193
                                                                                                                                  -
                                                                                                                                  3194 const Peer_socket::Sent_packet::Ptr sent_pkt = pkt_it->second;
                                                                                                                                  -
                                                                                                                                  3195 const Peer_socket::Sent_packet::Sent_when& sent_when = sent_pkt->m_sent_when.back();
                                                                                                                                  -
                                                                                                                                  3196
                                                                                                                                  -
                                                                                                                                  3197 if (!loss_event_finished)
                                                                                                                                  -
                                                                                                                                  3198 {
                                                                                                                                  -
                                                                                                                                  3199 if (// This is part of a new loss event if: There has been no loss event before this...
                                                                                                                                  -
                                                                                                                                  3200 (sock->m_snd_last_loss_event_when != Fine_time_pt())
                                                                                                                                  -
                                                                                                                                  3201 // ...OR there has, but this packet was sent after that event was detected.
                                                                                                                                  -
                                                                                                                                  3202 && (sent_when.m_sent_time < sock->m_snd_last_loss_event_when))
                                                                                                                                  -
                                                                                                                                  3203 {
                                                                                                                                  -
                                                                                                                                  3204 /* This is the first packet encountered to be part of a previous loss event. If
                                                                                                                                  -
                                                                                                                                  3205 * retransmission is off, this will also cause the loop to exit. */
                                                                                                                                  -
                                                                                                                                  3206 loss_event_finished = true;
                                                                                                                                  -
                                                                                                                                  3207 }
                                                                                                                                  -
                                                                                                                                  3208 else
                                                                                                                                  +
                                                                                                                                  3143 * 1. Count the total # of packets and bytes now considered Dropped and pass this to congestion control.
                                                                                                                                  +
                                                                                                                                  3144 * Omit those packets/bytes heuristically determined to belong to a loss event detected in an earlier
                                                                                                                                  +
                                                                                                                                  3145 * call, namely those for which m_sent_when < m_snd_last_loss_event_when.
                                                                                                                                  +
                                                                                                                                  3146 * 2. (If retransmission is enabled) Queue those Dropped packets for retransmission in retransmission queue.
                                                                                                                                  +
                                                                                                                                  3147 * 3. Erase the Dropped packets from snd_flying_packets*.
                                                                                                                                  +
                                                                                                                                  3148 *
                                                                                                                                  +
                                                                                                                                  3149 * For (non-asymptotic) performance, ideally we want to traverse snd_flying_pkts_by_when just once,
                                                                                                                                  +
                                                                                                                                  3150 * computing what's needed for these. Drilling down a bit:
                                                                                                                                  +
                                                                                                                                  3151 *
                                                                                                                                  +
                                                                                                                                  3152 * (2) and (3) are simple and involve walking over the Dropped range that has been computed (pre-condition above)
                                                                                                                                  +
                                                                                                                                  3153 * and adding-elsewhere or erasing those elements, respectively, though (2) must be done in chronological order
                                                                                                                                  +
                                                                                                                                  3154 * (increasing Sent_when).
                                                                                                                                  +
                                                                                                                                  3155 *
                                                                                                                                  +
                                                                                                                                  3156 * (1) is a matter of walking in anti-chronological (decreasing Sent_when) order over that same range, until
                                                                                                                                  +
                                                                                                                                  3157 * a certain Sent_when threshold is found, and stopping there.
                                                                                                                                  +
                                                                                                                                  3158 *
                                                                                                                                  +
                                                                                                                                  3159 * Thus, the kitchen-sink algorithm emerges: walk through Dropped range in decreasing Sent_when order, so
                                                                                                                                  +
                                                                                                                                  3160 * from last_dropped_pkt_it along snd_flying_pkts_by_when. Accumulate bytes/packets for (1), but stop
                                                                                                                                  +
                                                                                                                                  3161 * accumulating once m_snd_last_loss_event_when is reached w/r/t m_sent_when. Erase from snd_flying_pkts*
                                                                                                                                  +
                                                                                                                                  3162 * (carefully, since we are walking along one of them), for (3). And add to the retransmission queue, but in
                                                                                                                                  +
                                                                                                                                  3163 * reverse order versus the walking order, for (2). */
                                                                                                                                  +
                                                                                                                                  3164
                                                                                                                                  +
                                                                                                                                  3165 *dropped_pkts = snd_flying_pkts_by_when.size(); // We will just compute the final value by subtracting "after."
                                                                                                                                  +
                                                                                                                                  3166 *dropped_bytes = sock->m_snd_flying_bytes; // Ditto.
                                                                                                                                  +
                                                                                                                                  3167
                                                                                                                                  +
                                                                                                                                  3168 *cong_ctl_dropped_bytes = 0;
                                                                                                                                  +
                                                                                                                                  3169 *cong_ctl_dropped_pkts = 0;
                                                                                                                                  +
                                                                                                                                  3170 bool loss_event_finished = false;
                                                                                                                                  +
                                                                                                                                  3171
                                                                                                                                  +
                                                                                                                                  3172 /* We want to add to retransmission queue (if retransmission is on). We also want to traverse
                                                                                                                                  +
                                                                                                                                  3173 * snd_flying_pkts_by_when in forward newest->oldest order (for convenience and also to efficiently compute
                                                                                                                                  +
                                                                                                                                  3174 * cong_ctl_dropped_*). However we want to retransmit in reverse order (oldest->newest). So we
                                                                                                                                  +
                                                                                                                                  3175 * put the packets to retransmit in the latter order into snd_rexmit_q, at the end of the latter.
                                                                                                                                  +
                                                                                                                                  3176 * So, if it was [ABC], and we dropped [DEF], then we want to insert to yield [ABCFED] (ABC->ABCFED).
                                                                                                                                  +
                                                                                                                                  3177 * list<>::insert(it, v) will insert `v` before *it and return iterator to just-inserted element.
                                                                                                                                  +
                                                                                                                                  3178 * So we can memorize the latter and pass it in as `it` in the next insert(), rinse, repeat.
                                                                                                                                  +
                                                                                                                                  3179 * In the above example: ABC->ABC(D)->ABC(E)D->ABC(F)ED. // () is inserted element.
                                                                                                                                  +
                                                                                                                                  3180 * ^ ^ ^ // ^ is "fulcrum": insertion point for insertion following next ->.
                                                                                                                                  +
                                                                                                                                  3181 *
                                                                                                                                  +
                                                                                                                                  3182 * snd_rexmit_q_fulcrum_it, the insertion point, is so named due to being the "fulcrum" between the old and
                                                                                                                                  +
                                                                                                                                  3183 * new parts of snd_rexmit_q. History: Used to use a local new list<> here which would be spliced onto
                                                                                                                                  +
                                                                                                                                  3184 * the real queue at the end; but IMO this is more elegant (and probably a bit speedier). */
                                                                                                                                  +
                                                                                                                                  3185 auto& snd_rexmit_q = sock->m_snd_rexmit_q;
                                                                                                                                  +
                                                                                                                                  3186 decltype(sock->m_snd_rexmit_q)::iterator snd_rexmit_q_fulcrum_it = snd_rexmit_q.end();
                                                                                                                                  +
                                                                                                                                  3187
                                                                                                                                  +
                                                                                                                                  3188 // We are to fill this up, so it should not have anything yet.
                                                                                                                                  +
                                                                                                                                  3189 assert(pkts_marked_to_drop->empty());
                                                                                                                                  +
                                                                                                                                  3190
                                                                                                                                  +
                                                                                                                                  3191 auto pkt_it = last_dropped_pkt_it;
                                                                                                                                  +
                                                                                                                                  3192 while (pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  +
                                                                                                                                  3193 {
                                                                                                                                  +
                                                                                                                                  3194 // We can't just ++pkt_it later on, because we are going to erase() at pkt_it soon, invalidating it.
                                                                                                                                  +
                                                                                                                                  3195 auto next_pkt_it = boost::next(pkt_it);
                                                                                                                                  +
                                                                                                                                  3196 // Now see end of loop body.
                                                                                                                                  +
                                                                                                                                  3197
                                                                                                                                  +
                                                                                                                                  3198 // Accumulate stuff for passing into congestion control at the end.
                                                                                                                                  +
                                                                                                                                  3199
                                                                                                                                  +
                                                                                                                                  3200 const Peer_socket::Sent_packet::Ptr sent_pkt = pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3201 const Peer_socket::Sent_packet::Sent_when& sent_when = sent_pkt->m_sent_when.back();
                                                                                                                                  +
                                                                                                                                  3202
                                                                                                                                  +
                                                                                                                                  3203 if (!loss_event_finished)
                                                                                                                                  +
                                                                                                                                  3204 {
                                                                                                                                  +
                                                                                                                                  3205 if (// This is part of a new loss event if: There has been no loss event before this...
                                                                                                                                  +
                                                                                                                                  3206 (sock->m_snd_last_loss_event_when != Fine_time_pt())
                                                                                                                                  +
                                                                                                                                  3207 // ...OR there has, but this packet was sent after that event was detected.
                                                                                                                                  +
                                                                                                                                  3208 && (sent_when.m_sent_time < sock->m_snd_last_loss_event_when))
                                                                                                                                  3209 {
                                                                                                                                  -
                                                                                                                                  3210 // Only got here if this packet and all Dropped packets after it are part of a new loss event.
                                                                                                                                  -
                                                                                                                                  3211 *cong_ctl_dropped_bytes += sent_pkt->m_size;
                                                                                                                                  -
                                                                                                                                  3212 ++(*cong_ctl_dropped_pkts);
                                                                                                                                  +
                                                                                                                                  3210 /* This is the first packet encountered to be part of a previous loss event. If
                                                                                                                                  +
                                                                                                                                  3211 * retransmission is off, this will also cause the loop to exit. */
                                                                                                                                  +
                                                                                                                                  3212 loss_event_finished = true;
                                                                                                                                  3213 }
                                                                                                                                  -
                                                                                                                                  3214 }
                                                                                                                                  -
                                                                                                                                  3215 // else { Already found end of new loss event, if any, so no need to keep looking for it. }
                                                                                                                                  -
                                                                                                                                  3216
                                                                                                                                  -
                                                                                                                                  3217 // Add to retransmission queue if applicable.
                                                                                                                                  -
                                                                                                                                  3218
                                                                                                                                  -
                                                                                                                                  3219 if (rexmit_on)
                                                                                                                                  -
                                                                                                                                  3220 {
                                                                                                                                  -
                                                                                                                                  3221 if (!ok_to_rexmit_or_close(sock, pkt_it, true)) // Ensure not too many retransmissions already.
                                                                                                                                  -
                                                                                                                                  3222 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  -
                                                                                                                                  3223 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  -
                                                                                                                                  3224 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  3225 {
                                                                                                                                  -
                                                                                                                                  3226 return false; // Already closed/logged/etc.
                                                                                                                                  -
                                                                                                                                  3227 }
                                                                                                                                  -
                                                                                                                                  3228 // else
                                                                                                                                  -
                                                                                                                                  3229
                                                                                                                                  -
                                                                                                                                  3230 /* Save a ref-counted pointer (to what includes packet data) in retransmission queue. We'll soon remove such
                                                                                                                                  -
                                                                                                                                  3231 * a pointer from snd_flying_pkts*, lowering the ref-count again. In other words, we are moving the sent-packet
                                                                                                                                  -
                                                                                                                                  3232 * object from snd_flying_pkts* to snd_rexmit_q (Dropped -> In-flight).
                                                                                                                                  -
                                                                                                                                  3233 *
                                                                                                                                  -
                                                                                                                                  3234 * Insert at the same position each time to ultimately arrange them in the reversed order that we want. */
                                                                                                                                  -
                                                                                                                                  3235 snd_rexmit_q_fulcrum_it = snd_rexmit_q.insert(snd_rexmit_q_fulcrum_it, sent_pkt);
                                                                                                                                  -
                                                                                                                                  3236 ++sock->m_snd_rexmit_q_size;
                                                                                                                                  -
                                                                                                                                  3237 }
                                                                                                                                  -
                                                                                                                                  3238
                                                                                                                                  -
                                                                                                                                  3239 /* Finally, we can erase it from snd_flying_pkts* and adjust snd_flying_bytes.
                                                                                                                                  -
                                                                                                                                  3240 * Will NOT invalidate other iterators into snd_flying_pkts_by_when.
                                                                                                                                  -
                                                                                                                                  3241 *
                                                                                                                                  -
                                                                                                                                  3242 * Also, save in pkts->pkts_marked_to_drop as advertised. */
                                                                                                                                  -
                                                                                                                                  3243
                                                                                                                                  -
                                                                                                                                  3244 static_assert
                                                                                                                                  - -
                                                                                                                                  3246 "Scoreboard must not get otherwise changed when a packet is erased.");
                                                                                                                                  -
                                                                                                                                  3247 pkts_marked_to_drop->push_back(sent_when.m_order_num);
                                                                                                                                  -
                                                                                                                                  3248 snd_flying_pkts_erase_one(sock, pkt_it);
                                                                                                                                  +
                                                                                                                                  3214 else
                                                                                                                                  +
                                                                                                                                  3215 {
                                                                                                                                  +
                                                                                                                                  3216 // Only got here if this packet and all Dropped packets after it are part of a new loss event.
                                                                                                                                  +
                                                                                                                                  3217 *cong_ctl_dropped_bytes += sent_pkt->m_size;
                                                                                                                                  +
                                                                                                                                  3218 ++(*cong_ctl_dropped_pkts);
                                                                                                                                  +
                                                                                                                                  3219 }
                                                                                                                                  +
                                                                                                                                  3220 }
                                                                                                                                  +
                                                                                                                                  3221 // else { Already found end of new loss event, if any, so no need to keep looking for it. }
                                                                                                                                  +
                                                                                                                                  3222
                                                                                                                                  +
                                                                                                                                  3223 // Add to retransmission queue if applicable.
                                                                                                                                  +
                                                                                                                                  3224
                                                                                                                                  +
                                                                                                                                  3225 if (rexmit_on)
                                                                                                                                  +
                                                                                                                                  3226 {
                                                                                                                                  +
                                                                                                                                  3227 if (!ok_to_rexmit_or_close(sock, pkt_it, true)) // Ensure not too many retransmissions already.
                                                                                                                                  +
                                                                                                                                  3228 /* ^-- defer_delta_check == true: because the only way to get to this method is from
                                                                                                                                  +
                                                                                                                                  3229 * async_low_lvl_recv(), which will perform event_set_all_check_delta(false) at the end of itself,
                                                                                                                                  +
                                                                                                                                  3230 * before the boost.asio handler exits. See Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  3231 {
                                                                                                                                  +
                                                                                                                                  3232 return false; // Already closed/logged/etc.
                                                                                                                                  +
                                                                                                                                  3233 }
                                                                                                                                  +
                                                                                                                                  3234 // else
                                                                                                                                  +
                                                                                                                                  3235
                                                                                                                                  +
                                                                                                                                  3236 /* Save a ref-counted pointer (to what includes packet data) in retransmission queue. We'll soon remove such
                                                                                                                                  +
                                                                                                                                  3237 * a pointer from snd_flying_pkts*, lowering the ref-count again. In other words, we are moving the sent-packet
                                                                                                                                  +
                                                                                                                                  3238 * object from snd_flying_pkts* to snd_rexmit_q (Dropped -> In-flight).
                                                                                                                                  +
                                                                                                                                  3239 *
                                                                                                                                  +
                                                                                                                                  3240 * Insert at the same position each time to ultimately arrange them in the reversed order that we want. */
                                                                                                                                  +
                                                                                                                                  3241 snd_rexmit_q_fulcrum_it = snd_rexmit_q.insert(snd_rexmit_q_fulcrum_it, sent_pkt);
                                                                                                                                  +
                                                                                                                                  3242 ++sock->m_snd_rexmit_q_size;
                                                                                                                                  +
                                                                                                                                  3243 }
                                                                                                                                  +
                                                                                                                                  3244
                                                                                                                                  +
                                                                                                                                  3245 /* Finally, we can erase it from snd_flying_pkts* and adjust snd_flying_bytes.
                                                                                                                                  +
                                                                                                                                  3246 * Will NOT invalidate other iterators into snd_flying_pkts_by_when.
                                                                                                                                  +
                                                                                                                                  3247 *
                                                                                                                                  +
                                                                                                                                  3248 * Also, save in pkts->pkts_marked_to_drop as advertised. */
                                                                                                                                  3249
                                                                                                                                  -
                                                                                                                                  3250 pkt_it = next_pkt_it;
                                                                                                                                  -
                                                                                                                                  3251 } // while (pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  -
                                                                                                                                  3252
                                                                                                                                  -
                                                                                                                                  3253 // Includes ALL Dropped packets (not just ones from new loss event, if any), so != cong_ctl_dropped_pkts.
                                                                                                                                  -
                                                                                                                                  3254 *dropped_pkts -= snd_flying_pkts_by_when.size(); // Subtract "after" from "before" to get dropped count.
                                                                                                                                  -
                                                                                                                                  3255 *dropped_bytes -= sock->m_snd_flying_bytes; // Similar.
                                                                                                                                  -
                                                                                                                                  3256
                                                                                                                                  -
                                                                                                                                  3257 if (*cong_ctl_dropped_pkts != 0)
                                                                                                                                  -
                                                                                                                                  3258 {
                                                                                                                                  -
                                                                                                                                  3259 // Register that we've detected a NEW loss event (not the same as dropped_data() -- see that elsewhere).
                                                                                                                                  -
                                                                                                                                  3260 snd_stats.loss_event();
                                                                                                                                  -
                                                                                                                                  3261 }
                                                                                                                                  +
                                                                                                                                  3250 static_assert
                                                                                                                                  + +
                                                                                                                                  3252 "Scoreboard must not get otherwise changed when a packet is erased.");
                                                                                                                                  +
                                                                                                                                  3253 pkts_marked_to_drop->push_back(sent_when.m_order_num);
                                                                                                                                  +
                                                                                                                                  3254 snd_flying_pkts_erase_one(sock, pkt_it);
                                                                                                                                  +
                                                                                                                                  3255
                                                                                                                                  +
                                                                                                                                  3256 pkt_it = next_pkt_it;
                                                                                                                                  +
                                                                                                                                  3257 } // while (pkt_it != snd_flying_pkts_by_when.past_oldest())
                                                                                                                                  +
                                                                                                                                  3258
                                                                                                                                  +
                                                                                                                                  3259 // Includes ALL Dropped packets (not just ones from new loss event, if any), so != cong_ctl_dropped_pkts.
                                                                                                                                  +
                                                                                                                                  3260 *dropped_pkts -= snd_flying_pkts_by_when.size(); // Subtract "after" from "before" to get dropped count.
                                                                                                                                  +
                                                                                                                                  3261 *dropped_bytes -= sock->m_snd_flying_bytes; // Similar.
                                                                                                                                  3262
                                                                                                                                  -
                                                                                                                                  3263 return true;
                                                                                                                                  -
                                                                                                                                  3264} // Node::drop_pkts_on_acks()
                                                                                                                                  -
                                                                                                                                  3265
                                                                                                                                  - -
                                                                                                                                  3267{
                                                                                                                                  -
                                                                                                                                  3268 using boost::algorithm::join;
                                                                                                                                  -
                                                                                                                                  3269 using boost::chrono::symbol_format;
                                                                                                                                  -
                                                                                                                                  3270 using std::string;
                                                                                                                                  -
                                                                                                                                  3271 using std::vector;
                                                                                                                                  -
                                                                                                                                  3272 using std::transform;
                                                                                                                                  -
                                                                                                                                  3273 using std::ostream;
                                                                                                                                  -
                                                                                                                                  3274
                                                                                                                                  -
                                                                                                                                  3275 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  3276
                                                                                                                                  -
                                                                                                                                  3277 // This helper of handle_accumulated_acks() just logs the individual acks about to be processed.
                                                                                                                                  -
                                                                                                                                  3278
                                                                                                                                  -
                                                                                                                                  3279 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  3280 using Ack = Ack_packet::Individual_ack;
                                                                                                                                  -
                                                                                                                                  3281 using Acks = vector<Ack::Ptr>;
                                                                                                                                  -
                                                                                                                                  3282 const Acks& acked_packets = sock->m_rcv_acked_packets;
                                                                                                                                  -
                                                                                                                                  3283
                                                                                                                                  -
                                                                                                                                  3284 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  3285 if (logger_ptr && logger_ptr->should_log(log::Sev::S_DATA, get_log_component())) // Very verbose and slow!
                                                                                                                                  -
                                                                                                                                  3286 {
                                                                                                                                  -
                                                                                                                                  3287 // Prepare serialization of m_rcv_acked_packets for TRACE logging; quite verbose and slow!
                                                                                                                                  -
                                                                                                                                  3288 vector<string> ack_strs(acked_packets.size());
                                                                                                                                  -
                                                                                                                                  3289 transform(acked_packets.begin(), acked_packets.end(), ack_strs.begin(),
                                                                                                                                  -
                                                                                                                                  3290 [](Ack::Const_ptr ack) -> string
                                                                                                                                  -
                                                                                                                                  3291 {
                                                                                                                                  -
                                                                                                                                  3292 return util::ostream_op_string('[', ack->m_seq_num, ", ", int(ack->m_rexmit_id), ", ",
                                                                                                                                  -
                                                                                                                                  3293 symbol_format,
                                                                                                                                  -
                                                                                                                                  3294 ack->m_delay, ']'); // "ns," not "nanoseconds."
                                                                                                                                  -
                                                                                                                                  3295 });
                                                                                                                                  -
                                                                                                                                  3296 const string ack_str = join(ack_strs, " ");
                                                                                                                                  -
                                                                                                                                  3297
                                                                                                                                  -
                                                                                                                                  3298 FLOW_LOG_DATA_WITHOUT_CHECKING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  3299 "Accumulated [ACK] packets with "
                                                                                                                                  -
                                                                                                                                  3300 "acknowledgments [seq_num, rexmit_id, delay]: "
                                                                                                                                  -
                                                                                                                                  3301 "[" << ack_str << "].");
                                                                                                                                  -
                                                                                                                                  3302 } // if (DATA)
                                                                                                                                  -
                                                                                                                                  3303 else
                                                                                                                                  -
                                                                                                                                  3304 {
                                                                                                                                  -
                                                                                                                                  3305 FLOW_LOG_TRACE("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  -
                                                                                                                                  3306 "Accumulated [ACK] packets with "
                                                                                                                                  -
                                                                                                                                  3307 "[" << acked_packets.size() << "] individual acknowledgments.");
                                                                                                                                  -
                                                                                                                                  3308 }
                                                                                                                                  -
                                                                                                                                  3309
                                                                                                                                  -
                                                                                                                                  3310 if (sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  -
                                                                                                                                  3311 {
                                                                                                                                  -
                                                                                                                                  3312 log_snd_window(sock);
                                                                                                                                  -
                                                                                                                                  3313 }
                                                                                                                                  -
                                                                                                                                  3314 // else { Why is this possible? Answer: See handle_accumulated_acks() for explanation near similar check. }
                                                                                                                                  -
                                                                                                                                  3315} // Node::log_accumulated_acks()
                                                                                                                                  -
                                                                                                                                  3316
                                                                                                                                  -
                                                                                                                                  3317void Node::drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  -
                                                                                                                                  3318{
                                                                                                                                  -
                                                                                                                                  3319 using std::list;
                                                                                                                                  -
                                                                                                                                  3320 using boost::prior;
                                                                                                                                  -
                                                                                                                                  3321
                                                                                                                                  -
                                                                                                                                  3322 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  3323
                                                                                                                                  -
                                                                                                                                  3324 // Since we call m_snd_drop_timer->done() when exiting ESTABLISHED, this should hold.
                                                                                                                                  -
                                                                                                                                  3325 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  -
                                                                                                                                  3326
                                                                                                                                  -
                                                                                                                                  3327 // For brevity and a bit of speed:
                                                                                                                                  -
                                                                                                                                  3328 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  3329 auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  -
                                                                                                                                  3330
                                                                                                                                  -
                                                                                                                                  3331 // Timer must not be running if there are no In-flight packets. Thus it should not have fired.
                                                                                                                                  -
                                                                                                                                  3332 assert(!snd_flying_pkts_by_when.empty());
                                                                                                                                  -
                                                                                                                                  3333
                                                                                                                                  -
                                                                                                                                  3334 /* Drop Timer fired and is telling us to consider Dropped some packets. If drop_all_packets, then
                                                                                                                                  -
                                                                                                                                  3335 * it's all of them. Otherwise it's just the earliest unacknowledged packet
                                                                                                                                  -
                                                                                                                                  3336 * (m_snd_flying_pkts_by_sent_when.begin()). */
                                                                                                                                  -
                                                                                                                                  3337
                                                                                                                                  -
                                                                                                                                  3338 // Log details of the In-flight packets before we change things.
                                                                                                                                  -
                                                                                                                                  3339 log_snd_window(sock);
                                                                                                                                  -
                                                                                                                                  3340
                                                                                                                                  -
                                                                                                                                  3341 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  3342 // To check, at the end, whether we've changed can_send() false => true.
                                                                                                                                  -
                                                                                                                                  3343 const bool could_send_before_drops = can_send(sock);
                                                                                                                                  -
                                                                                                                                  3344 // To check, at the end, whether we've changed snd_deqable() false => true.
                                                                                                                                  -
                                                                                                                                  3345 const bool had_rexmit_data_before_drops = !sock->m_snd_rexmit_q.empty();
                                                                                                                                  -
                                                                                                                                  3346 // Will store ID of the one packet to drop; reserved value 0 will mean ALL packets are dropped.
                                                                                                                                  -
                                                                                                                                  3347 Peer_socket::order_num_t packet_marked_to_drop_or_drop_all;
                                                                                                                                  -
                                                                                                                                  3348
                                                                                                                                  -
                                                                                                                                  3349 // Used below for congestion control.
                                                                                                                                  -
                                                                                                                                  3350 size_t cong_ctl_dropped_bytes = 0;
                                                                                                                                  -
                                                                                                                                  3351 size_t cong_ctl_dropped_pkts = 0;
                                                                                                                                  -
                                                                                                                                  3352
                                                                                                                                  -
                                                                                                                                  3353 if (drop_all_packets)
                                                                                                                                  -
                                                                                                                                  3354 {
                                                                                                                                  -
                                                                                                                                  3355 cong_ctl_dropped_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  -
                                                                                                                                  3356 cong_ctl_dropped_pkts = snd_flying_pkts_by_when.size();
                                                                                                                                  -
                                                                                                                                  3357
                                                                                                                                  -
                                                                                                                                  3358 // Queue them for retransmission, to be sent as soon as CWND provides enough space (could even be immediately).
                                                                                                                                  -
                                                                                                                                  3359 if (rexmit_on)
                                                                                                                                  -
                                                                                                                                  3360 {
                                                                                                                                  -
                                                                                                                                  3361 // Order is from earliest-sent to latest-sent (retransmission in the same order as transmission).
                                                                                                                                  -
                                                                                                                                  3362 for (Peer_socket::Sent_pkt_by_sent_when_map::Reverse_iterator pkt_it = snd_flying_pkts_by_when.oldest();
                                                                                                                                  -
                                                                                                                                  3363 pkt_it != snd_flying_pkts_by_when.past_newest();
                                                                                                                                  -
                                                                                                                                  3364 ++pkt_it)
                                                                                                                                  -
                                                                                                                                  3365 {
                                                                                                                                  -
                                                                                                                                  3366 // The forward iterator F pointing to same list element as reverse iterator R is prior(R.base()). Google it.
                                                                                                                                  -
                                                                                                                                  3367 if (!ok_to_rexmit_or_close(sock, prior(pkt_it.base()), false)) // Ensure not too many retransmissions already.
                                                                                                                                  -
                                                                                                                                  3368 /* ^-- defer_delta_check == false: because we were invoked from a timer event. Therefore, we will NOT perform
                                                                                                                                  -
                                                                                                                                  3369 * event_set_all_check_delta(false) before the boost.asio handler exits. Therefore boost.asio
                                                                                                                                  -
                                                                                                                                  3370 * may sleep (block) before event_set_all_check_delta(false). Therefore that would delay
                                                                                                                                  -
                                                                                                                                  3371 * delivery of the event to the user. Therefore force the delta check immediately. See
                                                                                                                                  -
                                                                                                                                  3372 * Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  3373 {
                                                                                                                                  -
                                                                                                                                  3374 return; // Already closed/logged/etc.
                                                                                                                                  -
                                                                                                                                  3375 }
                                                                                                                                  -
                                                                                                                                  3376 // else
                                                                                                                                  -
                                                                                                                                  3377
                                                                                                                                  -
                                                                                                                                  3378 sock->m_snd_rexmit_q.push_back(pkt_it->second); // Only a ref-counted pointer copy (constant time).
                                                                                                                                  -
                                                                                                                                  3379 }
                                                                                                                                  -
                                                                                                                                  3380 sock->m_snd_rexmit_q_size += cong_ctl_dropped_pkts;
                                                                                                                                  -
                                                                                                                                  3381 }
                                                                                                                                  -
                                                                                                                                  3382 // else { Just drop it. }
                                                                                                                                  +
                                                                                                                                  3263 if (*cong_ctl_dropped_pkts != 0)
                                                                                                                                  +
                                                                                                                                  3264 {
                                                                                                                                  +
                                                                                                                                  3265 // Register that we've detected a NEW loss event (not the same as dropped_data() -- see that elsewhere).
                                                                                                                                  +
                                                                                                                                  3266 snd_stats.loss_event();
                                                                                                                                  +
                                                                                                                                  3267 }
                                                                                                                                  +
                                                                                                                                  3268
                                                                                                                                  +
                                                                                                                                  3269 return true;
                                                                                                                                  +
                                                                                                                                  3270} // Node::drop_pkts_on_acks()
                                                                                                                                  +
                                                                                                                                  3271
                                                                                                                                  + +
                                                                                                                                  3273{
                                                                                                                                  +
                                                                                                                                  3274 using boost::algorithm::join;
                                                                                                                                  +
                                                                                                                                  3275 using boost::chrono::symbol_format;
                                                                                                                                  +
                                                                                                                                  3276 using std::string;
                                                                                                                                  +
                                                                                                                                  3277 using std::vector;
                                                                                                                                  +
                                                                                                                                  3278 using std::transform;
                                                                                                                                  +
                                                                                                                                  3279 using std::ostream;
                                                                                                                                  +
                                                                                                                                  3280
                                                                                                                                  +
                                                                                                                                  3281 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  3282
                                                                                                                                  +
                                                                                                                                  3283 // This helper of handle_accumulated_acks() just logs the individual acks about to be processed.
                                                                                                                                  +
                                                                                                                                  3284
                                                                                                                                  +
                                                                                                                                  3285 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  3286 using Ack = Ack_packet::Individual_ack;
                                                                                                                                  +
                                                                                                                                  3287 using Acks = vector<Ack::Ptr>;
                                                                                                                                  +
                                                                                                                                  3288 const Acks& acked_packets = sock->m_rcv_acked_packets;
                                                                                                                                  +
                                                                                                                                  3289
                                                                                                                                  +
                                                                                                                                  3290 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  3291 if (logger_ptr && logger_ptr->should_log(log::Sev::S_DATA, get_log_component())) // Very verbose and slow!
                                                                                                                                  +
                                                                                                                                  3292 {
                                                                                                                                  +
                                                                                                                                  3293 // Prepare serialization of m_rcv_acked_packets for TRACE logging; quite verbose and slow!
                                                                                                                                  +
                                                                                                                                  3294 vector<string> ack_strs(acked_packets.size());
                                                                                                                                  +
                                                                                                                                  3295 transform(acked_packets.begin(), acked_packets.end(), ack_strs.begin(),
                                                                                                                                  +
                                                                                                                                  3296 [](Ack::Const_ptr ack) -> string
                                                                                                                                  +
                                                                                                                                  3297 {
                                                                                                                                  +
                                                                                                                                  3298 return util::ostream_op_string('[', ack->m_seq_num, ", ", int(ack->m_rexmit_id), ", ",
                                                                                                                                  +
                                                                                                                                  3299 symbol_format,
                                                                                                                                  +
                                                                                                                                  3300 ack->m_delay, ']'); // "ns," not "nanoseconds."
                                                                                                                                  +
                                                                                                                                  3301 });
                                                                                                                                  +
                                                                                                                                  3302 const string ack_str = join(ack_strs, " ");
                                                                                                                                  +
                                                                                                                                  3303
                                                                                                                                  +
                                                                                                                                  3304 FLOW_LOG_DATA_WITHOUT_CHECKING("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  3305 "Accumulated [ACK] packets with "
                                                                                                                                  +
                                                                                                                                  3306 "acknowledgments [seq_num, rexmit_id, delay]: "
                                                                                                                                  +
                                                                                                                                  3307 "[" << ack_str << "].");
                                                                                                                                  +
                                                                                                                                  3308 } // if (DATA)
                                                                                                                                  +
                                                                                                                                  3309 else
                                                                                                                                  +
                                                                                                                                  3310 {
                                                                                                                                  +
                                                                                                                                  3311 FLOW_LOG_TRACE("NetFlow worker thread working on [" << sock << "]. "
                                                                                                                                  +
                                                                                                                                  3312 "Accumulated [ACK] packets with "
                                                                                                                                  +
                                                                                                                                  3313 "[" << acked_packets.size() << "] individual acknowledgments.");
                                                                                                                                  +
                                                                                                                                  3314 }
                                                                                                                                  +
                                                                                                                                  3315
                                                                                                                                  +
                                                                                                                                  3316 if (sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  3317 {
                                                                                                                                  +
                                                                                                                                  3318 log_snd_window(sock);
                                                                                                                                  +
                                                                                                                                  3319 }
                                                                                                                                  +
                                                                                                                                  3320 // else { Why is this possible? Answer: See handle_accumulated_acks() for explanation near similar check. }
                                                                                                                                  +
                                                                                                                                  3321} // Node::log_accumulated_acks()
                                                                                                                                  +
                                                                                                                                  3322
                                                                                                                                  +
                                                                                                                                  3323void Node::drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  +
                                                                                                                                  3324{
                                                                                                                                  +
                                                                                                                                  3325 using std::list;
                                                                                                                                  +
                                                                                                                                  3326 using boost::prior;
                                                                                                                                  +
                                                                                                                                  3327
                                                                                                                                  +
                                                                                                                                  3328 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  3329
                                                                                                                                  +
                                                                                                                                  3330 // Since we call m_snd_drop_timer->done() when exiting ESTABLISHED, this should hold.
                                                                                                                                  +
                                                                                                                                  3331 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  +
                                                                                                                                  3332
                                                                                                                                  +
                                                                                                                                  3333 // For brevity and a bit of speed:
                                                                                                                                  +
                                                                                                                                  3334 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  3335 auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  +
                                                                                                                                  3336
                                                                                                                                  +
                                                                                                                                  3337 // Timer must not be running if there are no In-flight packets. Thus it should not have fired.
                                                                                                                                  +
                                                                                                                                  3338 assert(!snd_flying_pkts_by_when.empty());
                                                                                                                                  +
                                                                                                                                  3339
                                                                                                                                  +
                                                                                                                                  3340 /* Drop Timer fired and is telling us to consider Dropped some packets. If drop_all_packets, then
                                                                                                                                  +
                                                                                                                                  3341 * it's all of them. Otherwise it's just the earliest unacknowledged packet
                                                                                                                                  +
                                                                                                                                  3342 * (m_snd_flying_pkts_by_sent_when.begin()). */
                                                                                                                                  +
                                                                                                                                  3343
                                                                                                                                  +
                                                                                                                                  3344 // Log details of the In-flight packets before we change things.
                                                                                                                                  +
                                                                                                                                  3345 log_snd_window(sock);
                                                                                                                                  +
                                                                                                                                  3346
                                                                                                                                  +
                                                                                                                                  3347 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  3348 // To check, at the end, whether we've changed can_send() false => true.
                                                                                                                                  +
                                                                                                                                  3349 const bool could_send_before_drops = can_send(sock);
                                                                                                                                  +
                                                                                                                                  3350 // To check, at the end, whether we've changed snd_deqable() false => true.
                                                                                                                                  +
                                                                                                                                  3351 const bool had_rexmit_data_before_drops = !sock->m_snd_rexmit_q.empty();
                                                                                                                                  +
                                                                                                                                  3352 // Will store ID of the one packet to drop; reserved value 0 will mean ALL packets are dropped.
                                                                                                                                  +
                                                                                                                                  3353 Peer_socket::order_num_t packet_marked_to_drop_or_drop_all;
                                                                                                                                  +
                                                                                                                                  3354
                                                                                                                                  +
                                                                                                                                  3355 // Used below for congestion control.
                                                                                                                                  +
                                                                                                                                  3356 size_t cong_ctl_dropped_bytes = 0;
                                                                                                                                  +
                                                                                                                                  3357 size_t cong_ctl_dropped_pkts = 0;
                                                                                                                                  +
                                                                                                                                  3358
                                                                                                                                  +
                                                                                                                                  3359 if (drop_all_packets)
                                                                                                                                  +
                                                                                                                                  3360 {
                                                                                                                                  +
                                                                                                                                  3361 cong_ctl_dropped_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  +
                                                                                                                                  3362 cong_ctl_dropped_pkts = snd_flying_pkts_by_when.size();
                                                                                                                                  +
                                                                                                                                  3363
                                                                                                                                  +
                                                                                                                                  3364 // Queue them for retransmission, to be sent as soon as CWND provides enough space (could even be immediately).
                                                                                                                                  +
                                                                                                                                  3365 if (rexmit_on)
                                                                                                                                  +
                                                                                                                                  3366 {
                                                                                                                                  +
                                                                                                                                  3367 // Order is from earliest-sent to latest-sent (retransmission in the same order as transmission).
                                                                                                                                  +
                                                                                                                                  3368 for (Peer_socket::Sent_pkt_by_sent_when_map::Reverse_iterator pkt_it = snd_flying_pkts_by_when.oldest();
                                                                                                                                  +
                                                                                                                                  3369 pkt_it != snd_flying_pkts_by_when.past_newest();
                                                                                                                                  +
                                                                                                                                  3370 ++pkt_it)
                                                                                                                                  +
                                                                                                                                  3371 {
                                                                                                                                  +
                                                                                                                                  3372 // The forward iterator F pointing to same list element as reverse iterator R is prior(R.base()). Google it.
                                                                                                                                  +
                                                                                                                                  3373 if (!ok_to_rexmit_or_close(sock, prior(pkt_it.base()), false)) // Ensure not too many retransmissions already.
                                                                                                                                  +
                                                                                                                                  3374 /* ^-- defer_delta_check == false: because we were invoked from a timer event. Therefore, we will NOT perform
                                                                                                                                  +
                                                                                                                                  3375 * event_set_all_check_delta(false) before the boost.asio handler exits. Therefore boost.asio
                                                                                                                                  +
                                                                                                                                  3376 * may sleep (block) before event_set_all_check_delta(false). Therefore that would delay
                                                                                                                                  +
                                                                                                                                  3377 * delivery of the event to the user. Therefore force the delta check immediately. See
                                                                                                                                  +
                                                                                                                                  3378 * Node::m_sock_events doc header for details. */
                                                                                                                                  +
                                                                                                                                  3379 {
                                                                                                                                  +
                                                                                                                                  3380 return; // Already closed/logged/etc.
                                                                                                                                  +
                                                                                                                                  3381 }
                                                                                                                                  +
                                                                                                                                  3382 // else
                                                                                                                                  3383
                                                                                                                                  -
                                                                                                                                  3384 // Update our image of the pipe. For efficiency we use clear() instead of doing it one-by-one above.
                                                                                                                                  -
                                                                                                                                  3385
                                                                                                                                  -
                                                                                                                                  3386 // Update byte count.
                                                                                                                                  -
                                                                                                                                  3387 snd_flying_pkts_updated(sock, snd_flying_pkts_by_when.newest(), snd_flying_pkts_by_when.past_oldest(), false);
                                                                                                                                  -
                                                                                                                                  3388 snd_flying_pkts_by_when.clear();
                                                                                                                                  -
                                                                                                                                  3389 snd_flying_pkts_by_seq.clear();
                                                                                                                                  -
                                                                                                                                  3390
                                                                                                                                  -
                                                                                                                                  3391 packet_marked_to_drop_or_drop_all = 0; // Means drop all.
                                                                                                                                  -
                                                                                                                                  3392 }
                                                                                                                                  -
                                                                                                                                  3393 else
                                                                                                                                  -
                                                                                                                                  3394 {
                                                                                                                                  -
                                                                                                                                  3395 // Get the packet that was sent before all the others.
                                                                                                                                  -
                                                                                                                                  3396 const Peer_socket::Sent_pkt_ordered_by_when_iter& oldest_pkt_it = prior(snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  -
                                                                                                                                  3397 Peer_socket::Sent_packet::Ptr oldest_pkt = oldest_pkt_it->second;
                                                                                                                                  -
                                                                                                                                  3398
                                                                                                                                  -
                                                                                                                                  3399 cong_ctl_dropped_bytes = oldest_pkt->m_size;
                                                                                                                                  -
                                                                                                                                  3400 cong_ctl_dropped_pkts = 1;
                                                                                                                                  -
                                                                                                                                  3401
                                                                                                                                  -
                                                                                                                                  3402 // Queue it for retransmission, to be sent as soon as CWND provides enough space (could even be immediately).
                                                                                                                                  -
                                                                                                                                  3403 if (rexmit_on)
                                                                                                                                  -
                                                                                                                                  3404 {
                                                                                                                                  -
                                                                                                                                  3405 if (!ok_to_rexmit_or_close(sock, oldest_pkt_it, false)) // Ensure not too many retransmissions already.
                                                                                                                                  -
                                                                                                                                  3406 // ^-- false <= Same as comment above.
                                                                                                                                  -
                                                                                                                                  3407 {
                                                                                                                                  -
                                                                                                                                  3408 return; // Already closed/logged/etc.
                                                                                                                                  -
                                                                                                                                  3409 }
                                                                                                                                  -
                                                                                                                                  3410 // else
                                                                                                                                  -
                                                                                                                                  3411
                                                                                                                                  -
                                                                                                                                  3412 sock->m_snd_rexmit_q.push_back(oldest_pkt); // Only a ref-counted pointer copy (constant time).
                                                                                                                                  -
                                                                                                                                  3413 ++sock->m_snd_rexmit_q_size;
                                                                                                                                  -
                                                                                                                                  3414 }
                                                                                                                                  -
                                                                                                                                  3415 // else { Just drop it. }
                                                                                                                                  -
                                                                                                                                  3416
                                                                                                                                  -
                                                                                                                                  3417 // Remember it short-term for the Drop_timer consolidated book-keeping below...
                                                                                                                                  -
                                                                                                                                  3418 packet_marked_to_drop_or_drop_all = oldest_pkt->m_sent_when.back().m_order_num;
                                                                                                                                  -
                                                                                                                                  3419
                                                                                                                                  -
                                                                                                                                  3420 // ...and in fact mark that packet Dropped (update our image of the pipe).
                                                                                                                                  -
                                                                                                                                  3421 snd_flying_pkts_erase_one(sock, oldest_pkt_it);
                                                                                                                                  -
                                                                                                                                  3422 }
                                                                                                                                  -
                                                                                                                                  3423
                                                                                                                                  -
                                                                                                                                  3424 /* Deal with congestion control. For introduction to the general topic see the large comment
                                                                                                                                  -
                                                                                                                                  3425 * near the top of handle_accumulated_acks().
                                                                                                                                  -
                                                                                                                                  3426 *
                                                                                                                                  -
                                                                                                                                  3427 * Since a Drop Timeout implies a large loss event, the congestion control module must be
                                                                                                                                  -
                                                                                                                                  3428 * informed. It may adjust the congestion window (used in can_send() and controlling how many
                                                                                                                                  -
                                                                                                                                  3429 * packets we are allowed to have In-flight at a time), probably downward.
                                                                                                                                  -
                                                                                                                                  3430 *
                                                                                                                                  -
                                                                                                                                  3431 * Also, this is a new loss event. Why? (For detailed explanation of what a loss event is, and
                                                                                                                                  -
                                                                                                                                  3432 * how we keep track of them, see that large comment in handle_accumulated_acks(). It
                                                                                                                                  -
                                                                                                                                  3433 * may be required to understand the rest of this paragraph.) Certainly this Drop is part of some
                                                                                                                                  -
                                                                                                                                  3434 * loss event by definition, but is it a new loss event, or merely the previous one (if such
                                                                                                                                  -
                                                                                                                                  3435 * exists)? Well, a Drop Timeout is, in practice, at least 1 second (which is likely 4 times a
                                                                                                                                  -
                                                                                                                                  3436 * pretty large RTT of 250 msec) and can also be estimated to be 3 * SRTT. In other words it is
                                                                                                                                  -
                                                                                                                                  3437 * probably much larger than SRTT, and certainly is at least a little larger than SRTT. Therefore
                                                                                                                                  -
                                                                                                                                  3438 * most likely any packet(s) Dropped by this DTO were sent after the last loss event (if any) was
                                                                                                                                  -
                                                                                                                                  3439 * detected. Hence this DTO event is a new loss event. We could explicitly check for this, but
                                                                                                                                  -
                                                                                                                                  3440 * it seems unnecessarily complex and intuitively unnecessary.
                                                                                                                                  -
                                                                                                                                  3441 *
                                                                                                                                  -
                                                                                                                                  3442 * Per handle_accumulated_acks(), when a new loss event is seen, m_snd_last_loss_event_when
                                                                                                                                  -
                                                                                                                                  3443 * is set to NOW. */
                                                                                                                                  -
                                                                                                                                  3444
                                                                                                                                  -
                                                                                                                                  3445 // @todo Arguable if it should be INFO or TRACE. We'll see.
                                                                                                                                  -
                                                                                                                                  3446 FLOW_LOG_INFO("cong_ctl [" << sock << "] update: Drop Timeout event: "
                                                                                                                                  -
                                                                                                                                  3447 "Dropped [" << cong_ctl_dropped_bytes << "] bytes = [" << cong_ctl_dropped_pkts << "] packets.");
                                                                                                                                  -
                                                                                                                                  3448
                                                                                                                                  -
                                                                                                                                  3449 // MUST call this after, not before, updating m_snd_flying_{packets|bytes} per method doc.
                                                                                                                                  -
                                                                                                                                  3450 sock->m_snd_cong_ctl->on_drop_timeout(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  -
                                                                                                                                  3451 sock->m_snd_last_loss_event_when = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  3452
                                                                                                                                  -
                                                                                                                                  3453 // Register that there was a timeout, and that bytes were converted from In-flight to Dropped.
                                                                                                                                  -
                                                                                                                                  3454 sock->m_snd_stats.drop_timeout();
                                                                                                                                  -
                                                                                                                                  3455 sock->m_snd_stats.dropped_data(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  -
                                                                                                                                  3456
                                                                                                                                  -
                                                                                                                                  3457 // Now log the "after."
                                                                                                                                  -
                                                                                                                                  3458 log_snd_window(sock);
                                                                                                                                  -
                                                                                                                                  3459
                                                                                                                                  -
                                                                                                                                  3460 // Since we've changed snd_flying_pkts*, Drop_timer events have occurred. Cleanly handle them all in one go.
                                                                                                                                  -
                                                                                                                                  3461
                                                                                                                                  -
                                                                                                                                  3462 const Drop_timer::Ptr drop_timer = sock->m_snd_drop_timer;
                                                                                                                                  -
                                                                                                                                  3463 drop_timer->start_contemporaneous_events();
                                                                                                                                  -
                                                                                                                                  3464
                                                                                                                                  -
                                                                                                                                  3465 /* Handle possible effect of above activities on the Drop Timer. (It may get disabled or restarted anew.)
                                                                                                                                  -
                                                                                                                                  3466 * Why not just do this right when we erase the associated packets from snd_flying_pkts*? We don't want to
                                                                                                                                  -
                                                                                                                                  3467 * trigger disruptive behavior like possibly retransmitting everything in the middle of all that accounting
                                                                                                                                  -
                                                                                                                                  3468 * which is not yet complete. Now it's complete, so it's the right time to handle this.
                                                                                                                                  -
                                                                                                                                  3469 *
                                                                                                                                  -
                                                                                                                                  3470 * Recall that snd_flying_pkts* have been updated and no longer contain the associated packet(s)'s info. */
                                                                                                                                  -
                                                                                                                                  3471 if (packet_marked_to_drop_or_drop_all == 0)
                                                                                                                                  -
                                                                                                                                  3472 {
                                                                                                                                  -
                                                                                                                                  3473 // Note that this is equivalent to calling ...packet_no_longer_in_flight(P) for all P -- just faster.
                                                                                                                                  -
                                                                                                                                  3474 drop_timer->on_no_packets_in_flight_any_longer();
                                                                                                                                  -
                                                                                                                                  3475 }
                                                                                                                                  -
                                                                                                                                  3476 else // if (packet_marked_to_drop_or_drop_all refers to, in fact, a specific packet)
                                                                                                                                  -
                                                                                                                                  3477 {
                                                                                                                                  -
                                                                                                                                  3478 drop_timer->on_packet_no_longer_in_flight(packet_marked_to_drop_or_drop_all);
                                                                                                                                  -
                                                                                                                                  3479 /* Could also call on_no_packets_in_flight_any_longer() if now none is In-flight, but performance-wise that'd
                                                                                                                                  -
                                                                                                                                  3480 * be the same; ...packet_no_longer_in_flight() will check the same condition anyway. So don't bother. */
                                                                                                                                  +
                                                                                                                                  3384 sock->m_snd_rexmit_q.push_back(pkt_it->second); // Only a ref-counted pointer copy (constant time).
                                                                                                                                  +
                                                                                                                                  3385 }
                                                                                                                                  +
                                                                                                                                  3386 sock->m_snd_rexmit_q_size += cong_ctl_dropped_pkts;
                                                                                                                                  +
                                                                                                                                  3387 }
                                                                                                                                  +
                                                                                                                                  3388 // else { Just drop it. }
                                                                                                                                  +
                                                                                                                                  3389
                                                                                                                                  +
                                                                                                                                  3390 // Update our image of the pipe. For efficiency we use clear() instead of doing it one-by-one above.
                                                                                                                                  +
                                                                                                                                  3391
                                                                                                                                  +
                                                                                                                                  3392 // Update byte count.
                                                                                                                                  +
                                                                                                                                  3393 snd_flying_pkts_updated(sock, snd_flying_pkts_by_when.newest(), snd_flying_pkts_by_when.past_oldest(), false);
                                                                                                                                  +
                                                                                                                                  3394 snd_flying_pkts_by_when.clear();
                                                                                                                                  +
                                                                                                                                  3395 snd_flying_pkts_by_seq.clear();
                                                                                                                                  +
                                                                                                                                  3396
                                                                                                                                  +
                                                                                                                                  3397 packet_marked_to_drop_or_drop_all = 0; // Means drop all.
                                                                                                                                  +
                                                                                                                                  3398 }
                                                                                                                                  +
                                                                                                                                  3399 else
                                                                                                                                  +
                                                                                                                                  3400 {
                                                                                                                                  +
                                                                                                                                  3401 // Get the packet that was sent before all the others.
                                                                                                                                  +
                                                                                                                                  3402 const Peer_socket::Sent_pkt_ordered_by_when_iter& oldest_pkt_it = prior(snd_flying_pkts_by_when.past_oldest());
                                                                                                                                  +
                                                                                                                                  3403 Peer_socket::Sent_packet::Ptr oldest_pkt = oldest_pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3404
                                                                                                                                  +
                                                                                                                                  3405 cong_ctl_dropped_bytes = oldest_pkt->m_size;
                                                                                                                                  +
                                                                                                                                  3406 cong_ctl_dropped_pkts = 1;
                                                                                                                                  +
                                                                                                                                  3407
                                                                                                                                  +
                                                                                                                                  3408 // Queue it for retransmission, to be sent as soon as CWND provides enough space (could even be immediately).
                                                                                                                                  +
                                                                                                                                  3409 if (rexmit_on)
                                                                                                                                  +
                                                                                                                                  3410 {
                                                                                                                                  +
                                                                                                                                  3411 if (!ok_to_rexmit_or_close(sock, oldest_pkt_it, false)) // Ensure not too many retransmissions already.
                                                                                                                                  +
                                                                                                                                  3412 // ^-- false <= Same as comment above.
                                                                                                                                  +
                                                                                                                                  3413 {
                                                                                                                                  +
                                                                                                                                  3414 return; // Already closed/logged/etc.
                                                                                                                                  +
                                                                                                                                  3415 }
                                                                                                                                  +
                                                                                                                                  3416 // else
                                                                                                                                  +
                                                                                                                                  3417
                                                                                                                                  +
                                                                                                                                  3418 sock->m_snd_rexmit_q.push_back(oldest_pkt); // Only a ref-counted pointer copy (constant time).
                                                                                                                                  +
                                                                                                                                  3419 ++sock->m_snd_rexmit_q_size;
                                                                                                                                  +
                                                                                                                                  3420 }
                                                                                                                                  +
                                                                                                                                  3421 // else { Just drop it. }
                                                                                                                                  +
                                                                                                                                  3422
                                                                                                                                  +
                                                                                                                                  3423 // Remember it short-term for the Drop_timer consolidated book-keeping below...
                                                                                                                                  +
                                                                                                                                  3424 packet_marked_to_drop_or_drop_all = oldest_pkt->m_sent_when.back().m_order_num;
                                                                                                                                  +
                                                                                                                                  3425
                                                                                                                                  +
                                                                                                                                  3426 // ...and in fact mark that packet Dropped (update our image of the pipe).
                                                                                                                                  +
                                                                                                                                  3427 snd_flying_pkts_erase_one(sock, oldest_pkt_it);
                                                                                                                                  +
                                                                                                                                  3428 }
                                                                                                                                  +
                                                                                                                                  3429
                                                                                                                                  +
                                                                                                                                  3430 /* Deal with congestion control. For introduction to the general topic see the large comment
                                                                                                                                  +
                                                                                                                                  3431 * near the top of handle_accumulated_acks().
                                                                                                                                  +
                                                                                                                                  3432 *
                                                                                                                                  +
                                                                                                                                  3433 * Since a Drop Timeout implies a large loss event, the congestion control module must be
                                                                                                                                  +
                                                                                                                                  3434 * informed. It may adjust the congestion window (used in can_send() and controlling how many
                                                                                                                                  +
                                                                                                                                  3435 * packets we are allowed to have In-flight at a time), probably downward.
                                                                                                                                  +
                                                                                                                                  3436 *
                                                                                                                                  +
                                                                                                                                  3437 * Also, this is a new loss event. Why? (For detailed explanation of what a loss event is, and
                                                                                                                                  +
                                                                                                                                  3438 * how we keep track of them, see that large comment in handle_accumulated_acks(). It
                                                                                                                                  +
                                                                                                                                  3439 * may be required to understand the rest of this paragraph.) Certainly this Drop is part of some
                                                                                                                                  +
                                                                                                                                  3440 * loss event by definition, but is it a new loss event, or merely the previous one (if such
                                                                                                                                  +
                                                                                                                                  3441 * exists)? Well, a Drop Timeout is, in practice, at least 1 second (which is likely 4 times a
                                                                                                                                  +
                                                                                                                                  3442 * pretty large RTT of 250 msec) and can also be estimated to be 3 * SRTT. In other words it is
                                                                                                                                  +
                                                                                                                                  3443 * probably much larger than SRTT, and certainly is at least a little larger than SRTT. Therefore
                                                                                                                                  +
                                                                                                                                  3444 * most likely any packet(s) Dropped by this DTO were sent after the last loss event (if any) was
                                                                                                                                  +
                                                                                                                                  3445 * detected. Hence this DTO event is a new loss event. We could explicitly check for this, but
                                                                                                                                  +
                                                                                                                                  3446 * it seems unnecessarily complex and intuitively unnecessary.
                                                                                                                                  +
                                                                                                                                  3447 *
                                                                                                                                  +
                                                                                                                                  3448 * Per handle_accumulated_acks(), when a new loss event is seen, m_snd_last_loss_event_when
                                                                                                                                  +
                                                                                                                                  3449 * is set to NOW. */
                                                                                                                                  +
                                                                                                                                  3450
                                                                                                                                  +
                                                                                                                                  3451 // @todo Arguable if it should be INFO or TRACE. We'll see.
                                                                                                                                  +
                                                                                                                                  3452 FLOW_LOG_INFO("cong_ctl [" << sock << "] update: Drop Timeout event: "
                                                                                                                                  +
                                                                                                                                  3453 "Dropped [" << cong_ctl_dropped_bytes << "] bytes = [" << cong_ctl_dropped_pkts << "] packets.");
                                                                                                                                  +
                                                                                                                                  3454
                                                                                                                                  +
                                                                                                                                  3455 // MUST call this after, not before, updating m_snd_flying_{packets|bytes} per method doc.
                                                                                                                                  +
                                                                                                                                  3456 sock->m_snd_cong_ctl->on_drop_timeout(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  +
                                                                                                                                  3457 sock->m_snd_last_loss_event_when = Fine_clock::now();
                                                                                                                                  +
                                                                                                                                  3458
                                                                                                                                  +
                                                                                                                                  3459 // Register that there was a timeout, and that bytes were converted from In-flight to Dropped.
                                                                                                                                  +
                                                                                                                                  3460 sock->m_snd_stats.drop_timeout();
                                                                                                                                  +
                                                                                                                                  3461 sock->m_snd_stats.dropped_data(cong_ctl_dropped_bytes, cong_ctl_dropped_pkts);
                                                                                                                                  +
                                                                                                                                  3462
                                                                                                                                  +
                                                                                                                                  3463 // Now log the "after."
                                                                                                                                  +
                                                                                                                                  3464 log_snd_window(sock);
                                                                                                                                  +
                                                                                                                                  3465
                                                                                                                                  +
                                                                                                                                  3466 // Since we've changed snd_flying_pkts*, Drop_timer events have occurred. Cleanly handle them all in one go.
                                                                                                                                  +
                                                                                                                                  3467
                                                                                                                                  +
                                                                                                                                  3468 const Drop_timer::Ptr drop_timer = sock->m_snd_drop_timer;
                                                                                                                                  +
                                                                                                                                  3469 drop_timer->start_contemporaneous_events();
                                                                                                                                  +
                                                                                                                                  3470
                                                                                                                                  +
                                                                                                                                  3471 /* Handle possible effect of above activities on the Drop Timer. (It may get disabled or restarted anew.)
                                                                                                                                  +
                                                                                                                                  3472 * Why not just do this right when we erase the associated packets from snd_flying_pkts*? We don't want to
                                                                                                                                  +
                                                                                                                                  3473 * trigger disruptive behavior like possibly retransmitting everything in the middle of all that accounting
                                                                                                                                  +
                                                                                                                                  3474 * which is not yet complete. Now it's complete, so it's the right time to handle this.
                                                                                                                                  +
                                                                                                                                  3475 *
                                                                                                                                  +
                                                                                                                                  3476 * Recall that snd_flying_pkts* have been updated and no longer contain the associated packet(s)'s info. */
                                                                                                                                  +
                                                                                                                                  3477 if (packet_marked_to_drop_or_drop_all == 0)
                                                                                                                                  +
                                                                                                                                  3478 {
                                                                                                                                  +
                                                                                                                                  3479 // Note that this is equivalent to calling ...packet_no_longer_in_flight(P) for all P -- just faster.
                                                                                                                                  +
                                                                                                                                  3480 drop_timer->on_no_packets_in_flight_any_longer();
                                                                                                                                  3481 }
                                                                                                                                  -
                                                                                                                                  3482
                                                                                                                                  -
                                                                                                                                  3483 drop_timer->end_contemporaneous_events();
                                                                                                                                  -
                                                                                                                                  3484
                                                                                                                                  -
                                                                                                                                  3485 /* We've definitely reduced the number of packets we consider In-flight. We may also have added
                                                                                                                                  -
                                                                                                                                  3486 * packets to retransmission queue (if retransmission is on). Therefore can_send() may now return
                                                                                                                                  -
                                                                                                                                  3487 * true while at the beginning of the method it returned false; snd_deqable() may now return true
                                                                                                                                  -
                                                                                                                                  3488 * similarly. So have send_worker() check and send more if possible. See Node::send() for
                                                                                                                                  -
                                                                                                                                  3489 * discussion of overall strategy on this topic. */
                                                                                                                                  -
                                                                                                                                  3490 if ((!could_send_before_drops) || (rexmit_on && (!had_rexmit_data_before_drops)))
                                                                                                                                  -
                                                                                                                                  3491 {
                                                                                                                                  -
                                                                                                                                  3492 send_worker(sock, false);
                                                                                                                                  -
                                                                                                                                  3493 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  -
                                                                                                                                  3494 }
                                                                                                                                  -
                                                                                                                                  3495} // Node::drop_timer_action()
                                                                                                                                  -
                                                                                                                                  3496
                                                                                                                                  - -
                                                                                                                                  3498{
                                                                                                                                  -
                                                                                                                                  3499 using std::min;
                                                                                                                                  -
                                                                                                                                  3500 using std::max;
                                                                                                                                  -
                                                                                                                                  3501 using boost::ratio;
                                                                                                                                  -
                                                                                                                                  3502 using boost::ratio_subtract;
                                                                                                                                  -
                                                                                                                                  3503 using boost::ratio_string;
                                                                                                                                  -
                                                                                                                                  3504 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  3505 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  3506 using boost::chrono::microseconds;
                                                                                                                                  -
                                                                                                                                  3507 using boost::chrono::seconds;
                                                                                                                                  -
                                                                                                                                  3508
                                                                                                                                  -
                                                                                                                                  3509 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  3510
                                                                                                                                  -
                                                                                                                                  3511 // For brevity and a bit of speed:
                                                                                                                                  -
                                                                                                                                  3512 Fine_duration& srtt = sock->m_snd_smoothed_round_trip_time;
                                                                                                                                  -
                                                                                                                                  3513 Fine_duration& rtt_var = sock->m_round_trip_time_variance;
                                                                                                                                  -
                                                                                                                                  3514 Fine_duration& dto = sock->m_snd_drop_timeout;
                                                                                                                                  -
                                                                                                                                  3515 const Fine_duration& rtt = round_trip_time;
                                                                                                                                  +
                                                                                                                                  3482 else // if (packet_marked_to_drop_or_drop_all refers to, in fact, a specific packet)
                                                                                                                                  +
                                                                                                                                  3483 {
                                                                                                                                  +
                                                                                                                                  3484 drop_timer->on_packet_no_longer_in_flight(packet_marked_to_drop_or_drop_all);
                                                                                                                                  +
                                                                                                                                  3485 /* Could also call on_no_packets_in_flight_any_longer() if now none is In-flight, but performance-wise that'd
                                                                                                                                  +
                                                                                                                                  3486 * be the same; ...packet_no_longer_in_flight() will check the same condition anyway. So don't bother. */
                                                                                                                                  +
                                                                                                                                  3487 }
                                                                                                                                  +
                                                                                                                                  3488
                                                                                                                                  +
                                                                                                                                  3489 drop_timer->end_contemporaneous_events();
                                                                                                                                  +
                                                                                                                                  3490
                                                                                                                                  +
                                                                                                                                  3491 /* We've definitely reduced the number of packets we consider In-flight. We may also have added
                                                                                                                                  +
                                                                                                                                  3492 * packets to retransmission queue (if retransmission is on). Therefore can_send() may now return
                                                                                                                                  +
                                                                                                                                  3493 * true while at the beginning of the method it returned false; snd_deqable() may now return true
                                                                                                                                  +
                                                                                                                                  3494 * similarly. So have send_worker() check and send more if possible. See Node::send() for
                                                                                                                                  +
                                                                                                                                  3495 * discussion of overall strategy on this topic. */
                                                                                                                                  +
                                                                                                                                  3496 if ((!could_send_before_drops) || (rexmit_on && (!had_rexmit_data_before_drops)))
                                                                                                                                  +
                                                                                                                                  3497 {
                                                                                                                                  +
                                                                                                                                  3498 send_worker(sock, false);
                                                                                                                                  +
                                                                                                                                  3499 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  +
                                                                                                                                  3500 }
                                                                                                                                  +
                                                                                                                                  3501} // Node::drop_timer_action()
                                                                                                                                  +
                                                                                                                                  3502
                                                                                                                                  + +
                                                                                                                                  3504{
                                                                                                                                  +
                                                                                                                                  3505 using std::min;
                                                                                                                                  +
                                                                                                                                  3506 using std::max;
                                                                                                                                  +
                                                                                                                                  3507 using boost::ratio;
                                                                                                                                  +
                                                                                                                                  3508 using boost::ratio_subtract;
                                                                                                                                  +
                                                                                                                                  3509 using boost::ratio_string;
                                                                                                                                  +
                                                                                                                                  3510 using boost::chrono::round;
                                                                                                                                  +
                                                                                                                                  3511 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  3512 using boost::chrono::microseconds;
                                                                                                                                  +
                                                                                                                                  3513 using boost::chrono::seconds;
                                                                                                                                  +
                                                                                                                                  3514
                                                                                                                                  +
                                                                                                                                  3515 // We are in thread W.
                                                                                                                                  3516
                                                                                                                                  -
                                                                                                                                  3517 /* An ACK has supplied the given round_trip_time for a specific packet. We are to update the
                                                                                                                                  -
                                                                                                                                  3518 * smoothed RTT for the socket which is an estimate for the smooth "current" RTT for the socket.
                                                                                                                                  -
                                                                                                                                  3519 * Use RFC 6298 algorithm for SRTT calculation.
                                                                                                                                  -
                                                                                                                                  3520 *
                                                                                                                                  -
                                                                                                                                  3521 * RFC 6298 specifies the formula in "seconds." Of course it need not be seconds; it can be any
                                                                                                                                  -
                                                                                                                                  3522 * unit. We leave the unit we use unspecified, except to say that we will use the unit of
                                                                                                                                  -
                                                                                                                                  3523 * Fine_duration, which is the duration type of Fine_clock, which is the highest-resolution clock
                                                                                                                                  -
                                                                                                                                  3524 * available in the OS/hardware. Since, where possible, we keep using Fine_duration without
                                                                                                                                  -
                                                                                                                                  3525 * truncation to compute round_trip_time, assuming we don't introduce any unit conversions
                                                                                                                                  -
                                                                                                                                  3526 * (truncations, roundings) in the below code, the SRTT will maintain those units as well.
                                                                                                                                  -
                                                                                                                                  3527 * boost::chrono::duration will specifically cause compile failures if we don't explicitly specify
                                                                                                                                  -
                                                                                                                                  3528 * every truncation-inducing operation (duration_cast<>, round<>, etc.).
                                                                                                                                  -
                                                                                                                                  3529 *
                                                                                                                                  -
                                                                                                                                  3530 * BTW, this "unspecified" unit is probably nanoseconds.
                                                                                                                                  -
                                                                                                                                  3531 *
                                                                                                                                  -
                                                                                                                                  3532 * Note that the units used do NOT guarantee any particular clock granularity. E.g., I can give
                                                                                                                                  -
                                                                                                                                  3533 * you the time in milliseconds, but if I always say it in multiples of 1000 milliseconds, then I
                                                                                                                                  -
                                                                                                                                  3534 * may be working with milliseconds, but the resolution is 1 sec. */
                                                                                                                                  -
                                                                                                                                  3535
                                                                                                                                  -
                                                                                                                                  3536 if (srtt == Fine_duration::zero())
                                                                                                                                  -
                                                                                                                                  3537 {
                                                                                                                                  -
                                                                                                                                  3538 // First RTT measurement; initialize according to algorithm.
                                                                                                                                  -
                                                                                                                                  3539 srtt = rtt;
                                                                                                                                  -
                                                                                                                                  3540 rtt_var = rtt / 2;
                                                                                                                                  +
                                                                                                                                  3517 // For brevity and a bit of speed:
                                                                                                                                  +
                                                                                                                                  3518 Fine_duration& srtt = sock->m_snd_smoothed_round_trip_time;
                                                                                                                                  +
                                                                                                                                  3519 Fine_duration& rtt_var = sock->m_round_trip_time_variance;
                                                                                                                                  +
                                                                                                                                  3520 Fine_duration& dto = sock->m_snd_drop_timeout;
                                                                                                                                  +
                                                                                                                                  3521 const Fine_duration& rtt = round_trip_time;
                                                                                                                                  +
                                                                                                                                  3522
                                                                                                                                  +
                                                                                                                                  3523 /* An ACK has supplied the given round_trip_time for a specific packet. We are to update the
                                                                                                                                  +
                                                                                                                                  3524 * smoothed RTT for the socket which is an estimate for the smooth "current" RTT for the socket.
                                                                                                                                  +
                                                                                                                                  3525 * Use RFC 6298 algorithm for SRTT calculation.
                                                                                                                                  +
                                                                                                                                  3526 *
                                                                                                                                  +
                                                                                                                                  3527 * RFC 6298 specifies the formula in "seconds." Of course it need not be seconds; it can be any
                                                                                                                                  +
                                                                                                                                  3528 * unit. We leave the unit we use unspecified, except to say that we will use the unit of
                                                                                                                                  +
                                                                                                                                  3529 * Fine_duration, which is the duration type of Fine_clock, which is the highest-resolution clock
                                                                                                                                  +
                                                                                                                                  3530 * available in the OS/hardware. Since, where possible, we keep using Fine_duration without
                                                                                                                                  +
                                                                                                                                  3531 * truncation to compute round_trip_time, assuming we don't introduce any unit conversions
                                                                                                                                  +
                                                                                                                                  3532 * (truncations, roundings) in the below code, the SRTT will maintain those units as well.
                                                                                                                                  +
                                                                                                                                  3533 * boost::chrono::duration will specifically cause compile failures if we don't explicitly specify
                                                                                                                                  +
                                                                                                                                  3534 * every truncation-inducing operation (duration_cast<>, round<>, etc.).
                                                                                                                                  +
                                                                                                                                  3535 *
                                                                                                                                  +
                                                                                                                                  3536 * BTW, this "unspecified" unit is probably nanoseconds.
                                                                                                                                  +
                                                                                                                                  3537 *
                                                                                                                                  +
                                                                                                                                  3538 * Note that the units used do NOT guarantee any particular clock granularity. E.g., I can give
                                                                                                                                  +
                                                                                                                                  3539 * you the time in milliseconds, but if I always say it in multiples of 1000 milliseconds, then I
                                                                                                                                  +
                                                                                                                                  3540 * may be working with milliseconds, but the resolution is 1 sec. */
                                                                                                                                  3541
                                                                                                                                  -
                                                                                                                                  3542 // Truncate results to millisecond representation for readability.
                                                                                                                                  -
                                                                                                                                  3543 FLOW_LOG_TRACE("First SRTT calculation for [" << sock << "]: "
                                                                                                                                  -
                                                                                                                                  3544 "srtt = [" << round<milliseconds>(srtt) << " = " << srtt << "]; "
                                                                                                                                  -
                                                                                                                                  3545 "rtt_var = [" << round<milliseconds>(rtt_var) << " = " << rtt_var << "]; "
                                                                                                                                  -
                                                                                                                                  3546 "rtt = [" << rtt << "].");
                                                                                                                                  -
                                                                                                                                  3547 }
                                                                                                                                  -
                                                                                                                                  3548 else // if (SRTT was defined before this sample.)
                                                                                                                                  -
                                                                                                                                  3549 {
                                                                                                                                  -
                                                                                                                                  3550 // Subsequent RTT measurements.
                                                                                                                                  -
                                                                                                                                  3551
                                                                                                                                  -
                                                                                                                                  3552 // @todo Per last paragraph of RFC 6298-5, we MAY want to clear srtt/rtt_var afer multiple RTOs or maybe idleness.
                                                                                                                                  -
                                                                                                                                  3553 // (RTO = Retransmission Timeout, though we call it a Drop Timeout more accurately [we don't necessarily
                                                                                                                                  -
                                                                                                                                  3554 // retransmit on loss in NetFlow, unlike TCP].)
                                                                                                                                  -
                                                                                                                                  3555
                                                                                                                                  -
                                                                                                                                  3556 const Fine_duration prev_srtt = srtt;
                                                                                                                                  -
                                                                                                                                  3557 const Fine_duration prev_rtt_var = rtt_var;
                                                                                                                                  -
                                                                                                                                  3558
                                                                                                                                  -
                                                                                                                                  3559 /* Reason I used ratio<> instead of floating point constants: I don't want to use floating
                                                                                                                                  -
                                                                                                                                  3560 * points in production code that much. I don't necessarily trust it for consistent behavior across platforms...
                                                                                                                                  -
                                                                                                                                  3561 * and in general I just find integers more predictable/easier to reason about in most contexts of net_flow.
                                                                                                                                  -
                                                                                                                                  3562 * Reason I used ratio<> instead of just having separate integer constants for numerators and
                                                                                                                                  -
                                                                                                                                  3563 * denominators: I'd rather have ratio<> do the arithmetic for me (at compile time to boot!). */
                                                                                                                                  -
                                                                                                                                  3564 using Alpha = ratio<1, 8>; // 1/8, per RFC.
                                                                                                                                  -
                                                                                                                                  3565 using One_minus_alpha = ratio_subtract<ratio<1>, Alpha>;
                                                                                                                                  -
                                                                                                                                  3566 using Beta = ratio<1, 4>; // 1/4, per RFC.
                                                                                                                                  -
                                                                                                                                  3567 using One_minus_beta = ratio_subtract<ratio<1>, Beta>;
                                                                                                                                  -
                                                                                                                                  3568 // Now I can use X::num and X::den, such that X is the ratio X::num/X::den.
                                                                                                                                  -
                                                                                                                                  3569
                                                                                                                                  -
                                                                                                                                  3570 // Compute |srtt - rtt|.
                                                                                                                                  -
                                                                                                                                  3571 Fine_duration abs_srtt_minus_rtt = srtt - rtt;
                                                                                                                                  -
                                                                                                                                  3572 if (abs_srtt_minus_rtt.count() < 0)
                                                                                                                                  -
                                                                                                                                  3573 {
                                                                                                                                  -
                                                                                                                                  3574 abs_srtt_minus_rtt = -abs_srtt_minus_rtt;
                                                                                                                                  -
                                                                                                                                  3575 }
                                                                                                                                  -
                                                                                                                                  3576
                                                                                                                                  -
                                                                                                                                  3577 // Update the results per RFC.
                                                                                                                                  -
                                                                                                                                  3578 rtt_var
                                                                                                                                  -
                                                                                                                                  3579 = rtt_var * One_minus_beta::num / One_minus_beta::den
                                                                                                                                  -
                                                                                                                                  3580 + abs_srtt_minus_rtt * Beta::num / Beta::den;
                                                                                                                                  -
                                                                                                                                  3581 srtt
                                                                                                                                  -
                                                                                                                                  3582 = srtt * One_minus_alpha::num / One_minus_alpha::den
                                                                                                                                  -
                                                                                                                                  3583 + rtt * Alpha::num / Alpha::den;
                                                                                                                                  -
                                                                                                                                  3584
                                                                                                                                  -
                                                                                                                                  3585 // Truncate results to millisecond representation for readability.
                                                                                                                                  -
                                                                                                                                  3586 FLOW_LOG_TRACE("Next SRTT calculation for [" << sock << "]: "
                                                                                                                                  -
                                                                                                                                  3587 "srtt = [" << round<milliseconds>(srtt) << " = " << srtt << "]; "
                                                                                                                                  -
                                                                                                                                  3588 "rtt_var = [" << round<milliseconds>(rtt_var) << " = " << rtt_var << "]; "
                                                                                                                                  -
                                                                                                                                  3589 "rtt = [" << rtt << "]; "
                                                                                                                                  -
                                                                                                                                  3590 "prev_srtt = [" << prev_srtt << "]; "
                                                                                                                                  -
                                                                                                                                  3591 "prev_rtt_var = [" << prev_rtt_var << "]; "
                                                                                                                                  -
                                                                                                                                  3592 "alpha = " << (ratio_string<Alpha, char>::prefix()) << "; "
                                                                                                                                  -
                                                                                                                                  3593 "(1 - alpha) = " << (ratio_string<One_minus_alpha, char>::prefix()) << "; "
                                                                                                                                  -
                                                                                                                                  3594 "beta = " << (ratio_string<Beta, char>::prefix()) << "; "
                                                                                                                                  -
                                                                                                                                  3595 "(1 - beta) = " << (ratio_string<One_minus_beta, char>::prefix()) << "; "
                                                                                                                                  -
                                                                                                                                  3596 "|srtt - rtt| = [" << abs_srtt_minus_rtt << "].");
                                                                                                                                  -
                                                                                                                                  3597 } // else if (SRTT was defined before this sample)
                                                                                                                                  -
                                                                                                                                  3598
                                                                                                                                  -
                                                                                                                                  3599 /* Now compute Drop Timeout (DTO), similar to TCP's RTO (Retransmission Timeout): the minimum
                                                                                                                                  -
                                                                                                                                  3600 * amount of time we give an In-flight packet to get Acknowledged before considering it Dropped.
                                                                                                                                  -
                                                                                                                                  3601 * Again we use RFC 6298 for DTO computation.
                                                                                                                                  -
                                                                                                                                  3602 *
                                                                                                                                  -
                                                                                                                                  3603 * The formula is DTO = srtt + max(G, K * rtt_var), where K = 4 and G is the "clock
                                                                                                                                  -
                                                                                                                                  3604 * granularity." Additionally, we are to put a floor of 1 second on DTO. Finally, we are allowed
                                                                                                                                  -
                                                                                                                                  3605 * to put a ceiling on DTO, as long as that ceiling is at least 60 seconds.
                                                                                                                                  -
                                                                                                                                  3606 *
                                                                                                                                  -
                                                                                                                                  3607 * G plays an important part in the RTO caclulation algorithm, so we must know it. So what is it?
                                                                                                                                  -
                                                                                                                                  3608 * We don't know. We do however have a reasonably conservative upper bound; boost.timer
                                                                                                                                  -
                                                                                                                                  3609 * documentation lists some popular OS+CPU combinations and notes that for none of them does
                                                                                                                                  -
                                                                                                                                  3610 * high_resolution_timer exceed 5 microseconds. Therefore, let us pick the exceedingly
                                                                                                                                  -
                                                                                                                                  3611 * conservative G = 500 microseconds = 1/2 milliseconds. */
                                                                                                                                  -
                                                                                                                                  3612
                                                                                                                                  -
                                                                                                                                  3613 const Fine_duration clock_resolution_at_least = microseconds(500);
                                                                                                                                  -
                                                                                                                                  3614 const Fine_duration floor = seconds(1);
                                                                                                                                  -
                                                                                                                                  3615 const Fine_duration ceiling = sock->opt(sock->m_opts.m_dyn_drop_timeout_ceiling);
                                                                                                                                  -
                                                                                                                                  3616 const unsigned int k = 4;
                                                                                                                                  -
                                                                                                                                  3617
                                                                                                                                  -
                                                                                                                                  3618 const Fine_duration prev_dto = dto;
                                                                                                                                  -
                                                                                                                                  3619 const Fine_duration rtt_var_k = rtt_var * k;
                                                                                                                                  -
                                                                                                                                  3620 const Fine_duration srtt_plus_var_term = srtt + max(clock_resolution_at_least, rtt_var_k);
                                                                                                                                  -
                                                                                                                                  3621 dto = max(srtt_plus_var_term, floor);
                                                                                                                                  -
                                                                                                                                  3622 dto = min(dto, ceiling);
                                                                                                                                  +
                                                                                                                                  3542 if (srtt == Fine_duration::zero())
                                                                                                                                  +
                                                                                                                                  3543 {
                                                                                                                                  +
                                                                                                                                  3544 // First RTT measurement; initialize according to algorithm.
                                                                                                                                  +
                                                                                                                                  3545 srtt = rtt;
                                                                                                                                  +
                                                                                                                                  3546 rtt_var = rtt / 2;
                                                                                                                                  +
                                                                                                                                  3547
                                                                                                                                  +
                                                                                                                                  3548 // Truncate results to millisecond representation for readability.
                                                                                                                                  +
                                                                                                                                  3549 FLOW_LOG_TRACE("First SRTT calculation for [" << sock << "]: "
                                                                                                                                  +
                                                                                                                                  3550 "srtt = [" << round<milliseconds>(srtt) << " = " << srtt << "]; "
                                                                                                                                  +
                                                                                                                                  3551 "rtt_var = [" << round<milliseconds>(rtt_var) << " = " << rtt_var << "]; "
                                                                                                                                  +
                                                                                                                                  3552 "rtt = [" << rtt << "].");
                                                                                                                                  +
                                                                                                                                  3553 }
                                                                                                                                  +
                                                                                                                                  3554 else // if (SRTT was defined before this sample.)
                                                                                                                                  +
                                                                                                                                  3555 {
                                                                                                                                  +
                                                                                                                                  3556 // Subsequent RTT measurements.
                                                                                                                                  +
                                                                                                                                  3557
                                                                                                                                  +
                                                                                                                                  3558 // @todo Per last paragraph of RFC 6298-5, we MAY want to clear srtt/rtt_var afer multiple RTOs or maybe idleness.
                                                                                                                                  +
                                                                                                                                  3559 // (RTO = Retransmission Timeout, though we call it a Drop Timeout more accurately [we don't necessarily
                                                                                                                                  +
                                                                                                                                  3560 // retransmit on loss in NetFlow, unlike TCP].)
                                                                                                                                  +
                                                                                                                                  3561
                                                                                                                                  +
                                                                                                                                  3562 const Fine_duration prev_srtt = srtt;
                                                                                                                                  +
                                                                                                                                  3563 const Fine_duration prev_rtt_var = rtt_var;
                                                                                                                                  +
                                                                                                                                  3564
                                                                                                                                  +
                                                                                                                                  3565 /* Reason I used ratio<> instead of floating point constants: I don't want to use floating
                                                                                                                                  +
                                                                                                                                  3566 * points in production code that much. I don't necessarily trust it for consistent behavior across platforms...
                                                                                                                                  +
                                                                                                                                  3567 * and in general I just find integers more predictable/easier to reason about in most contexts of net_flow.
                                                                                                                                  +
                                                                                                                                  3568 * Reason I used ratio<> instead of just having separate integer constants for numerators and
                                                                                                                                  +
                                                                                                                                  3569 * denominators: I'd rather have ratio<> do the arithmetic for me (at compile time to boot!). */
                                                                                                                                  +
                                                                                                                                  3570 using Alpha = ratio<1, 8>; // 1/8, per RFC.
                                                                                                                                  +
                                                                                                                                  3571 using One_minus_alpha = ratio_subtract<ratio<1>, Alpha>;
                                                                                                                                  +
                                                                                                                                  3572 using Beta = ratio<1, 4>; // 1/4, per RFC.
                                                                                                                                  +
                                                                                                                                  3573 using One_minus_beta = ratio_subtract<ratio<1>, Beta>;
                                                                                                                                  +
                                                                                                                                  3574 // Now I can use X::num and X::den, such that X is the ratio X::num/X::den.
                                                                                                                                  +
                                                                                                                                  3575
                                                                                                                                  +
                                                                                                                                  3576 // Compute |srtt - rtt|.
                                                                                                                                  +
                                                                                                                                  3577 Fine_duration abs_srtt_minus_rtt = srtt - rtt;
                                                                                                                                  +
                                                                                                                                  3578 if (abs_srtt_minus_rtt.count() < 0)
                                                                                                                                  +
                                                                                                                                  3579 {
                                                                                                                                  +
                                                                                                                                  3580 abs_srtt_minus_rtt = -abs_srtt_minus_rtt;
                                                                                                                                  +
                                                                                                                                  3581 }
                                                                                                                                  +
                                                                                                                                  3582
                                                                                                                                  +
                                                                                                                                  3583 // Update the results per RFC.
                                                                                                                                  +
                                                                                                                                  3584 rtt_var
                                                                                                                                  +
                                                                                                                                  3585 = rtt_var * One_minus_beta::num / One_minus_beta::den
                                                                                                                                  +
                                                                                                                                  3586 + abs_srtt_minus_rtt * Beta::num / Beta::den;
                                                                                                                                  +
                                                                                                                                  3587 srtt
                                                                                                                                  +
                                                                                                                                  3588 = srtt * One_minus_alpha::num / One_minus_alpha::den
                                                                                                                                  +
                                                                                                                                  3589 + rtt * Alpha::num / Alpha::den;
                                                                                                                                  +
                                                                                                                                  3590
                                                                                                                                  +
                                                                                                                                  3591 // Truncate results to millisecond representation for readability.
                                                                                                                                  +
                                                                                                                                  3592 FLOW_LOG_TRACE("Next SRTT calculation for [" << sock << "]: "
                                                                                                                                  +
                                                                                                                                  3593 "srtt = [" << round<milliseconds>(srtt) << " = " << srtt << "]; "
                                                                                                                                  +
                                                                                                                                  3594 "rtt_var = [" << round<milliseconds>(rtt_var) << " = " << rtt_var << "]; "
                                                                                                                                  +
                                                                                                                                  3595 "rtt = [" << rtt << "]; "
                                                                                                                                  +
                                                                                                                                  3596 "prev_srtt = [" << prev_srtt << "]; "
                                                                                                                                  +
                                                                                                                                  3597 "prev_rtt_var = [" << prev_rtt_var << "]; "
                                                                                                                                  +
                                                                                                                                  3598 "alpha = " << (ratio_string<Alpha, char>::prefix()) << "; "
                                                                                                                                  +
                                                                                                                                  3599 "(1 - alpha) = " << (ratio_string<One_minus_alpha, char>::prefix()) << "; "
                                                                                                                                  +
                                                                                                                                  3600 "beta = " << (ratio_string<Beta, char>::prefix()) << "; "
                                                                                                                                  +
                                                                                                                                  3601 "(1 - beta) = " << (ratio_string<One_minus_beta, char>::prefix()) << "; "
                                                                                                                                  +
                                                                                                                                  3602 "|srtt - rtt| = [" << abs_srtt_minus_rtt << "].");
                                                                                                                                  +
                                                                                                                                  3603 } // else if (SRTT was defined before this sample)
                                                                                                                                  +
                                                                                                                                  3604
                                                                                                                                  +
                                                                                                                                  3605 /* Now compute Drop Timeout (DTO), similar to TCP's RTO (Retransmission Timeout): the minimum
                                                                                                                                  +
                                                                                                                                  3606 * amount of time we give an In-flight packet to get Acknowledged before considering it Dropped.
                                                                                                                                  +
                                                                                                                                  3607 * Again we use RFC 6298 for DTO computation.
                                                                                                                                  +
                                                                                                                                  3608 *
                                                                                                                                  +
                                                                                                                                  3609 * The formula is DTO = srtt + max(G, K * rtt_var), where K = 4 and G is the "clock
                                                                                                                                  +
                                                                                                                                  3610 * granularity." Additionally, we are to put a floor of 1 second on DTO. Finally, we are allowed
                                                                                                                                  +
                                                                                                                                  3611 * to put a ceiling on DTO, as long as that ceiling is at least 60 seconds.
                                                                                                                                  +
                                                                                                                                  3612 *
                                                                                                                                  +
                                                                                                                                  3613 * G plays an important part in the RTO caclulation algorithm, so we must know it. So what is it?
                                                                                                                                  +
                                                                                                                                  3614 * We don't know. We do however have a reasonably conservative upper bound; boost.timer
                                                                                                                                  +
                                                                                                                                  3615 * documentation lists some popular OS+CPU combinations and notes that for none of them does
                                                                                                                                  +
                                                                                                                                  3616 * high_resolution_timer exceed 5 microseconds. Therefore, let us pick the exceedingly
                                                                                                                                  +
                                                                                                                                  3617 * conservative G = 500 microseconds = 1/2 milliseconds. */
                                                                                                                                  +
                                                                                                                                  3618
                                                                                                                                  +
                                                                                                                                  3619 const Fine_duration clock_resolution_at_least = microseconds(500);
                                                                                                                                  +
                                                                                                                                  3620 const Fine_duration floor = seconds(1);
                                                                                                                                  +
                                                                                                                                  3621 const Fine_duration ceiling = sock->opt(sock->m_opts.m_dyn_drop_timeout_ceiling);
                                                                                                                                  +
                                                                                                                                  3622 const unsigned int k = 4;
                                                                                                                                  3623
                                                                                                                                  -
                                                                                                                                  3624 // Truncate results to millisecond representation for readability.
                                                                                                                                  -
                                                                                                                                  3625 FLOW_LOG_TRACE("Drop Timeout (DTO) calculation: "
                                                                                                                                  -
                                                                                                                                  3626 "dto = [" << round<milliseconds>(dto) << " = " << dto << "]; "
                                                                                                                                  -
                                                                                                                                  3627 "rtt_var * k = [" << rtt_var_k << "]; "
                                                                                                                                  -
                                                                                                                                  3628 "srtt + max(G, rtt_var * k) = [" << srtt_plus_var_term << "]; "
                                                                                                                                  -
                                                                                                                                  3629 "k = [" << k << "]; "
                                                                                                                                  -
                                                                                                                                  3630 "floor = [" << floor << "]; ceiling = [" << ceiling << "]; "
                                                                                                                                  -
                                                                                                                                  3631 "clock_resolution = [" << clock_resolution_at_least << "]; "
                                                                                                                                  -
                                                                                                                                  3632 "prev_dto = [" << prev_dto << "].");
                                                                                                                                  -
                                                                                                                                  3633} // void Node::new_round_trip_time_sample()
                                                                                                                                  -
                                                                                                                                  3634
                                                                                                                                  -
                                                                                                                                  3635void Node::log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging) const
                                                                                                                                  -
                                                                                                                                  3636{
                                                                                                                                  -
                                                                                                                                  3637 using std::vector;
                                                                                                                                  -
                                                                                                                                  3638 using std::list;
                                                                                                                                  -
                                                                                                                                  3639 using std::string;
                                                                                                                                  -
                                                                                                                                  3640 using boost::algorithm::join;
                                                                                                                                  -
                                                                                                                                  3641 using boost::prior;
                                                                                                                                  - -
                                                                                                                                  3643 using std::flush;
                                                                                                                                  -
                                                                                                                                  3644
                                                                                                                                  -
                                                                                                                                  3645 // We're in thread W.
                                                                                                                                  -
                                                                                                                                  3646
                                                                                                                                  -
                                                                                                                                  3647 // For brevity and a little speed:
                                                                                                                                  -
                                                                                                                                  3648 const auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  -
                                                                                                                                  3649 const auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  3650 const size_t num_flying_pkts = snd_flying_pkts_by_seq.size();
                                                                                                                                  -
                                                                                                                                  3651
                                                                                                                                  -
                                                                                                                                  3652 // force_verbose_info_logging => log the most detail, as INFO (if INFO logging enabled).
                                                                                                                                  -
                                                                                                                                  3653
                                                                                                                                  -
                                                                                                                                  3654 if (snd_flying_pkts_by_seq.empty())
                                                                                                                                  -
                                                                                                                                  3655 {
                                                                                                                                  -
                                                                                                                                  3656 // No In-flight packets, so this is brief enough for TRACE as opposed to DATA.
                                                                                                                                  -
                                                                                                                                  3657 FLOW_LOG_WITH_CHECKING(force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_TRACE,
                                                                                                                                  -
                                                                                                                                  3658 "Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  -
                                                                                                                                  3659 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  -
                                                                                                                                  3660 "sent+acked/dropped "
                                                                                                                                  -
                                                                                                                                  3661 "[" << sock->m_snd_init_seq_num << ", " << sock->m_snd_next_seq_num << ") "
                                                                                                                                  -
                                                                                                                                  3662 "unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  -
                                                                                                                                  3663 return;
                                                                                                                                  -
                                                                                                                                  3664 }
                                                                                                                                  -
                                                                                                                                  3665 // else
                                                                                                                                  -
                                                                                                                                  3666
                                                                                                                                  -
                                                                                                                                  3667 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  3668 if (((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_DATA, get_log_component()))) &&
                                                                                                                                  -
                                                                                                                                  3669 (!(force_verbose_info_logging && logger_ptr->should_log(log::Sev::S_INFO, get_log_component()))))
                                                                                                                                  -
                                                                                                                                  3670 {
                                                                                                                                  -
                                                                                                                                  3671 // Can't print entire In-flight data structure, but can print a summary, if TRACE enabled.
                                                                                                                                  - -
                                                                                                                                  3673 ("Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  -
                                                                                                                                  3674 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  -
                                                                                                                                  3675 "sent+acked/dropped [" << sock->m_snd_init_seq_num << ", " << snd_flying_pkts_by_seq.begin()->first << ") "
                                                                                                                                  -
                                                                                                                                  3676 "in-flight [" << sock->m_snd_flying_bytes << "] bytes: " << num_flying_pkts << ":{...} "
                                                                                                                                  -
                                                                                                                                  3677 "unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  -
                                                                                                                                  3678 return;
                                                                                                                                  -
                                                                                                                                  3679 }
                                                                                                                                  -
                                                                                                                                  3680 // else
                                                                                                                                  -
                                                                                                                                  3681
                                                                                                                                  -
                                                                                                                                  3682 // Very verbose and slow!
                                                                                                                                  -
                                                                                                                                  3683
                                                                                                                                  -
                                                                                                                                  3684 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  3685
                                                                                                                                  -
                                                                                                                                  3686 vector<string> pkt_strs;
                                                                                                                                  -
                                                                                                                                  3687 pkt_strs.reserve(num_flying_pkts);
                                                                                                                                  -
                                                                                                                                  3688 for (Peer_socket::Sent_pkt_ordered_by_seq_const_iter pkt_it_it = snd_flying_pkts_by_seq.begin();
                                                                                                                                  -
                                                                                                                                  3689 pkt_it_it != snd_flying_pkts_by_seq.end();
                                                                                                                                  -
                                                                                                                                  3690 ++pkt_it_it)
                                                                                                                                  -
                                                                                                                                  3691 {
                                                                                                                                  -
                                                                                                                                  3692 Sequence_number start, end;
                                                                                                                                  -
                                                                                                                                  3693 get_seq_num_range(pkt_it_it->second, &start, &end);
                                                                                                                                  -
                                                                                                                                  3694
                                                                                                                                  -
                                                                                                                                  3695 Peer_socket::Sent_packet::Const_ptr sent_pkt = pkt_it_it->second->second;
                                                                                                                                  -
                                                                                                                                  3696
                                                                                                                                  -
                                                                                                                                  3697 String_ostream pkt_str_os;
                                                                                                                                  -
                                                                                                                                  3698 pkt_str_os.os() << '[' << start;
                                                                                                                                  -
                                                                                                                                  3699 if (rexmit_on)
                                                                                                                                  -
                                                                                                                                  3700 {
                                                                                                                                  -
                                                                                                                                  3701 pkt_str_os.os() << '[' << int(sent_pkt->m_packet->m_rexmit_id) << '/' << sent_pkt->m_sent_when.back().m_order_num
                                                                                                                                  -
                                                                                                                                  3702 << "], ";
                                                                                                                                  -
                                                                                                                                  3703 }
                                                                                                                                  -
                                                                                                                                  3704 else
                                                                                                                                  -
                                                                                                                                  3705 {
                                                                                                                                  -
                                                                                                                                  3706 pkt_str_os.os() << ", ";
                                                                                                                                  -
                                                                                                                                  3707 }
                                                                                                                                  -
                                                                                                                                  3708 pkt_str_os.os() << end << ")<" << sent_pkt->m_acks_after_me << "acks" << flush;
                                                                                                                                  -
                                                                                                                                  3709
                                                                                                                                  -
                                                                                                                                  3710 pkt_strs.push_back(pkt_str_os.str());
                                                                                                                                  -
                                                                                                                                  3711 }
                                                                                                                                  -
                                                                                                                                  3712
                                                                                                                                  - -
                                                                                                                                  3714 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  -
                                                                                                                                  3715 "Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  -
                                                                                                                                  3716 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  -
                                                                                                                                  3717 "sent+acked/dropped [" << sock->m_snd_init_seq_num << ", " << snd_flying_pkts_by_seq.begin()->first << ") "
                                                                                                                                  -
                                                                                                                                  3718 "in-flight "
                                                                                                                                  -
                                                                                                                                  3719 "[" << sock->m_snd_flying_bytes << "] bytes: " << num_flying_pkts << ":{" << join(pkt_strs, " ") <<
                                                                                                                                  -
                                                                                                                                  3720 "} unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  -
                                                                                                                                  3721
                                                                                                                                  -
                                                                                                                                  3722 if (!rexmit_on)
                                                                                                                                  -
                                                                                                                                  3723 {
                                                                                                                                  -
                                                                                                                                  3724 return;
                                                                                                                                  -
                                                                                                                                  3725 }
                                                                                                                                  -
                                                                                                                                  3726 // else
                                                                                                                                  +
                                                                                                                                  3624 const Fine_duration prev_dto = dto;
                                                                                                                                  +
                                                                                                                                  3625 const Fine_duration rtt_var_k = rtt_var * k;
                                                                                                                                  +
                                                                                                                                  3626 const Fine_duration srtt_plus_var_term = srtt + max(clock_resolution_at_least, rtt_var_k);
                                                                                                                                  +
                                                                                                                                  3627 dto = max(srtt_plus_var_term, floor);
                                                                                                                                  +
                                                                                                                                  3628 dto = min(dto, ceiling);
                                                                                                                                  +
                                                                                                                                  3629
                                                                                                                                  +
                                                                                                                                  3630 // Truncate results to millisecond representation for readability.
                                                                                                                                  +
                                                                                                                                  3631 FLOW_LOG_TRACE("Drop Timeout (DTO) calculation: "
                                                                                                                                  +
                                                                                                                                  3632 "dto = [" << round<milliseconds>(dto) << " = " << dto << "]; "
                                                                                                                                  +
                                                                                                                                  3633 "rtt_var * k = [" << rtt_var_k << "]; "
                                                                                                                                  +
                                                                                                                                  3634 "srtt + max(G, rtt_var * k) = [" << srtt_plus_var_term << "]; "
                                                                                                                                  +
                                                                                                                                  3635 "k = [" << k << "]; "
                                                                                                                                  +
                                                                                                                                  3636 "floor = [" << floor << "]; ceiling = [" << ceiling << "]; "
                                                                                                                                  +
                                                                                                                                  3637 "clock_resolution = [" << clock_resolution_at_least << "]; "
                                                                                                                                  +
                                                                                                                                  3638 "prev_dto = [" << prev_dto << "].");
                                                                                                                                  +
                                                                                                                                  3639} // void Node::new_round_trip_time_sample()
                                                                                                                                  +
                                                                                                                                  3640
                                                                                                                                  +
                                                                                                                                  3641void Node::log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging) const
                                                                                                                                  +
                                                                                                                                  3642{
                                                                                                                                  +
                                                                                                                                  3643 using std::vector;
                                                                                                                                  +
                                                                                                                                  3644 using std::list;
                                                                                                                                  +
                                                                                                                                  3645 using std::string;
                                                                                                                                  +
                                                                                                                                  3646 using boost::algorithm::join;
                                                                                                                                  +
                                                                                                                                  3647 using boost::prior;
                                                                                                                                  + +
                                                                                                                                  3649 using std::flush;
                                                                                                                                  +
                                                                                                                                  3650
                                                                                                                                  +
                                                                                                                                  3651 // We're in thread W.
                                                                                                                                  +
                                                                                                                                  3652
                                                                                                                                  +
                                                                                                                                  3653 // For brevity and a little speed:
                                                                                                                                  +
                                                                                                                                  3654 const auto& snd_flying_pkts_by_seq = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  +
                                                                                                                                  3655 const auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  3656 const size_t num_flying_pkts = snd_flying_pkts_by_seq.size();
                                                                                                                                  +
                                                                                                                                  3657
                                                                                                                                  +
                                                                                                                                  3658 // force_verbose_info_logging => log the most detail, as INFO (if INFO logging enabled).
                                                                                                                                  +
                                                                                                                                  3659
                                                                                                                                  +
                                                                                                                                  3660 if (snd_flying_pkts_by_seq.empty())
                                                                                                                                  +
                                                                                                                                  3661 {
                                                                                                                                  +
                                                                                                                                  3662 // No In-flight packets, so this is brief enough for TRACE as opposed to DATA.
                                                                                                                                  +
                                                                                                                                  3663 FLOW_LOG_WITH_CHECKING(force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_TRACE,
                                                                                                                                  +
                                                                                                                                  3664 "Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  +
                                                                                                                                  3665 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  +
                                                                                                                                  3666 "sent+acked/dropped "
                                                                                                                                  +
                                                                                                                                  3667 "[" << sock->m_snd_init_seq_num << ", " << sock->m_snd_next_seq_num << ") "
                                                                                                                                  +
                                                                                                                                  3668 "unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  +
                                                                                                                                  3669 return;
                                                                                                                                  +
                                                                                                                                  3670 }
                                                                                                                                  +
                                                                                                                                  3671 // else
                                                                                                                                  +
                                                                                                                                  3672
                                                                                                                                  +
                                                                                                                                  3673 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  3674 if (((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_DATA, get_log_component()))) &&
                                                                                                                                  +
                                                                                                                                  3675 (!(force_verbose_info_logging && logger_ptr->should_log(log::Sev::S_INFO, get_log_component()))))
                                                                                                                                  +
                                                                                                                                  3676 {
                                                                                                                                  +
                                                                                                                                  3677 // Can't print entire In-flight data structure, but can print a summary, if TRACE enabled.
                                                                                                                                  + +
                                                                                                                                  3679 ("Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  +
                                                                                                                                  3680 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  +
                                                                                                                                  3681 "sent+acked/dropped [" << sock->m_snd_init_seq_num << ", " << snd_flying_pkts_by_seq.begin()->first << ") "
                                                                                                                                  +
                                                                                                                                  3682 "in-flight [" << sock->m_snd_flying_bytes << "] bytes: " << num_flying_pkts << ":{...} "
                                                                                                                                  +
                                                                                                                                  3683 "unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  +
                                                                                                                                  3684 return;
                                                                                                                                  +
                                                                                                                                  3685 }
                                                                                                                                  +
                                                                                                                                  3686 // else
                                                                                                                                  +
                                                                                                                                  3687
                                                                                                                                  +
                                                                                                                                  3688 // Very verbose and slow!
                                                                                                                                  +
                                                                                                                                  3689
                                                                                                                                  +
                                                                                                                                  3690 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  3691
                                                                                                                                  +
                                                                                                                                  3692 vector<string> pkt_strs;
                                                                                                                                  +
                                                                                                                                  3693 pkt_strs.reserve(num_flying_pkts);
                                                                                                                                  +
                                                                                                                                  3694 for (Peer_socket::Sent_pkt_ordered_by_seq_const_iter pkt_it_it = snd_flying_pkts_by_seq.begin();
                                                                                                                                  +
                                                                                                                                  3695 pkt_it_it != snd_flying_pkts_by_seq.end();
                                                                                                                                  +
                                                                                                                                  3696 ++pkt_it_it)
                                                                                                                                  +
                                                                                                                                  3697 {
                                                                                                                                  +
                                                                                                                                  3698 Sequence_number start, end;
                                                                                                                                  +
                                                                                                                                  3699 get_seq_num_range(pkt_it_it->second, &start, &end);
                                                                                                                                  +
                                                                                                                                  3700
                                                                                                                                  +
                                                                                                                                  3701 Peer_socket::Sent_packet::Const_ptr sent_pkt = pkt_it_it->second->second;
                                                                                                                                  +
                                                                                                                                  3702
                                                                                                                                  +
                                                                                                                                  3703 String_ostream pkt_str_os;
                                                                                                                                  +
                                                                                                                                  3704 pkt_str_os.os() << '[' << start;
                                                                                                                                  +
                                                                                                                                  3705 if (rexmit_on)
                                                                                                                                  +
                                                                                                                                  3706 {
                                                                                                                                  +
                                                                                                                                  3707 pkt_str_os.os() << '[' << int(sent_pkt->m_packet->m_rexmit_id) << '/' << sent_pkt->m_sent_when.back().m_order_num
                                                                                                                                  +
                                                                                                                                  3708 << "], ";
                                                                                                                                  +
                                                                                                                                  3709 }
                                                                                                                                  +
                                                                                                                                  3710 else
                                                                                                                                  +
                                                                                                                                  3711 {
                                                                                                                                  +
                                                                                                                                  3712 pkt_str_os.os() << ", ";
                                                                                                                                  +
                                                                                                                                  3713 }
                                                                                                                                  +
                                                                                                                                  3714 pkt_str_os.os() << end << ")<" << sent_pkt->m_acks_after_me << "acks" << flush;
                                                                                                                                  +
                                                                                                                                  3715
                                                                                                                                  +
                                                                                                                                  3716 pkt_strs.push_back(pkt_str_os.str());
                                                                                                                                  +
                                                                                                                                  3717 }
                                                                                                                                  +
                                                                                                                                  3718
                                                                                                                                  + +
                                                                                                                                  3720 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  +
                                                                                                                                  3721 "Send window state for [" << sock << "]: cong_wnd "
                                                                                                                                  +
                                                                                                                                  3722 "[" << sock->bytes_blocks_str(sock->m_snd_cong_ctl->congestion_window_bytes()) << "]; "
                                                                                                                                  +
                                                                                                                                  3723 "sent+acked/dropped [" << sock->m_snd_init_seq_num << ", " << snd_flying_pkts_by_seq.begin()->first << ") "
                                                                                                                                  +
                                                                                                                                  3724 "in-flight "
                                                                                                                                  +
                                                                                                                                  3725 "[" << sock->m_snd_flying_bytes << "] bytes: " << num_flying_pkts << ":{" << join(pkt_strs, " ") <<
                                                                                                                                  +
                                                                                                                                  3726 "} unsent [" << sock->m_snd_next_seq_num << ", ...).");
                                                                                                                                  3727
                                                                                                                                  -
                                                                                                                                  3728 // Since retransmission is on, also useful to show the packets sorted by when they were sent.
                                                                                                                                  -
                                                                                                                                  3729
                                                                                                                                  -
                                                                                                                                  3730 vector<string> pkt_strs_time;
                                                                                                                                  -
                                                                                                                                  3731 pkt_strs_time.reserve(num_flying_pkts);
                                                                                                                                  -
                                                                                                                                  3732 // Note I don't use `auto` only for clarity (to express it is a reverse iterator, hence why didn't use for(:)).
                                                                                                                                  -
                                                                                                                                  3733 for (Peer_socket::Sent_pkt_by_sent_when_map::Const_reverse_iterator pkt_it = snd_flying_pkts_by_when.const_oldest();
                                                                                                                                  -
                                                                                                                                  3734 pkt_it != snd_flying_pkts_by_when.const_past_newest();
                                                                                                                                  -
                                                                                                                                  3735 ++pkt_it)
                                                                                                                                  -
                                                                                                                                  3736 {
                                                                                                                                  -
                                                                                                                                  3737 Sequence_number start, end;
                                                                                                                                  -
                                                                                                                                  3738 // The forward iterator F pointing to same list element as reverse iterator R is prior(R.base()) [sic]. Google it.
                                                                                                                                  -
                                                                                                                                  3739 get_seq_num_range(prior(pkt_it.base()), &start, &end);
                                                                                                                                  -
                                                                                                                                  3740
                                                                                                                                  -
                                                                                                                                  3741 Peer_socket::Sent_packet::Const_ptr sent_pkt = pkt_it->second;
                                                                                                                                  -
                                                                                                                                  3742
                                                                                                                                  -
                                                                                                                                  3743 string pkt_str;
                                                                                                                                  - -
                                                                                                                                  3745 start, '[', int(sent_pkt->m_packet->m_rexmit_id), '/',
                                                                                                                                  -
                                                                                                                                  3746 sent_pkt->m_sent_when.back().m_order_num, "], ", end, ")<",
                                                                                                                                  -
                                                                                                                                  3747 sent_pkt->m_acks_after_me, "acks");
                                                                                                                                  -
                                                                                                                                  3748 pkt_strs_time.push_back(pkt_str);
                                                                                                                                  -
                                                                                                                                  3749 }
                                                                                                                                  -
                                                                                                                                  3750
                                                                                                                                  -
                                                                                                                                  3751 // Log it only if it is different (only possible if some retransmitted packets are actually involved).
                                                                                                                                  -
                                                                                                                                  3752 if (pkt_strs_time != pkt_strs)
                                                                                                                                  -
                                                                                                                                  3753 {
                                                                                                                                  - -
                                                                                                                                  3755 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  -
                                                                                                                                  3756 "Sorted by time sent: {" << join(pkt_strs_time, " ") << "}.");
                                                                                                                                  -
                                                                                                                                  3757 }
                                                                                                                                  -
                                                                                                                                  3758} // Node::log_snd_window()
                                                                                                                                  -
                                                                                                                                  3759
                                                                                                                                  - -
                                                                                                                                  3761{
                                                                                                                                  -
                                                                                                                                  3762 using boost::prior;
                                                                                                                                  -
                                                                                                                                  3763
                                                                                                                                  -
                                                                                                                                  3764 const Peer_socket::Sent_pkt_by_seq_num_map& flying_packets = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  -
                                                                                                                                  3765 if (flying_packets.empty())
                                                                                                                                  -
                                                                                                                                  3766 {
                                                                                                                                  -
                                                                                                                                  3767 return Sequence_number(); // Default value. Less than all others.
                                                                                                                                  -
                                                                                                                                  3768 }
                                                                                                                                  -
                                                                                                                                  3769 // else
                                                                                                                                  -
                                                                                                                                  3770
                                                                                                                                  -
                                                                                                                                  3771 // Get the sequence number of the first datum in the last unhandled packet.
                                                                                                                                  -
                                                                                                                                  3772 const Peer_socket::Sent_pkt_by_seq_num_map::value_type& highest_val = *(prior(flying_packets.end()));
                                                                                                                                  -
                                                                                                                                  3773 Sequence_number seq_num = highest_val.first;
                                                                                                                                  -
                                                                                                                                  3774
                                                                                                                                  -
                                                                                                                                  3775 // Advance just past the data in that packet to get what we want.
                                                                                                                                  -
                                                                                                                                  3776 advance_seq_num(&seq_num, highest_val.second->second->m_size);
                                                                                                                                  -
                                                                                                                                  3777
                                                                                                                                  -
                                                                                                                                  3778 return seq_num;
                                                                                                                                  -
                                                                                                                                  3779}
                                                                                                                                  +
                                                                                                                                  3728 if (!rexmit_on)
                                                                                                                                  +
                                                                                                                                  3729 {
                                                                                                                                  +
                                                                                                                                  3730 return;
                                                                                                                                  +
                                                                                                                                  3731 }
                                                                                                                                  +
                                                                                                                                  3732 // else
                                                                                                                                  +
                                                                                                                                  3733
                                                                                                                                  +
                                                                                                                                  3734 // Since retransmission is on, also useful to show the packets sorted by when they were sent.
                                                                                                                                  +
                                                                                                                                  3735
                                                                                                                                  +
                                                                                                                                  3736 vector<string> pkt_strs_time;
                                                                                                                                  +
                                                                                                                                  3737 pkt_strs_time.reserve(num_flying_pkts);
                                                                                                                                  +
                                                                                                                                  3738 // Note I don't use `auto` only for clarity (to express it is a reverse iterator, hence why didn't use for(:)).
                                                                                                                                  +
                                                                                                                                  3739 for (Peer_socket::Sent_pkt_by_sent_when_map::Const_reverse_iterator pkt_it = snd_flying_pkts_by_when.const_oldest();
                                                                                                                                  +
                                                                                                                                  3740 pkt_it != snd_flying_pkts_by_when.const_past_newest();
                                                                                                                                  +
                                                                                                                                  3741 ++pkt_it)
                                                                                                                                  +
                                                                                                                                  3742 {
                                                                                                                                  +
                                                                                                                                  3743 Sequence_number start, end;
                                                                                                                                  +
                                                                                                                                  3744 // The forward iterator F pointing to same list element as reverse iterator R is prior(R.base()) [sic]. Google it.
                                                                                                                                  +
                                                                                                                                  3745 get_seq_num_range(prior(pkt_it.base()), &start, &end);
                                                                                                                                  +
                                                                                                                                  3746
                                                                                                                                  +
                                                                                                                                  3747 Peer_socket::Sent_packet::Const_ptr sent_pkt = pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3748
                                                                                                                                  +
                                                                                                                                  3749 string pkt_str;
                                                                                                                                  + +
                                                                                                                                  3751 start, '[', int(sent_pkt->m_packet->m_rexmit_id), '/',
                                                                                                                                  +
                                                                                                                                  3752 sent_pkt->m_sent_when.back().m_order_num, "], ", end, ")<",
                                                                                                                                  +
                                                                                                                                  3753 sent_pkt->m_acks_after_me, "acks");
                                                                                                                                  +
                                                                                                                                  3754 pkt_strs_time.push_back(pkt_str);
                                                                                                                                  +
                                                                                                                                  3755 }
                                                                                                                                  +
                                                                                                                                  3756
                                                                                                                                  +
                                                                                                                                  3757 // Log it only if it is different (only possible if some retransmitted packets are actually involved).
                                                                                                                                  +
                                                                                                                                  3758 if (pkt_strs_time != pkt_strs)
                                                                                                                                  +
                                                                                                                                  3759 {
                                                                                                                                  + +
                                                                                                                                  3761 (force_verbose_info_logging ? log::Sev::S_INFO : log::Sev::S_DATA,
                                                                                                                                  +
                                                                                                                                  3762 "Sorted by time sent: {" << join(pkt_strs_time, " ") << "}.");
                                                                                                                                  +
                                                                                                                                  3763 }
                                                                                                                                  +
                                                                                                                                  3764} // Node::log_snd_window()
                                                                                                                                  +
                                                                                                                                  3765
                                                                                                                                  + +
                                                                                                                                  3767{
                                                                                                                                  +
                                                                                                                                  3768 using boost::prior;
                                                                                                                                  +
                                                                                                                                  3769
                                                                                                                                  +
                                                                                                                                  3770 const Peer_socket::Sent_pkt_by_seq_num_map& flying_packets = sock->m_snd_flying_pkts_by_seq_num;
                                                                                                                                  +
                                                                                                                                  3771 if (flying_packets.empty())
                                                                                                                                  +
                                                                                                                                  3772 {
                                                                                                                                  +
                                                                                                                                  3773 return Sequence_number(); // Default value. Less than all others.
                                                                                                                                  +
                                                                                                                                  3774 }
                                                                                                                                  +
                                                                                                                                  3775 // else
                                                                                                                                  +
                                                                                                                                  3776
                                                                                                                                  +
                                                                                                                                  3777 // Get the sequence number of the first datum in the last unhandled packet.
                                                                                                                                  +
                                                                                                                                  3778 const Peer_socket::Sent_pkt_by_seq_num_map::value_type& highest_val = *(prior(flying_packets.end()));
                                                                                                                                  +
                                                                                                                                  3779 Sequence_number seq_num = highest_val.first;
                                                                                                                                  3780
                                                                                                                                  - -
                                                                                                                                  3782{
                                                                                                                                  -
                                                                                                                                  3783 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  -
                                                                                                                                  3784
                                                                                                                                  -
                                                                                                                                  3785 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  3786 if (logger_ptr && logger_ptr->should_log(log::Sev::S_TRACE, get_log_component()))
                                                                                                                                  -
                                                                                                                                  3787 {
                                                                                                                                  -
                                                                                                                                  3788 const Peer_socket::Sent_packet& sent_pkt = *pkt_it->second;
                                                                                                                                  -
                                                                                                                                  3789 const Peer_socket::order_num_t order_num = sent_pkt.m_sent_when.back().m_order_num;
                                                                                                                                  -
                                                                                                                                  3790 Sequence_number seq_num, seq_num_end;
                                                                                                                                  -
                                                                                                                                  3791 get_seq_num_range(pkt_it, &seq_num, &seq_num_end);
                                                                                                                                  -
                                                                                                                                  3792
                                                                                                                                  -
                                                                                                                                  3793 if (sock->rexmit_on())
                                                                                                                                  -
                                                                                                                                  3794 {
                                                                                                                                  - -
                                                                                                                                  3796 ("On [" << sock << "] erasing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  3797 "order_num [" << order_num << "] rexmit_id [" << int(sent_pkt.m_packet->m_rexmit_id) << "] from "
                                                                                                                                  -
                                                                                                                                  3798 "snd_flying_pkts* and friends.");
                                                                                                                                  -
                                                                                                                                  3799 }
                                                                                                                                  -
                                                                                                                                  3800 else
                                                                                                                                  -
                                                                                                                                  3801 {
                                                                                                                                  - -
                                                                                                                                  3803 ("On [" << sock << "] erasing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  3804 "order_num [" << order_num << "] from snd_flying_pkts* and friends.");
                                                                                                                                  +
                                                                                                                                  3781 // Advance just past the data in that packet to get what we want.
                                                                                                                                  +
                                                                                                                                  3782 advance_seq_num(&seq_num, highest_val.second->second->m_size);
                                                                                                                                  +
                                                                                                                                  3783
                                                                                                                                  +
                                                                                                                                  3784 return seq_num;
                                                                                                                                  +
                                                                                                                                  3785}
                                                                                                                                  +
                                                                                                                                  3786
                                                                                                                                  + +
                                                                                                                                  3788{
                                                                                                                                  +
                                                                                                                                  3789 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  +
                                                                                                                                  3790
                                                                                                                                  +
                                                                                                                                  3791 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  3792 if (logger_ptr && logger_ptr->should_log(log::Sev::S_TRACE, get_log_component()))
                                                                                                                                  +
                                                                                                                                  3793 {
                                                                                                                                  +
                                                                                                                                  3794 const Peer_socket::Sent_packet& sent_pkt = *pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3795 const Peer_socket::order_num_t order_num = sent_pkt.m_sent_when.back().m_order_num;
                                                                                                                                  +
                                                                                                                                  3796 Sequence_number seq_num, seq_num_end;
                                                                                                                                  +
                                                                                                                                  3797 get_seq_num_range(pkt_it, &seq_num, &seq_num_end);
                                                                                                                                  +
                                                                                                                                  3798
                                                                                                                                  +
                                                                                                                                  3799 if (sock->rexmit_on())
                                                                                                                                  +
                                                                                                                                  3800 {
                                                                                                                                  + +
                                                                                                                                  3802 ("On [" << sock << "] erasing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  3803 "order_num [" << order_num << "] rexmit_id [" << int(sent_pkt.m_packet->m_rexmit_id) << "] from "
                                                                                                                                  +
                                                                                                                                  3804 "snd_flying_pkts* and friends.");
                                                                                                                                  3805 }
                                                                                                                                  -
                                                                                                                                  3806 }
                                                                                                                                  -
                                                                                                                                  3807
                                                                                                                                  -
                                                                                                                                  3808 // Update byte count.
                                                                                                                                  -
                                                                                                                                  3809 snd_flying_pkts_updated(sock, pkt_it, boost::next(pkt_it), false);
                                                                                                                                  -
                                                                                                                                  3810
                                                                                                                                  -
                                                                                                                                  3811 // Finally erase from main structures.
                                                                                                                                  -
                                                                                                                                  3812 sock->m_snd_flying_pkts_by_seq_num.erase(pkt_it->first);
                                                                                                                                  -
                                                                                                                                  3813 sock->m_snd_flying_pkts_by_sent_when.erase(pkt_it);
                                                                                                                                  -
                                                                                                                                  3814
                                                                                                                                  -
                                                                                                                                  3815 // Note: As advertsied, we do NOT inform sock->m_snd_drop_timer. It is up to the caller to do the right thing there.
                                                                                                                                  -
                                                                                                                                  3816}
                                                                                                                                  -
                                                                                                                                  3817
                                                                                                                                  - -
                                                                                                                                  3819 const Sequence_number& seq_num,
                                                                                                                                  - -
                                                                                                                                  3821{
                                                                                                                                  -
                                                                                                                                  3822 using std::pair;
                                                                                                                                  -
                                                                                                                                  3823 using std::make_pair;
                                                                                                                                  -
                                                                                                                                  3824 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  -
                                                                                                                                  3825
                                                                                                                                  -
                                                                                                                                  3826 // For brevity and a bit of speed:
                                                                                                                                  -
                                                                                                                                  3827 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  3828
                                                                                                                                  -
                                                                                                                                  3829#ifndef NDEBUG
                                                                                                                                  -
                                                                                                                                  3830 const auto insert_result =
                                                                                                                                  -
                                                                                                                                  3831#endif
                                                                                                                                  -
                                                                                                                                  3832 snd_flying_pkts_by_when.insert(make_pair(seq_num, sent_pkt));
                                                                                                                                  -
                                                                                                                                  3833
                                                                                                                                  -
                                                                                                                                  3834 // In this map, last added (a/k/a last sent) packet = first in the ordering!
                                                                                                                                  -
                                                                                                                                  3835 const Peer_socket::Sent_pkt_ordered_by_when_iter& pkt_it = snd_flying_pkts_by_when.begin();
                                                                                                                                  -
                                                                                                                                  3836 assert(insert_result.second); // Sequence numbers must not repeat ever.
                                                                                                                                  -
                                                                                                                                  3837 assert(insert_result.first == pkt_it); // Check that just-inserted element is ordered at the start.
                                                                                                                                  -
                                                                                                                                  3838
                                                                                                                                  -
                                                                                                                                  3839 snd_flying_pkts_updated(sock, pkt_it, boost::next(pkt_it), true); // Update byte count.
                                                                                                                                  -
                                                                                                                                  3840
                                                                                                                                  -
                                                                                                                                  3841 // Accordingly, insert packet (in the form of iterator into the above map) into sequence-number-ordered "scoreboard."
                                                                                                                                  -
                                                                                                                                  3842#ifndef NDEBUG
                                                                                                                                  -
                                                                                                                                  3843 const auto insert_result_by_seq =
                                                                                                                                  -
                                                                                                                                  3844#endif
                                                                                                                                  -
                                                                                                                                  3845 sock->m_snd_flying_pkts_by_seq_num.insert(make_pair(seq_num, pkt_it));
                                                                                                                                  +
                                                                                                                                  3806 else
                                                                                                                                  +
                                                                                                                                  3807 {
                                                                                                                                  + +
                                                                                                                                  3809 ("On [" << sock << "] erasing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  3810 "order_num [" << order_num << "] from snd_flying_pkts* and friends.");
                                                                                                                                  +
                                                                                                                                  3811 }
                                                                                                                                  +
                                                                                                                                  3812 }
                                                                                                                                  +
                                                                                                                                  3813
                                                                                                                                  +
                                                                                                                                  3814 // Update byte count.
                                                                                                                                  +
                                                                                                                                  3815 snd_flying_pkts_updated(sock, pkt_it, boost::next(pkt_it), false);
                                                                                                                                  +
                                                                                                                                  3816
                                                                                                                                  +
                                                                                                                                  3817 // Finally erase from main structures.
                                                                                                                                  +
                                                                                                                                  3818 sock->m_snd_flying_pkts_by_seq_num.erase(pkt_it->first);
                                                                                                                                  +
                                                                                                                                  3819 sock->m_snd_flying_pkts_by_sent_when.erase(pkt_it);
                                                                                                                                  +
                                                                                                                                  3820
                                                                                                                                  +
                                                                                                                                  3821 // Note: As advertsied, we do NOT inform sock->m_snd_drop_timer. It is up to the caller to do the right thing there.
                                                                                                                                  +
                                                                                                                                  3822}
                                                                                                                                  +
                                                                                                                                  3823
                                                                                                                                  + +
                                                                                                                                  3825 const Sequence_number& seq_num,
                                                                                                                                  + +
                                                                                                                                  3827{
                                                                                                                                  +
                                                                                                                                  3828 using std::pair;
                                                                                                                                  +
                                                                                                                                  3829 using std::make_pair;
                                                                                                                                  +
                                                                                                                                  3830 // using boost::next; // Still ambiguous for some reason (in clang at least).
                                                                                                                                  +
                                                                                                                                  3831
                                                                                                                                  +
                                                                                                                                  3832 // For brevity and a bit of speed:
                                                                                                                                  +
                                                                                                                                  3833 auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  3834
                                                                                                                                  +
                                                                                                                                  3835#ifndef NDEBUG
                                                                                                                                  +
                                                                                                                                  3836 const auto insert_result =
                                                                                                                                  +
                                                                                                                                  3837#endif
                                                                                                                                  +
                                                                                                                                  3838 snd_flying_pkts_by_when.insert(make_pair(seq_num, sent_pkt));
                                                                                                                                  +
                                                                                                                                  3839
                                                                                                                                  +
                                                                                                                                  3840 // In this map, last added (a/k/a last sent) packet = first in the ordering!
                                                                                                                                  +
                                                                                                                                  3841 const Peer_socket::Sent_pkt_ordered_by_when_iter& pkt_it = snd_flying_pkts_by_when.begin();
                                                                                                                                  +
                                                                                                                                  3842 assert(insert_result.second); // Sequence numbers must not repeat ever.
                                                                                                                                  +
                                                                                                                                  3843 assert(insert_result.first == pkt_it); // Check that just-inserted element is ordered at the start.
                                                                                                                                  +
                                                                                                                                  3844
                                                                                                                                  +
                                                                                                                                  3845 snd_flying_pkts_updated(sock, pkt_it, boost::next(pkt_it), true); // Update byte count.
                                                                                                                                  3846
                                                                                                                                  -
                                                                                                                                  3847 // Check invariant: Key X is in ..._by_sent_when <=> key X is in ..._by_seq_num.
                                                                                                                                  -
                                                                                                                                  3848 assert(insert_result_by_seq.second);
                                                                                                                                  -
                                                                                                                                  3849
                                                                                                                                  -
                                                                                                                                  3850 /* Caution: As noted in the doc header for this method, note that while we've already inserted sent_pkt into
                                                                                                                                  -
                                                                                                                                  3851 * snd_flying_pkts_by_when, the actual value of sent_pkt->m_sent_when.back() -- the absolute "when" -- isn't ready.
                                                                                                                                  -
                                                                                                                                  3852 * It will only be finalized once we actually send off the packet (after pacing, if any), in mark_data_packet_sent().
                                                                                                                                  -
                                                                                                                                  3853 * Nevertheless, we know the packet will be sent sometime fairly soon; and in fact AFTER all the packets
                                                                                                                                  -
                                                                                                                                  3854 * following it it in snd_flying_pkts_by_when's iterator ordering and in fact BEFORE any packets that
                                                                                                                                  -
                                                                                                                                  3855 * would be subsequently ahead of it in snd_flying_pkts_by_when's iterator ordering. That is, we can
                                                                                                                                  -
                                                                                                                                  3856 * place it there now, despite not knowing the _absolute_ time when it be sent, because we are confident about
                                                                                                                                  -
                                                                                                                                  3857 * its _relative_ order of when it will be sent vs. all the other packets in that structure, past or future. */
                                                                                                                                  -
                                                                                                                                  3858
                                                                                                                                  -
                                                                                                                                  3859 // Everything following this point is logging only.
                                                                                                                                  -
                                                                                                                                  3860
                                                                                                                                  -
                                                                                                                                  3861 auto const logger_ptr = get_logger();
                                                                                                                                  -
                                                                                                                                  3862 if ((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_TRACE, get_log_component())))
                                                                                                                                  -
                                                                                                                                  3863 {
                                                                                                                                  -
                                                                                                                                  3864 return;
                                                                                                                                  -
                                                                                                                                  3865 }
                                                                                                                                  -
                                                                                                                                  3866 // else
                                                                                                                                  -
                                                                                                                                  3867
                                                                                                                                  -
                                                                                                                                  3868 Sequence_number seq_num_end;
                                                                                                                                  -
                                                                                                                                  3869 get_seq_num_range(pkt_it, 0, &seq_num_end);
                                                                                                                                  -
                                                                                                                                  3870 if (sock->rexmit_on())
                                                                                                                                  -
                                                                                                                                  3871 {
                                                                                                                                  - -
                                                                                                                                  3873 ("On [" << sock << "] pushing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  3874 "rexmit_id [" << int(sent_pkt->m_packet->m_rexmit_id) << "] onto snd_flying_pkts and friends.");
                                                                                                                                  -
                                                                                                                                  3875 }
                                                                                                                                  -
                                                                                                                                  3876 else
                                                                                                                                  +
                                                                                                                                  3847 // Accordingly, insert packet (in the form of iterator into the above map) into sequence-number-ordered "scoreboard."
                                                                                                                                  +
                                                                                                                                  3848#ifndef NDEBUG
                                                                                                                                  +
                                                                                                                                  3849 const auto insert_result_by_seq =
                                                                                                                                  +
                                                                                                                                  3850#endif
                                                                                                                                  +
                                                                                                                                  3851 sock->m_snd_flying_pkts_by_seq_num.insert(make_pair(seq_num, pkt_it));
                                                                                                                                  +
                                                                                                                                  3852
                                                                                                                                  +
                                                                                                                                  3853 // Check invariant: Key X is in ..._by_sent_when <=> key X is in ..._by_seq_num.
                                                                                                                                  +
                                                                                                                                  3854 assert(insert_result_by_seq.second);
                                                                                                                                  +
                                                                                                                                  3855
                                                                                                                                  +
                                                                                                                                  3856 /* Caution: As noted in the doc header for this method, note that while we've already inserted sent_pkt into
                                                                                                                                  +
                                                                                                                                  3857 * snd_flying_pkts_by_when, the actual value of sent_pkt->m_sent_when.back() -- the absolute "when" -- isn't ready.
                                                                                                                                  +
                                                                                                                                  3858 * It will only be finalized once we actually send off the packet (after pacing, if any), in mark_data_packet_sent().
                                                                                                                                  +
                                                                                                                                  3859 * Nevertheless, we know the packet will be sent sometime fairly soon; and in fact AFTER all the packets
                                                                                                                                  +
                                                                                                                                  3860 * following it it in snd_flying_pkts_by_when's iterator ordering and in fact BEFORE any packets that
                                                                                                                                  +
                                                                                                                                  3861 * would be subsequently ahead of it in snd_flying_pkts_by_when's iterator ordering. That is, we can
                                                                                                                                  +
                                                                                                                                  3862 * place it there now, despite not knowing the _absolute_ time when it be sent, because we are confident about
                                                                                                                                  +
                                                                                                                                  3863 * its _relative_ order of when it will be sent vs. all the other packets in that structure, past or future. */
                                                                                                                                  +
                                                                                                                                  3864
                                                                                                                                  +
                                                                                                                                  3865 // Everything following this point is logging only.
                                                                                                                                  +
                                                                                                                                  3866
                                                                                                                                  +
                                                                                                                                  3867 auto const logger_ptr = get_logger();
                                                                                                                                  +
                                                                                                                                  3868 if ((!logger_ptr) || (!logger_ptr->should_log(log::Sev::S_TRACE, get_log_component())))
                                                                                                                                  +
                                                                                                                                  3869 {
                                                                                                                                  +
                                                                                                                                  3870 return;
                                                                                                                                  +
                                                                                                                                  3871 }
                                                                                                                                  +
                                                                                                                                  3872 // else
                                                                                                                                  +
                                                                                                                                  3873
                                                                                                                                  +
                                                                                                                                  3874 Sequence_number seq_num_end;
                                                                                                                                  +
                                                                                                                                  3875 get_seq_num_range(pkt_it, 0, &seq_num_end);
                                                                                                                                  +
                                                                                                                                  3876 if (sock->rexmit_on())
                                                                                                                                  3877 {
                                                                                                                                  3879 ("On [" << sock << "] pushing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  -
                                                                                                                                  3880 "onto snd_flying_pkts and friends.");
                                                                                                                                  +
                                                                                                                                  3880 "rexmit_id [" << int(sent_pkt->m_packet->m_rexmit_id) << "] onto snd_flying_pkts and friends.");
                                                                                                                                  3881 }
                                                                                                                                  -
                                                                                                                                  3882}
                                                                                                                                  -
                                                                                                                                  3883
                                                                                                                                  - - - -
                                                                                                                                  3887 bool added)
                                                                                                                                  -
                                                                                                                                  3888{
                                                                                                                                  -
                                                                                                                                  3889 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  3890
                                                                                                                                  -
                                                                                                                                  3891 if (pkt_begin == pkt_end)
                                                                                                                                  -
                                                                                                                                  3892 {
                                                                                                                                  -
                                                                                                                                  3893 return; // Wouldn't do anything anyway, but return here to avoid logging.
                                                                                                                                  -
                                                                                                                                  3894 }
                                                                                                                                  -
                                                                                                                                  3895
                                                                                                                                  -
                                                                                                                                  3896 // For brevity and a bit of speed:
                                                                                                                                  -
                                                                                                                                  3897 const auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  -
                                                                                                                                  3898 size_t& snd_flying_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  -
                                                                                                                                  3899
                                                                                                                                  -
                                                                                                                                  3900 // Optimization for when they effectively clear() snd_flying_pkts* (e.g., possibly on Drop Timeout):
                                                                                                                                  -
                                                                                                                                  3901 if ((!added)
                                                                                                                                  -
                                                                                                                                  3902 && (pkt_begin == snd_flying_pkts_by_when.const_newest())
                                                                                                                                  -
                                                                                                                                  3903 && (pkt_end == snd_flying_pkts_by_when.const_past_oldest()))
                                                                                                                                  -
                                                                                                                                  3904 {
                                                                                                                                  -
                                                                                                                                  3905 snd_flying_bytes = 0;
                                                                                                                                  -
                                                                                                                                  3906 }
                                                                                                                                  -
                                                                                                                                  3907 else
                                                                                                                                  -
                                                                                                                                  3908 {
                                                                                                                                  -
                                                                                                                                  3909 size_t delta_bytes = 0;
                                                                                                                                  -
                                                                                                                                  3910 for ( ; pkt_begin != pkt_end; ++pkt_begin)
                                                                                                                                  -
                                                                                                                                  3911 {
                                                                                                                                  -
                                                                                                                                  3912 delta_bytes += pkt_begin->second->m_size;
                                                                                                                                  -
                                                                                                                                  3913 }
                                                                                                                                  -
                                                                                                                                  3914 added ? (snd_flying_bytes += delta_bytes) : (snd_flying_bytes -= delta_bytes);
                                                                                                                                  -
                                                                                                                                  3915 }
                                                                                                                                  -
                                                                                                                                  3916
                                                                                                                                  -
                                                                                                                                  3917 FLOW_LOG_TRACE("cong_ctl [" << sock << "] update: "
                                                                                                                                  -
                                                                                                                                  3918 "In-flight [" << sock->bytes_blocks_str(snd_flying_bytes) << "].");
                                                                                                                                  -
                                                                                                                                  3919}
                                                                                                                                  -
                                                                                                                                  3920
                                                                                                                                  - - -
                                                                                                                                  3923 bool defer_delta_check)
                                                                                                                                  -
                                                                                                                                  3924{
                                                                                                                                  -
                                                                                                                                  3925 const Peer_socket::Sent_packet& pkt = *pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3882 else
                                                                                                                                  +
                                                                                                                                  3883 {
                                                                                                                                  + +
                                                                                                                                  3885 ("On [" << sock << "] pushing packet [" << seq_num << ", " << seq_num_end << ") "
                                                                                                                                  +
                                                                                                                                  3886 "onto snd_flying_pkts and friends.");
                                                                                                                                  +
                                                                                                                                  3887 }
                                                                                                                                  +
                                                                                                                                  3888}
                                                                                                                                  +
                                                                                                                                  3889
                                                                                                                                  + + + +
                                                                                                                                  3893 bool added)
                                                                                                                                  +
                                                                                                                                  3894{
                                                                                                                                  +
                                                                                                                                  3895 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  3896
                                                                                                                                  +
                                                                                                                                  3897 if (pkt_begin == pkt_end)
                                                                                                                                  +
                                                                                                                                  3898 {
                                                                                                                                  +
                                                                                                                                  3899 return; // Wouldn't do anything anyway, but return here to avoid logging.
                                                                                                                                  +
                                                                                                                                  3900 }
                                                                                                                                  +
                                                                                                                                  3901
                                                                                                                                  +
                                                                                                                                  3902 // For brevity and a bit of speed:
                                                                                                                                  +
                                                                                                                                  3903 const auto& snd_flying_pkts_by_when = sock->m_snd_flying_pkts_by_sent_when;
                                                                                                                                  +
                                                                                                                                  3904 size_t& snd_flying_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  +
                                                                                                                                  3905
                                                                                                                                  +
                                                                                                                                  3906 // Optimization for when they effectively clear() snd_flying_pkts* (e.g., possibly on Drop Timeout):
                                                                                                                                  +
                                                                                                                                  3907 if ((!added)
                                                                                                                                  +
                                                                                                                                  3908 && (pkt_begin == snd_flying_pkts_by_when.const_newest())
                                                                                                                                  +
                                                                                                                                  3909 && (pkt_end == snd_flying_pkts_by_when.const_past_oldest()))
                                                                                                                                  +
                                                                                                                                  3910 {
                                                                                                                                  +
                                                                                                                                  3911 snd_flying_bytes = 0;
                                                                                                                                  +
                                                                                                                                  3912 }
                                                                                                                                  +
                                                                                                                                  3913 else
                                                                                                                                  +
                                                                                                                                  3914 {
                                                                                                                                  +
                                                                                                                                  3915 size_t delta_bytes = 0;
                                                                                                                                  +
                                                                                                                                  3916 for ( ; pkt_begin != pkt_end; ++pkt_begin)
                                                                                                                                  +
                                                                                                                                  3917 {
                                                                                                                                  +
                                                                                                                                  3918 delta_bytes += pkt_begin->second->m_size;
                                                                                                                                  +
                                                                                                                                  3919 }
                                                                                                                                  +
                                                                                                                                  3920 added ? (snd_flying_bytes += delta_bytes) : (snd_flying_bytes -= delta_bytes);
                                                                                                                                  +
                                                                                                                                  3921 }
                                                                                                                                  +
                                                                                                                                  3922
                                                                                                                                  +
                                                                                                                                  3923 FLOW_LOG_TRACE("cong_ctl [" << sock << "] update: "
                                                                                                                                  +
                                                                                                                                  3924 "In-flight [" << sock->bytes_blocks_str(snd_flying_bytes) << "].");
                                                                                                                                  +
                                                                                                                                  3925}
                                                                                                                                  3926
                                                                                                                                  -
                                                                                                                                  3927 Sequence_number seq_num, seq_num_end;
                                                                                                                                  -
                                                                                                                                  3928 get_seq_num_range(pkt_it, &seq_num, &seq_num_end);
                                                                                                                                  -
                                                                                                                                  3929
                                                                                                                                  -
                                                                                                                                  3930 const unsigned int rexmit_id = pkt.m_packet->m_rexmit_id;
                                                                                                                                  -
                                                                                                                                  3931 FLOW_LOG_TRACE("On [" << sock << "] attempting to queue for retransmission "
                                                                                                                                  -
                                                                                                                                  3932 "[" << seq_num << ", " << seq_num_end << "] which has been "
                                                                                                                                  -
                                                                                                                                  3933 "retransmitted [" << rexmit_id << "] times so far.");
                                                                                                                                  -
                                                                                                                                  3934 if (rexmit_id == sock->opt(sock->m_opts.m_st_max_rexmissions_per_packet))
                                                                                                                                  -
                                                                                                                                  3935 {
                                                                                                                                  -
                                                                                                                                  3936 rst_and_close_connection_immediately(socket_id(sock), sock,
                                                                                                                                  - -
                                                                                                                                  3938 return false;
                                                                                                                                  -
                                                                                                                                  3939 }
                                                                                                                                  -
                                                                                                                                  3940 // else
                                                                                                                                  -
                                                                                                                                  3941 return true;
                                                                                                                                  -
                                                                                                                                  3942}
                                                                                                                                  -
                                                                                                                                  3943
                                                                                                                                  - -
                                                                                                                                  3945 const Peer_socket_options* opts)
                                                                                                                                  -
                                                                                                                                  3946{
                                                                                                                                  -
                                                                                                                                  3947 return connect_with_metadata(to, boost::asio::buffer(&S_DEFAULT_CONN_METADATA, sizeof(S_DEFAULT_CONN_METADATA)),
                                                                                                                                  -
                                                                                                                                  3948 err_code, opts);
                                                                                                                                  -
                                                                                                                                  3949}
                                                                                                                                  -
                                                                                                                                  3950
                                                                                                                                  - -
                                                                                                                                  3952 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  -
                                                                                                                                  3953 Error_code* err_code,
                                                                                                                                  -
                                                                                                                                  3954 const Peer_socket_options* sock_opts)
                                                                                                                                  -
                                                                                                                                  3955{
                                                                                                                                  -
                                                                                                                                  3956 namespace bind_ns = util::bind_ns;
                                                                                                                                  - -
                                                                                                                                  3958 bind_ns::cref(to), bind_ns::cref(serialized_metadata), _1, sock_opts);
                                                                                                                                  -
                                                                                                                                  3959 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  3960
                                                                                                                                  -
                                                                                                                                  3961 namespace bind_ns = util::bind_ns;
                                                                                                                                  - - -
                                                                                                                                  3964 using bind_ns::bind;
                                                                                                                                  -
                                                                                                                                  3965
                                                                                                                                  -
                                                                                                                                  3966 // We are in thread U != W.
                                                                                                                                  -
                                                                                                                                  3967
                                                                                                                                  -
                                                                                                                                  3968 if (!running())
                                                                                                                                  -
                                                                                                                                  3969 {
                                                                                                                                  - -
                                                                                                                                  3971 return Peer_socket::Ptr();
                                                                                                                                  -
                                                                                                                                  3972 }
                                                                                                                                  -
                                                                                                                                  3973 // else
                                                                                                                                  -
                                                                                                                                  3974
                                                                                                                                  -
                                                                                                                                  3975 // If it's good enough for DATA packets, it's good enough for metadata in SYN.
                                                                                                                                  -
                                                                                                                                  3976 if (serialized_metadata.size() > max_block_size())
                                                                                                                                  -
                                                                                                                                  3977 {
                                                                                                                                  - -
                                                                                                                                  3979 return Peer_socket::Ptr();
                                                                                                                                  -
                                                                                                                                  3980 }
                                                                                                                                  -
                                                                                                                                  3981
                                                                                                                                  -
                                                                                                                                  3982 /* Put the rest of the work into thread W. For justification, see big comment in listen().
                                                                                                                                  -
                                                                                                                                  3983 * Addendum regarding performance: connect() is probably called more frequently than listen(), but
                                                                                                                                  -
                                                                                                                                  3984 * I doubt the performance impact is serious even so. send() and receive() might be a different
                                                                                                                                  -
                                                                                                                                  3985 * story. */
                                                                                                                                  -
                                                                                                                                  3986
                                                                                                                                  -
                                                                                                                                  3987 Peer_socket::Ptr sock;
                                                                                                                                  -
                                                                                                                                  3988 /* Load this->connect_worker(...) onto thread W boost.asio work queue.
                                                                                                                                  -
                                                                                                                                  3989 * We don't return until it finishes; therefore it is fine to do total & capture. */
                                                                                                                                  -
                                                                                                                                  3990 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION,
                                                                                                                                  -
                                                                                                                                  3991 [&]() { connect_worker(to, serialized_metadata, sock_opts, &sock); });
                                                                                                                                  -
                                                                                                                                  3992 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  -
                                                                                                                                  3993
                                                                                                                                  -
                                                                                                                                  3994 // connect_worker() indicates success or failure through this data member.
                                                                                                                                  -
                                                                                                                                  3995 if (sock->m_disconnect_cause)
                                                                                                                                  -
                                                                                                                                  3996 {
                                                                                                                                  -
                                                                                                                                  3997 *err_code = sock->m_disconnect_cause;
                                                                                                                                  -
                                                                                                                                  3998 return Peer_socket::Ptr(); // sock will go out of scope and thus will be destroyed.
                                                                                                                                  -
                                                                                                                                  3999 }
                                                                                                                                  -
                                                                                                                                  4000 // else
                                                                                                                                  -
                                                                                                                                  4001 err_code->clear();
                                                                                                                                  -
                                                                                                                                  4002 return sock;
                                                                                                                                  -
                                                                                                                                  4003} // Node::connect_with_metadata()
                                                                                                                                  -
                                                                                                                                  4004
                                                                                                                                  -
                                                                                                                                  4005void Node::connect_worker(const Remote_endpoint& to, const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  -
                                                                                                                                  4006 const Peer_socket_options* sock_opts,
                                                                                                                                  -
                                                                                                                                  4007 Peer_socket::Ptr* sock_ptr)
                                                                                                                                  -
                                                                                                                                  4008{
                                                                                                                                  -
                                                                                                                                  4009 using boost::asio::buffer;
                                                                                                                                  -
                                                                                                                                  4010 using boost::asio::ip::address;
                                                                                                                                  -
                                                                                                                                  4011
                                                                                                                                  -
                                                                                                                                  4012 assert(sock_ptr);
                                                                                                                                  -
                                                                                                                                  4013
                                                                                                                                  -
                                                                                                                                  4014 // We are in thread W. connect() is waiting for us to set *sock_ptr and return.
                                                                                                                                  -
                                                                                                                                  4015
                                                                                                                                  -
                                                                                                                                  4016 // Create new socket and set all members that may be immediately accessed by user in thread U after we're done.
                                                                                                                                  + + +
                                                                                                                                  3929 bool defer_delta_check)
                                                                                                                                  +
                                                                                                                                  3930{
                                                                                                                                  +
                                                                                                                                  3931 const Peer_socket::Sent_packet& pkt = *pkt_it->second;
                                                                                                                                  +
                                                                                                                                  3932
                                                                                                                                  +
                                                                                                                                  3933 Sequence_number seq_num, seq_num_end;
                                                                                                                                  +
                                                                                                                                  3934 get_seq_num_range(pkt_it, &seq_num, &seq_num_end);
                                                                                                                                  +
                                                                                                                                  3935
                                                                                                                                  +
                                                                                                                                  3936 const unsigned int rexmit_id = pkt.m_packet->m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  3937 FLOW_LOG_TRACE("On [" << sock << "] attempting to queue for retransmission "
                                                                                                                                  +
                                                                                                                                  3938 "[" << seq_num << ", " << seq_num_end << "] which has been "
                                                                                                                                  +
                                                                                                                                  3939 "retransmitted [" << rexmit_id << "] times so far.");
                                                                                                                                  +
                                                                                                                                  3940 if (rexmit_id == sock->opt(sock->m_opts.m_st_max_rexmissions_per_packet))
                                                                                                                                  +
                                                                                                                                  3941 {
                                                                                                                                  +
                                                                                                                                  3942 rst_and_close_connection_immediately(socket_id(sock), sock,
                                                                                                                                  + +
                                                                                                                                  3944 return false;
                                                                                                                                  +
                                                                                                                                  3945 }
                                                                                                                                  +
                                                                                                                                  3946 // else
                                                                                                                                  +
                                                                                                                                  3947 return true;
                                                                                                                                  +
                                                                                                                                  3948}
                                                                                                                                  +
                                                                                                                                  3949
                                                                                                                                  + +
                                                                                                                                  3951 const Peer_socket_options* opts)
                                                                                                                                  +
                                                                                                                                  3952{
                                                                                                                                  +
                                                                                                                                  3953 return connect_with_metadata(to, boost::asio::buffer(&S_DEFAULT_CONN_METADATA, sizeof(S_DEFAULT_CONN_METADATA)),
                                                                                                                                  +
                                                                                                                                  3954 err_code, opts);
                                                                                                                                  +
                                                                                                                                  3955}
                                                                                                                                  +
                                                                                                                                  3956
                                                                                                                                  + +
                                                                                                                                  3958 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  +
                                                                                                                                  3959 Error_code* err_code,
                                                                                                                                  +
                                                                                                                                  3960 const Peer_socket_options* sock_opts)
                                                                                                                                  +
                                                                                                                                  3961{
                                                                                                                                  +
                                                                                                                                  3962 namespace bind_ns = util::bind_ns;
                                                                                                                                  + +
                                                                                                                                  3964 bind_ns::cref(to), bind_ns::cref(serialized_metadata), _1, sock_opts);
                                                                                                                                  +
                                                                                                                                  3965 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  3966
                                                                                                                                  +
                                                                                                                                  3967 namespace bind_ns = util::bind_ns;
                                                                                                                                  + + +
                                                                                                                                  3970 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  3971
                                                                                                                                  +
                                                                                                                                  3972 // We are in thread U != W.
                                                                                                                                  +
                                                                                                                                  3973
                                                                                                                                  +
                                                                                                                                  3974 if (!running())
                                                                                                                                  +
                                                                                                                                  3975 {
                                                                                                                                  + +
                                                                                                                                  3977 return Peer_socket::Ptr();
                                                                                                                                  +
                                                                                                                                  3978 }
                                                                                                                                  +
                                                                                                                                  3979 // else
                                                                                                                                  +
                                                                                                                                  3980
                                                                                                                                  +
                                                                                                                                  3981 // If it's good enough for DATA packets, it's good enough for metadata in SYN.
                                                                                                                                  +
                                                                                                                                  3982 if (serialized_metadata.size() > max_block_size())
                                                                                                                                  +
                                                                                                                                  3983 {
                                                                                                                                  + +
                                                                                                                                  3985 return Peer_socket::Ptr();
                                                                                                                                  +
                                                                                                                                  3986 }
                                                                                                                                  +
                                                                                                                                  3987
                                                                                                                                  +
                                                                                                                                  3988 /* Put the rest of the work into thread W. For justification, see big comment in listen().
                                                                                                                                  +
                                                                                                                                  3989 * Addendum regarding performance: connect() is probably called more frequently than listen(), but
                                                                                                                                  +
                                                                                                                                  3990 * I doubt the performance impact is serious even so. send() and receive() might be a different
                                                                                                                                  +
                                                                                                                                  3991 * story. */
                                                                                                                                  +
                                                                                                                                  3992
                                                                                                                                  +
                                                                                                                                  3993 Peer_socket::Ptr sock;
                                                                                                                                  +
                                                                                                                                  3994 /* Load this->connect_worker(...) onto thread W boost.asio work queue.
                                                                                                                                  +
                                                                                                                                  3995 * We don't return until it finishes; therefore it is fine to do total & capture. */
                                                                                                                                  +
                                                                                                                                  3996 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION,
                                                                                                                                  +
                                                                                                                                  3997 [&]() { connect_worker(to, serialized_metadata, sock_opts, &sock); });
                                                                                                                                  +
                                                                                                                                  3998 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  +
                                                                                                                                  3999
                                                                                                                                  +
                                                                                                                                  4000 // connect_worker() indicates success or failure through this data member.
                                                                                                                                  +
                                                                                                                                  4001 if (sock->m_disconnect_cause)
                                                                                                                                  +
                                                                                                                                  4002 {
                                                                                                                                  +
                                                                                                                                  4003 *err_code = sock->m_disconnect_cause;
                                                                                                                                  +
                                                                                                                                  4004 return Peer_socket::Ptr(); // sock will go out of scope and thus will be destroyed.
                                                                                                                                  +
                                                                                                                                  4005 }
                                                                                                                                  +
                                                                                                                                  4006 // else
                                                                                                                                  +
                                                                                                                                  4007 err_code->clear();
                                                                                                                                  +
                                                                                                                                  4008 return sock;
                                                                                                                                  +
                                                                                                                                  4009} // Node::connect_with_metadata()
                                                                                                                                  +
                                                                                                                                  4010
                                                                                                                                  +
                                                                                                                                  4011void Node::connect_worker(const Remote_endpoint& to, const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  +
                                                                                                                                  4012 const Peer_socket_options* sock_opts,
                                                                                                                                  +
                                                                                                                                  4013 Peer_socket::Ptr* sock_ptr)
                                                                                                                                  +
                                                                                                                                  4014{
                                                                                                                                  +
                                                                                                                                  4015 using boost::asio::buffer;
                                                                                                                                  +
                                                                                                                                  4016 using boost::asio::ip::address;
                                                                                                                                  4017
                                                                                                                                  -
                                                                                                                                  4018 auto& sock = *sock_ptr;
                                                                                                                                  -
                                                                                                                                  4019 if (sock_opts)
                                                                                                                                  -
                                                                                                                                  4020 {
                                                                                                                                  -
                                                                                                                                  4021 /* They provided custom per-socket options. Before we give those to the new socket, let's
                                                                                                                                  -
                                                                                                                                  4022 * validate them (for proper values and internal consistency, etc.). */
                                                                                                                                  +
                                                                                                                                  4018 assert(sock_ptr);
                                                                                                                                  +
                                                                                                                                  4019
                                                                                                                                  +
                                                                                                                                  4020 // We are in thread W. connect() is waiting for us to set *sock_ptr and return.
                                                                                                                                  +
                                                                                                                                  4021
                                                                                                                                  +
                                                                                                                                  4022 // Create new socket and set all members that may be immediately accessed by user in thread U after we're done.
                                                                                                                                  4023
                                                                                                                                  -
                                                                                                                                  4024 Error_code err_code;
                                                                                                                                  -
                                                                                                                                  4025 const bool opts_ok = sock_validate_options(*sock_opts, 0, &err_code);
                                                                                                                                  -
                                                                                                                                  4026
                                                                                                                                  -
                                                                                                                                  4027 // Due to the advertised interface of the current method, we must create a socket even on error.
                                                                                                                                  -
                                                                                                                                  4028 sock.reset(sock_create(*sock_opts));
                                                                                                                                  +
                                                                                                                                  4024 auto& sock = *sock_ptr;
                                                                                                                                  +
                                                                                                                                  4025 if (sock_opts)
                                                                                                                                  +
                                                                                                                                  4026 {
                                                                                                                                  +
                                                                                                                                  4027 /* They provided custom per-socket options. Before we give those to the new socket, let's
                                                                                                                                  +
                                                                                                                                  4028 * validate them (for proper values and internal consistency, etc.). */
                                                                                                                                  4029
                                                                                                                                  -
                                                                                                                                  4030 // Now report error if indeed options were invalid. err_code is already set and logged in that case.
                                                                                                                                  -
                                                                                                                                  4031 if (!opts_ok)
                                                                                                                                  -
                                                                                                                                  4032 {
                                                                                                                                  -
                                                                                                                                  4033 sock->m_disconnect_cause = err_code;
                                                                                                                                  -
                                                                                                                                  4034 return;
                                                                                                                                  -
                                                                                                                                  4035 }
                                                                                                                                  -
                                                                                                                                  4036 // else
                                                                                                                                  -
                                                                                                                                  4037 }
                                                                                                                                  -
                                                                                                                                  4038 else
                                                                                                                                  -
                                                                                                                                  4039 {
                                                                                                                                  -
                                                                                                                                  4040 /* More typically, they did not provide per-socket options. So we just pass our global
                                                                                                                                  -
                                                                                                                                  4041 * template for the per-socket options to the Peer_socket constructor. The only caveat is
                                                                                                                                  -
                                                                                                                                  4042 * that template may be concurrently changed, so we must lock it. Could do it with opt(), but
                                                                                                                                  -
                                                                                                                                  4043 * that introduces an extra copy of the entire struct, so just do it explicitly.
                                                                                                                                  -
                                                                                                                                  4044 *
                                                                                                                                  -
                                                                                                                                  4045 * Note: no need to validate; global options (including per-socket ones) are validated
                                                                                                                                  -
                                                                                                                                  4046 * elsewhere when set. */
                                                                                                                                  -
                                                                                                                                  4047 Peer_socket* sock_non_ptr;
                                                                                                                                  -
                                                                                                                                  4048 {
                                                                                                                                  - -
                                                                                                                                  4050 sock_non_ptr = sock_create(m_opts.m_dyn_sock_opts);
                                                                                                                                  -
                                                                                                                                  4051 }
                                                                                                                                  -
                                                                                                                                  4052 sock.reset(sock_non_ptr);
                                                                                                                                  -
                                                                                                                                  4053 }
                                                                                                                                  -
                                                                                                                                  4054
                                                                                                                                  -
                                                                                                                                  4055 // Socket created; set members.
                                                                                                                                  -
                                                                                                                                  4056
                                                                                                                                  -
                                                                                                                                  4057 sock->m_active_connect = true;
                                                                                                                                  -
                                                                                                                                  4058 sock->m_node = this;
                                                                                                                                  - -
                                                                                                                                  4060 sock->m_remote_endpoint = to;
                                                                                                                                  -
                                                                                                                                  4061 // Will be sent in SYN to be deserialized by user on the other side. Save here if we must retransmit SYN.
                                                                                                                                  -
                                                                                                                                  4062 sock->m_serialized_metadata.assign_copy(serialized_metadata);
                                                                                                                                  -
                                                                                                                                  4063
                                                                                                                                  -
                                                                                                                                  4064 /* Initialize the connection's send bandwidth estimator (object that estimates available
                                                                                                                                  -
                                                                                                                                  4065 * outgoing bandwidth based on incoming acknowledgments). It may be used by m_snd_cong_ctl,
                                                                                                                                  -
                                                                                                                                  4066 * depending on the strategy chosen, but may be useful in its own right. Hence it's a separate
                                                                                                                                  -
                                                                                                                                  4067 * object, not inside *m_snd_cong_ctl. */
                                                                                                                                  -
                                                                                                                                  4068 sock->m_snd_bandwidth_estimator.reset(new Send_bandwidth_estimator(get_logger(), sock));
                                                                                                                                  +
                                                                                                                                  4030 Error_code err_code;
                                                                                                                                  +
                                                                                                                                  4031 const bool opts_ok = sock_validate_options(*sock_opts, 0, &err_code);
                                                                                                                                  +
                                                                                                                                  4032
                                                                                                                                  +
                                                                                                                                  4033 // Due to the advertised interface of the current method, we must create a socket even on error.
                                                                                                                                  +
                                                                                                                                  4034 sock.reset(sock_create(*sock_opts));
                                                                                                                                  +
                                                                                                                                  4035
                                                                                                                                  +
                                                                                                                                  4036 // Now report error if indeed options were invalid. err_code is already set and logged in that case.
                                                                                                                                  +
                                                                                                                                  4037 if (!opts_ok)
                                                                                                                                  +
                                                                                                                                  4038 {
                                                                                                                                  +
                                                                                                                                  4039 sock->m_disconnect_cause = err_code;
                                                                                                                                  +
                                                                                                                                  4040 return;
                                                                                                                                  +
                                                                                                                                  4041 }
                                                                                                                                  +
                                                                                                                                  4042 // else
                                                                                                                                  +
                                                                                                                                  4043 }
                                                                                                                                  +
                                                                                                                                  4044 else
                                                                                                                                  +
                                                                                                                                  4045 {
                                                                                                                                  +
                                                                                                                                  4046 /* More typically, they did not provide per-socket options. So we just pass our global
                                                                                                                                  +
                                                                                                                                  4047 * template for the per-socket options to the Peer_socket constructor. The only caveat is
                                                                                                                                  +
                                                                                                                                  4048 * that template may be concurrently changed, so we must lock it. Could do it with opt(), but
                                                                                                                                  +
                                                                                                                                  4049 * that introduces an extra copy of the entire struct, so just do it explicitly.
                                                                                                                                  +
                                                                                                                                  4050 *
                                                                                                                                  +
                                                                                                                                  4051 * Note: no need to validate; global options (including per-socket ones) are validated
                                                                                                                                  +
                                                                                                                                  4052 * elsewhere when set. */
                                                                                                                                  +
                                                                                                                                  4053 Peer_socket* sock_non_ptr;
                                                                                                                                  +
                                                                                                                                  4054 {
                                                                                                                                  + +
                                                                                                                                  4056 sock_non_ptr = sock_create(m_opts.m_dyn_sock_opts);
                                                                                                                                  +
                                                                                                                                  4057 }
                                                                                                                                  +
                                                                                                                                  4058 sock.reset(sock_non_ptr);
                                                                                                                                  +
                                                                                                                                  4059 }
                                                                                                                                  +
                                                                                                                                  4060
                                                                                                                                  +
                                                                                                                                  4061 // Socket created; set members.
                                                                                                                                  +
                                                                                                                                  4062
                                                                                                                                  +
                                                                                                                                  4063 sock->m_active_connect = true;
                                                                                                                                  +
                                                                                                                                  4064 sock->m_node = this;
                                                                                                                                  + +
                                                                                                                                  4066 sock->m_remote_endpoint = to;
                                                                                                                                  +
                                                                                                                                  4067 // Will be sent in SYN to be deserialized by user on the other side. Save here if we must retransmit SYN.
                                                                                                                                  +
                                                                                                                                  4068 sock->m_serialized_metadata.assign_copy(serialized_metadata);
                                                                                                                                  4069
                                                                                                                                  -
                                                                                                                                  4070 // Initialize the connection's congestion control strategy based on the configured strategy.
                                                                                                                                  -
                                                                                                                                  4071 sock->m_snd_cong_ctl.reset
                                                                                                                                  -
                                                                                                                                  4072 (Congestion_control_selector::create_strategy(sock->m_opts.m_st_cong_ctl_strategy, get_logger(), sock));
                                                                                                                                  -
                                                                                                                                  4073 // ^-- No need to use opt() yet: user doesn't have socket and cannot set_options() on it yet.
                                                                                                                                  -
                                                                                                                                  4074
                                                                                                                                  -
                                                                                                                                  4075 /* Tweak: If they specify the "any" IP address as the destination (which means any interface on
                                                                                                                                  -
                                                                                                                                  4076 * this machine), response traffic will look as though it's coming from the loopback IP address,
                                                                                                                                  -
                                                                                                                                  4077 * or another specific IP address -- not "any." Thus it will not be able to be properly
                                                                                                                                  -
                                                                                                                                  4078 * demultiplexed to this socket, since that will be saved at the "any" address in our data
                                                                                                                                  -
                                                                                                                                  4079 * structures. So that's an error. */
                                                                                                                                  -
                                                                                                                                  4080 bool ip_addr_any_error = false;
                                                                                                                                  -
                                                                                                                                  4081 const address& addr = to.m_udp_endpoint.address(); // Short-hand.
                                                                                                                                  -
                                                                                                                                  4082 if (addr.is_v4())
                                                                                                                                  -
                                                                                                                                  4083 {
                                                                                                                                  -
                                                                                                                                  4084 if (addr.to_v4() == util::Ip_address_v4::any())
                                                                                                                                  -
                                                                                                                                  4085 {
                                                                                                                                  -
                                                                                                                                  4086 ip_addr_any_error = true;
                                                                                                                                  -
                                                                                                                                  4087 }
                                                                                                                                  -
                                                                                                                                  4088 }
                                                                                                                                  -
                                                                                                                                  4089 else if (addr.is_v6())
                                                                                                                                  -
                                                                                                                                  4090 {
                                                                                                                                  -
                                                                                                                                  4091 if (addr.to_v6() == util::Ip_address_v6::any())
                                                                                                                                  -
                                                                                                                                  4092 {
                                                                                                                                  -
                                                                                                                                  4093 ip_addr_any_error = true;
                                                                                                                                  -
                                                                                                                                  4094 }
                                                                                                                                  -
                                                                                                                                  4095 }
                                                                                                                                  -
                                                                                                                                  4096 // else a new version of IP! Yay!
                                                                                                                                  -
                                                                                                                                  4097 if (ip_addr_any_error)
                                                                                                                                  -
                                                                                                                                  4098 {
                                                                                                                                  -
                                                                                                                                  4099 // Mark/log error.
                                                                                                                                  -
                                                                                                                                  4100 Error_code* err_code = &sock->m_disconnect_cause;
                                                                                                                                  - -
                                                                                                                                  4102 return;
                                                                                                                                  -
                                                                                                                                  4103 }
                                                                                                                                  -
                                                                                                                                  4104 // else
                                                                                                                                  -
                                                                                                                                  4105
                                                                                                                                  -
                                                                                                                                  4106 // Allocate ephemeral local port.
                                                                                                                                  -
                                                                                                                                  4107
                                                                                                                                  -
                                                                                                                                  4108 sock->m_local_port = m_ports.reserve_ephemeral_port(&sock->m_disconnect_cause);
                                                                                                                                  -
                                                                                                                                  4109 if (sock->m_local_port == S_PORT_ANY)
                                                                                                                                  -
                                                                                                                                  4110 {
                                                                                                                                  -
                                                                                                                                  4111 // Error already logged and is in sock->m_disconnect_cause.
                                                                                                                                  -
                                                                                                                                  4112 return;
                                                                                                                                  -
                                                                                                                                  4113 }
                                                                                                                                  -
                                                                                                                                  4114 // else
                                                                                                                                  -
                                                                                                                                  4115
                                                                                                                                  -
                                                                                                                                  4116 const Socket_id socket_id = Node::socket_id(sock);
                                                                                                                                  -
                                                                                                                                  4117 FLOW_LOG_INFO("NetFlow worker thread starting active-connect of [" << sock << "].");
                                                                                                                                  -
                                                                                                                                  4118
                                                                                                                                  -
                                                                                                                                  4119 if (util::key_exists(m_socks, socket_id))
                                                                                                                                  -
                                                                                                                                  4120 {
                                                                                                                                  -
                                                                                                                                  4121 /* This is an active connect (we're intiating the connection). Therefore in particular it
                                                                                                                                  -
                                                                                                                                  4122 * should be impossible that our local_port() equals an already existing connection's
                                                                                                                                  -
                                                                                                                                  4123 * local_port(); Port_space is supposed to prevent the same ephemeral port from being handed out
                                                                                                                                  -
                                                                                                                                  4124 * to more than one connection. Therefore this must be a programming error. */
                                                                                                                                  -
                                                                                                                                  4125
                                                                                                                                  -
                                                                                                                                  4126 FLOW_LOG_WARNING("Cannot add [" << sock << "], because such a connection already exists. "
                                                                                                                                  -
                                                                                                                                  4127 "This is an ephemeral port collision and "
                                                                                                                                  -
                                                                                                                                  4128 "constitutes either a bug or an extremely unlikely condition.");
                                                                                                                                  -
                                                                                                                                  4129
                                                                                                                                  -
                                                                                                                                  4130 // Mark/log error.
                                                                                                                                  -
                                                                                                                                  4131 Error_code* err_code = &sock->m_disconnect_cause;
                                                                                                                                  - -
                                                                                                                                  4133
                                                                                                                                  -
                                                                                                                                  4134 // Return port.
                                                                                                                                  -
                                                                                                                                  4135 Error_code return_err_code;
                                                                                                                                  -
                                                                                                                                  4136 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  -
                                                                                                                                  4137 assert(!return_err_code);
                                                                                                                                  -
                                                                                                                                  4138
                                                                                                                                  -
                                                                                                                                  4139 return;
                                                                                                                                  -
                                                                                                                                  4140 } // if (that socket pair already exists)
                                                                                                                                  -
                                                                                                                                  4141 // else
                                                                                                                                  -
                                                                                                                                  4142
                                                                                                                                  -
                                                                                                                                  4143 /* Try the packet send just below again if SYN not acknowledged within a certain amount of time.
                                                                                                                                  -
                                                                                                                                  4144 * Give up if that happens too many times. Why do this BEFORE sending packet? Because
                                                                                                                                  -
                                                                                                                                  4145 * this can fail, in which case we don't want a weird situation where we've sent
                                                                                                                                  -
                                                                                                                                  4146 * the packet but failed to start the retransmit/timeout timers.
                                                                                                                                  -
                                                                                                                                  4147 * Update: It can no longer fail, so that reasoning is N/A. Not moving, though, because it's still fine here. */
                                                                                                                                  -
                                                                                                                                  4148 setup_connection_timers(socket_id, sock, true);
                                                                                                                                  -
                                                                                                                                  4149
                                                                                                                                  -
                                                                                                                                  4150 /* Initial Sequence Number (ISN) (save before create_syn() uses it).
                                                                                                                                  -
                                                                                                                                  4151 * Remember it in case we must retransmit the SYN. (m_snd_next_seq_num may have been further increased by then.) */
                                                                                                                                  -
                                                                                                                                  4152 Sequence_number& init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  -
                                                                                                                                  4153 init_seq_num = m_seq_num_generator.generate_init_seq_num();
                                                                                                                                  -
                                                                                                                                  4154 /* Setting this now ensures ALL subsequent copies (essentially, every single Sequence_number on this socket's
                                                                                                                                  -
                                                                                                                                  4155 * local data number line!) will have the same nice metadata (hence nice logging) too.
                                                                                                                                  -
                                                                                                                                  4156 * The `+ 1` nuance is explained in class Sequence_number doc header, *Metadata* section. */
                                                                                                                                  -
                                                                                                                                  4157 init_seq_num.set_metadata('L', init_seq_num + 1, sock->max_block_size());
                                                                                                                                  -
                                                                                                                                  4158 // Sequence number of first bit of actual data.
                                                                                                                                  -
                                                                                                                                  4159 sock->m_snd_next_seq_num = init_seq_num + 1;
                                                                                                                                  -
                                                                                                                                  4160
                                                                                                                                  -
                                                                                                                                  4161 // Make a SYN packet to send.
                                                                                                                                  -
                                                                                                                                  4162 auto syn = create_syn(sock);
                                                                                                                                  -
                                                                                                                                  4163
                                                                                                                                  -
                                                                                                                                  4164 // Fill out common fields and asynchronously send packet.
                                                                                                                                  -
                                                                                                                                  4165 if (!async_sock_low_lvl_packet_send_paced(sock,
                                                                                                                                  - -
                                                                                                                                  4167 &sock->m_disconnect_cause))
                                                                                                                                  -
                                                                                                                                  4168 {
                                                                                                                                  -
                                                                                                                                  4169 // Error marked and logged already.
                                                                                                                                  -
                                                                                                                                  4170
                                                                                                                                  -
                                                                                                                                  4171 // Return port.
                                                                                                                                  -
                                                                                                                                  4172 Error_code return_err_code;
                                                                                                                                  -
                                                                                                                                  4173 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  -
                                                                                                                                  4174 assert(!return_err_code);
                                                                                                                                  -
                                                                                                                                  4175
                                                                                                                                  -
                                                                                                                                  4176 // Cancel any timers set up above.
                                                                                                                                  -
                                                                                                                                  4177 cancel_timers(sock);
                                                                                                                                  -
                                                                                                                                  4178
                                                                                                                                  -
                                                                                                                                  4179 return;
                                                                                                                                  -
                                                                                                                                  4180 }
                                                                                                                                  -
                                                                                                                                  4181 /* send will happen asynchronously, and the registered completion handler will execute in this
                                                                                                                                  -
                                                                                                                                  4182 * thread when done (NO SOONER than this method finishes executing). */
                                                                                                                                  -
                                                                                                                                  4183
                                                                                                                                  -
                                                                                                                                  4184 // No more erros: Map socket pair to the socket data structure (kind of analogous to a TCP net-stack's TCB structure).
                                                                                                                                  -
                                                                                                                                  4185 m_socks[socket_id] = sock;
                                                                                                                                  -
                                                                                                                                  4186
                                                                                                                                  -
                                                                                                                                  4187 // CLOSED -> SYN_SENT.
                                                                                                                                  -
                                                                                                                                  4188 sock_set_int_state(sock, Peer_socket::Int_state::S_SYN_SENT);
                                                                                                                                  -
                                                                                                                                  4189} // Node::connect_worker()
                                                                                                                                  -
                                                                                                                                  4190
                                                                                                                                  - -
                                                                                                                                  4192 const Peer_socket_options* sock_opts)
                                                                                                                                  -
                                                                                                                                  4193{
                                                                                                                                  -
                                                                                                                                  4194 return sync_connect_with_metadata(to, Fine_duration::max(),
                                                                                                                                  -
                                                                                                                                  4195 boost::asio::buffer(&S_DEFAULT_CONN_METADATA, sizeof(S_DEFAULT_CONN_METADATA)),
                                                                                                                                  -
                                                                                                                                  4196 err_code, sock_opts);
                                                                                                                                  -
                                                                                                                                  4197}
                                                                                                                                  -
                                                                                                                                  4198
                                                                                                                                  - -
                                                                                                                                  4200 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  -
                                                                                                                                  4201 Error_code* err_code, const Peer_socket_options* opts)
                                                                                                                                  -
                                                                                                                                  4202{
                                                                                                                                  -
                                                                                                                                  4203 return sync_connect_with_metadata(to, Fine_duration::max(), serialized_metadata, err_code, opts);
                                                                                                                                  -
                                                                                                                                  4204}
                                                                                                                                  -
                                                                                                                                  4205
                                                                                                                                  - -
                                                                                                                                  4207 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  -
                                                                                                                                  4208 Error_code* err_code, const Peer_socket_options* sock_opts)
                                                                                                                                  -
                                                                                                                                  4209{
                                                                                                                                  -
                                                                                                                                  4210 namespace bind_ns = util::bind_ns;
                                                                                                                                  - -
                                                                                                                                  4212 bind_ns::cref(to), bind_ns::cref(max_wait), bind_ns::cref(serialized_metadata),
                                                                                                                                  -
                                                                                                                                  4213 _1, sock_opts);
                                                                                                                                  -
                                                                                                                                  4214 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  4215
                                                                                                                                  -
                                                                                                                                  4216 using util::bind_ns::bind;
                                                                                                                                  -
                                                                                                                                  4217
                                                                                                                                  -
                                                                                                                                  4218 // We are in thread U != W.
                                                                                                                                  -
                                                                                                                                  4219
                                                                                                                                  -
                                                                                                                                  4220 /* This is actually pretty simple. All we want to do is connect(), which is non-blocking, and
                                                                                                                                  -
                                                                                                                                  4221 * then block until the connection is ready (at least according to our side). Ready means that
                                                                                                                                  -
                                                                                                                                  4222 * the socket is Writable (since user has no access to the socket yet, nothing can be loading
                                                                                                                                  -
                                                                                                                                  4223 * data onto the Send buffer, and obviously the congestion window is clear, so it must be
                                                                                                                                  -
                                                                                                                                  4224 * Writable). Note that, like BSD sockets, we specifically don't consider a socket Writable
                                                                                                                                  -
                                                                                                                                  4225 * until in ESTABLISHED internal state. */
                                                                                                                                  -
                                                                                                                                  4226
                                                                                                                                  -
                                                                                                                                  4227 /* For the "block until Writable" part, create and load the Event_set. Do this before connect(),
                                                                                                                                  -
                                                                                                                                  4228 * so that if it fails we don't have to then clean up the socket before returning error to user. */
                                                                                                                                  -
                                                                                                                                  4229
                                                                                                                                  -
                                                                                                                                  4230 const Event_set::Ptr event_set = event_set_create(err_code);
                                                                                                                                  -
                                                                                                                                  4231 if (!event_set)
                                                                                                                                  -
                                                                                                                                  4232 {
                                                                                                                                  -
                                                                                                                                  4233 assert(*err_code == error::Code::S_NODE_NOT_RUNNING);
                                                                                                                                  -
                                                                                                                                  4234 return Peer_socket::Ptr(); // *err_code is set.
                                                                                                                                  -
                                                                                                                                  4235 }
                                                                                                                                  -
                                                                                                                                  4236 // Now we know Node is running(); and we have event_set.
                                                                                                                                  -
                                                                                                                                  4237
                                                                                                                                  -
                                                                                                                                  4238 // We must clean up event_set at any return point below.
                                                                                                                                  -
                                                                                                                                  4239 Error_code dummy_prevents_throw;
                                                                                                                                  -
                                                                                                                                  4240 util::Auto_cleanup event_set_cleanup = util::setup_auto_cleanup([&]()
                                                                                                                                  -
                                                                                                                                  4241 {
                                                                                                                                  -
                                                                                                                                  4242 // Eat any error when closing Event_set, as it's unlikely and not interesting to user.
                                                                                                                                  -
                                                                                                                                  4243 event_set->close(&dummy_prevents_throw);
                                                                                                                                  -
                                                                                                                                  4244 });
                                                                                                                                  -
                                                                                                                                  4245
                                                                                                                                  -
                                                                                                                                  4246 const auto sock = connect_with_metadata(to, serialized_metadata, err_code, sock_opts);
                                                                                                                                  -
                                                                                                                                  4247 if (!sock)
                                                                                                                                  -
                                                                                                                                  4248 {
                                                                                                                                  -
                                                                                                                                  4249 return sock; // *err_code is set. It's probably some user error like an invalid destination.
                                                                                                                                  -
                                                                                                                                  4250 }
                                                                                                                                  -
                                                                                                                                  4251 // else we have a socket that has started connecting.
                                                                                                                                  -
                                                                                                                                  4252
                                                                                                                                  -
                                                                                                                                  4253 /* We must clean up sock (call sock->close_abruptly(&dummy_prevents_throw)) at any return point (including
                                                                                                                                  -
                                                                                                                                  4254 * exception throw) below, EXCEPT the success case. Because of the latter, we can't use the
                                                                                                                                  -
                                                                                                                                  4255 * auto_cleanup trick we used on event_set. So, we'll just have to handle sock cleanup
                                                                                                                                  -
                                                                                                                                  4256 * manually. */
                                                                                                                                  -
                                                                                                                                  4257
                                                                                                                                  -
                                                                                                                                  4258 // Add the one event about which we care.
                                                                                                                                  -
                                                                                                                                  4259 bool result = event_set->add_wanted_socket<Peer_socket>(sock, Event_set::Event_type::S_PEER_SOCKET_WRITABLE,
                                                                                                                                  -
                                                                                                                                  4260 &dummy_prevents_throw);
                                                                                                                                  -
                                                                                                                                  4261 assert(result); // Node is running, so there's no way that should have failed.
                                                                                                                                  -
                                                                                                                                  4262
                                                                                                                                  -
                                                                                                                                  4263 // Wait for Writable.
                                                                                                                                  -
                                                                                                                                  4264 result = event_set->sync_wait(max_wait, err_code);
                                                                                                                                  -
                                                                                                                                  4265 if (!result)
                                                                                                                                  -
                                                                                                                                  4266 {
                                                                                                                                  -
                                                                                                                                  4267 if (*err_code == error::Code::S_EVENT_SET_CLOSED)
                                                                                                                                  -
                                                                                                                                  4268 {
                                                                                                                                  -
                                                                                                                                  4269 // It's unlikely, but I guess someone could have destroyed Node during the wait (we do allow that during sleep).
                                                                                                                                  - -
                                                                                                                                  4271 }
                                                                                                                                  -
                                                                                                                                  4272 else
                                                                                                                                  -
                                                                                                                                  4273 {
                                                                                                                                  -
                                                                                                                                  4274 // This is quite common and is analogous to POSIX's EINTR semantics (signal interrupted the blocking call).
                                                                                                                                  -
                                                                                                                                  4275 assert(*err_code == error::Code::S_WAIT_INTERRUPTED);
                                                                                                                                  -
                                                                                                                                  4276 }
                                                                                                                                  -
                                                                                                                                  4277
                                                                                                                                  -
                                                                                                                                  4278 // Clean up (as discussed above).
                                                                                                                                  -
                                                                                                                                  4279 sock->close_abruptly(&dummy_prevents_throw); // Eat any error; user doesn't care.
                                                                                                                                  -
                                                                                                                                  4280 return Peer_socket::Ptr(); // *err_code is set.
                                                                                                                                  -
                                                                                                                                  4281 } // if (sync_wait() failed)
                                                                                                                                  -
                                                                                                                                  4282 // else we know event_set is still open, and sync_wait() succeeded.
                                                                                                                                  +
                                                                                                                                  4070 /* Initialize the connection's send bandwidth estimator (object that estimates available
                                                                                                                                  +
                                                                                                                                  4071 * outgoing bandwidth based on incoming acknowledgments). It may be used by m_snd_cong_ctl,
                                                                                                                                  +
                                                                                                                                  4072 * depending on the strategy chosen, but may be useful in its own right. Hence it's a separate
                                                                                                                                  +
                                                                                                                                  4073 * object, not inside *m_snd_cong_ctl. */
                                                                                                                                  +
                                                                                                                                  4074 sock->m_snd_bandwidth_estimator.reset(new Send_bandwidth_estimator(get_logger(), sock));
                                                                                                                                  +
                                                                                                                                  4075
                                                                                                                                  +
                                                                                                                                  4076 // Initialize the connection's congestion control strategy based on the configured strategy.
                                                                                                                                  +
                                                                                                                                  4077 sock->m_snd_cong_ctl.reset
                                                                                                                                  +
                                                                                                                                  4078 (Congestion_control_selector::create_strategy(sock->m_opts.m_st_cong_ctl_strategy, get_logger(), sock));
                                                                                                                                  +
                                                                                                                                  4079 // ^-- No need to use opt() yet: user doesn't have socket and cannot set_options() on it yet.
                                                                                                                                  +
                                                                                                                                  4080
                                                                                                                                  +
                                                                                                                                  4081 /* Tweak: If they specify the "any" IP address as the destination (which means any interface on
                                                                                                                                  +
                                                                                                                                  4082 * this machine), response traffic will look as though it's coming from the loopback IP address,
                                                                                                                                  +
                                                                                                                                  4083 * or another specific IP address -- not "any." Thus it will not be able to be properly
                                                                                                                                  +
                                                                                                                                  4084 * demultiplexed to this socket, since that will be saved at the "any" address in our data
                                                                                                                                  +
                                                                                                                                  4085 * structures. So that's an error. */
                                                                                                                                  +
                                                                                                                                  4086 bool ip_addr_any_error = false;
                                                                                                                                  +
                                                                                                                                  4087 const address& addr = to.m_udp_endpoint.address(); // Short-hand.
                                                                                                                                  +
                                                                                                                                  4088 if (addr.is_v4())
                                                                                                                                  +
                                                                                                                                  4089 {
                                                                                                                                  +
                                                                                                                                  4090 if (addr.to_v4() == util::Ip_address_v4::any())
                                                                                                                                  +
                                                                                                                                  4091 {
                                                                                                                                  +
                                                                                                                                  4092 ip_addr_any_error = true;
                                                                                                                                  +
                                                                                                                                  4093 }
                                                                                                                                  +
                                                                                                                                  4094 }
                                                                                                                                  +
                                                                                                                                  4095 else if (addr.is_v6())
                                                                                                                                  +
                                                                                                                                  4096 {
                                                                                                                                  +
                                                                                                                                  4097 if (addr.to_v6() == util::Ip_address_v6::any())
                                                                                                                                  +
                                                                                                                                  4098 {
                                                                                                                                  +
                                                                                                                                  4099 ip_addr_any_error = true;
                                                                                                                                  +
                                                                                                                                  4100 }
                                                                                                                                  +
                                                                                                                                  4101 }
                                                                                                                                  +
                                                                                                                                  4102 // else a new version of IP! Yay!
                                                                                                                                  +
                                                                                                                                  4103 if (ip_addr_any_error)
                                                                                                                                  +
                                                                                                                                  4104 {
                                                                                                                                  +
                                                                                                                                  4105 // Mark/log error.
                                                                                                                                  +
                                                                                                                                  4106 Error_code* err_code = &sock->m_disconnect_cause;
                                                                                                                                  + +
                                                                                                                                  4108 return;
                                                                                                                                  +
                                                                                                                                  4109 }
                                                                                                                                  +
                                                                                                                                  4110 // else
                                                                                                                                  +
                                                                                                                                  4111
                                                                                                                                  +
                                                                                                                                  4112 // Allocate ephemeral local port.
                                                                                                                                  +
                                                                                                                                  4113
                                                                                                                                  +
                                                                                                                                  4114 sock->m_local_port = m_ports.reserve_ephemeral_port(&sock->m_disconnect_cause);
                                                                                                                                  +
                                                                                                                                  4115 if (sock->m_local_port == S_PORT_ANY)
                                                                                                                                  +
                                                                                                                                  4116 {
                                                                                                                                  +
                                                                                                                                  4117 // Error already logged and is in sock->m_disconnect_cause.
                                                                                                                                  +
                                                                                                                                  4118 return;
                                                                                                                                  +
                                                                                                                                  4119 }
                                                                                                                                  +
                                                                                                                                  4120 // else
                                                                                                                                  +
                                                                                                                                  4121
                                                                                                                                  +
                                                                                                                                  4122 const Socket_id socket_id = Node::socket_id(sock);
                                                                                                                                  +
                                                                                                                                  4123 FLOW_LOG_INFO("NetFlow worker thread starting active-connect of [" << sock << "].");
                                                                                                                                  +
                                                                                                                                  4124
                                                                                                                                  +
                                                                                                                                  4125 if (util::key_exists(m_socks, socket_id))
                                                                                                                                  +
                                                                                                                                  4126 {
                                                                                                                                  +
                                                                                                                                  4127 /* This is an active connect (we're intiating the connection). Therefore in particular it
                                                                                                                                  +
                                                                                                                                  4128 * should be impossible that our local_port() equals an already existing connection's
                                                                                                                                  +
                                                                                                                                  4129 * local_port(); Port_space is supposed to prevent the same ephemeral port from being handed out
                                                                                                                                  +
                                                                                                                                  4130 * to more than one connection. Therefore this must be a programming error. */
                                                                                                                                  +
                                                                                                                                  4131
                                                                                                                                  +
                                                                                                                                  4132 FLOW_LOG_WARNING("Cannot add [" << sock << "], because such a connection already exists. "
                                                                                                                                  +
                                                                                                                                  4133 "This is an ephemeral port collision and "
                                                                                                                                  +
                                                                                                                                  4134 "constitutes either a bug or an extremely unlikely condition.");
                                                                                                                                  +
                                                                                                                                  4135
                                                                                                                                  +
                                                                                                                                  4136 // Mark/log error.
                                                                                                                                  +
                                                                                                                                  4137 Error_code* err_code = &sock->m_disconnect_cause;
                                                                                                                                  + +
                                                                                                                                  4139
                                                                                                                                  +
                                                                                                                                  4140 // Return port.
                                                                                                                                  +
                                                                                                                                  4141 Error_code return_err_code;
                                                                                                                                  +
                                                                                                                                  4142 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  +
                                                                                                                                  4143 assert(!return_err_code);
                                                                                                                                  +
                                                                                                                                  4144
                                                                                                                                  +
                                                                                                                                  4145 return;
                                                                                                                                  +
                                                                                                                                  4146 } // if (that socket pair already exists)
                                                                                                                                  +
                                                                                                                                  4147 // else
                                                                                                                                  +
                                                                                                                                  4148
                                                                                                                                  +
                                                                                                                                  4149 /* Try the packet send just below again if SYN not acknowledged within a certain amount of time.
                                                                                                                                  +
                                                                                                                                  4150 * Give up if that happens too many times. Why do this BEFORE sending packet? Because
                                                                                                                                  +
                                                                                                                                  4151 * this can fail, in which case we don't want a weird situation where we've sent
                                                                                                                                  +
                                                                                                                                  4152 * the packet but failed to start the retransmit/timeout timers.
                                                                                                                                  +
                                                                                                                                  4153 * Update: It can no longer fail, so that reasoning is N/A. Not moving, though, because it's still fine here. */
                                                                                                                                  +
                                                                                                                                  4154 setup_connection_timers(socket_id, sock, true);
                                                                                                                                  +
                                                                                                                                  4155
                                                                                                                                  +
                                                                                                                                  4156 /* Initial Sequence Number (ISN) (save before create_syn() uses it).
                                                                                                                                  +
                                                                                                                                  4157 * Remember it in case we must retransmit the SYN. (m_snd_next_seq_num may have been further increased by then.) */
                                                                                                                                  +
                                                                                                                                  4158 Sequence_number& init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  +
                                                                                                                                  4159 init_seq_num = m_seq_num_generator.generate_init_seq_num();
                                                                                                                                  +
                                                                                                                                  4160 /* Setting this now ensures ALL subsequent copies (essentially, every single Sequence_number on this socket's
                                                                                                                                  +
                                                                                                                                  4161 * local data number line!) will have the same nice metadata (hence nice logging) too.
                                                                                                                                  +
                                                                                                                                  4162 * The `+ 1` nuance is explained in class Sequence_number doc header, *Metadata* section. */
                                                                                                                                  +
                                                                                                                                  4163 init_seq_num.set_metadata('L', init_seq_num + 1, sock->max_block_size());
                                                                                                                                  +
                                                                                                                                  4164 // Sequence number of first bit of actual data.
                                                                                                                                  +
                                                                                                                                  4165 sock->m_snd_next_seq_num = init_seq_num + 1;
                                                                                                                                  +
                                                                                                                                  4166
                                                                                                                                  +
                                                                                                                                  4167 // Make a SYN packet to send.
                                                                                                                                  +
                                                                                                                                  4168 auto syn = create_syn(sock);
                                                                                                                                  +
                                                                                                                                  4169
                                                                                                                                  +
                                                                                                                                  4170 // Fill out common fields and asynchronously send packet.
                                                                                                                                  +
                                                                                                                                  4171 if (!async_sock_low_lvl_packet_send_paced(sock,
                                                                                                                                  + +
                                                                                                                                  4173 &sock->m_disconnect_cause))
                                                                                                                                  +
                                                                                                                                  4174 {
                                                                                                                                  +
                                                                                                                                  4175 // Error marked and logged already.
                                                                                                                                  +
                                                                                                                                  4176
                                                                                                                                  +
                                                                                                                                  4177 // Return port.
                                                                                                                                  +
                                                                                                                                  4178 Error_code return_err_code;
                                                                                                                                  +
                                                                                                                                  4179 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  +
                                                                                                                                  4180 assert(!return_err_code);
                                                                                                                                  +
                                                                                                                                  4181
                                                                                                                                  +
                                                                                                                                  4182 // Cancel any timers set up above.
                                                                                                                                  +
                                                                                                                                  4183 cancel_timers(sock);
                                                                                                                                  +
                                                                                                                                  4184
                                                                                                                                  +
                                                                                                                                  4185 return;
                                                                                                                                  +
                                                                                                                                  4186 }
                                                                                                                                  +
                                                                                                                                  4187 /* send will happen asynchronously, and the registered completion handler will execute in this
                                                                                                                                  +
                                                                                                                                  4188 * thread when done (NO SOONER than this method finishes executing). */
                                                                                                                                  +
                                                                                                                                  4189
                                                                                                                                  +
                                                                                                                                  4190 // No more erros: Map socket pair to the socket data structure (kind of analogous to a TCP net-stack's TCB structure).
                                                                                                                                  +
                                                                                                                                  4191 m_socks[socket_id] = sock;
                                                                                                                                  +
                                                                                                                                  4192
                                                                                                                                  +
                                                                                                                                  4193 // CLOSED -> SYN_SENT.
                                                                                                                                  +
                                                                                                                                  4194 sock_set_int_state(sock, Peer_socket::Int_state::S_SYN_SENT);
                                                                                                                                  +
                                                                                                                                  4195} // Node::connect_worker()
                                                                                                                                  +
                                                                                                                                  4196
                                                                                                                                  + +
                                                                                                                                  4198 const Peer_socket_options* sock_opts)
                                                                                                                                  +
                                                                                                                                  4199{
                                                                                                                                  +
                                                                                                                                  4200 return sync_connect_with_metadata(to, Fine_duration::max(),
                                                                                                                                  +
                                                                                                                                  4201 boost::asio::buffer(&S_DEFAULT_CONN_METADATA, sizeof(S_DEFAULT_CONN_METADATA)),
                                                                                                                                  +
                                                                                                                                  4202 err_code, sock_opts);
                                                                                                                                  +
                                                                                                                                  4203}
                                                                                                                                  +
                                                                                                                                  4204
                                                                                                                                  + +
                                                                                                                                  4206 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  +
                                                                                                                                  4207 Error_code* err_code, const Peer_socket_options* opts)
                                                                                                                                  +
                                                                                                                                  4208{
                                                                                                                                  +
                                                                                                                                  4209 return sync_connect_with_metadata(to, Fine_duration::max(), serialized_metadata, err_code, opts);
                                                                                                                                  +
                                                                                                                                  4210}
                                                                                                                                  +
                                                                                                                                  4211
                                                                                                                                  + +
                                                                                                                                  4213 const boost::asio::const_buffer& serialized_metadata,
                                                                                                                                  +
                                                                                                                                  4214 Error_code* err_code, const Peer_socket_options* sock_opts)
                                                                                                                                  +
                                                                                                                                  4215{
                                                                                                                                  +
                                                                                                                                  4216 namespace bind_ns = util::bind_ns;
                                                                                                                                  + +
                                                                                                                                  4218 bind_ns::cref(to), bind_ns::cref(max_wait), bind_ns::cref(serialized_metadata),
                                                                                                                                  +
                                                                                                                                  4219 _1, sock_opts);
                                                                                                                                  +
                                                                                                                                  4220 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  4221
                                                                                                                                  +
                                                                                                                                  4222 using util::bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  4223
                                                                                                                                  +
                                                                                                                                  4224 // We are in thread U != W.
                                                                                                                                  +
                                                                                                                                  4225
                                                                                                                                  +
                                                                                                                                  4226 /* This is actually pretty simple. All we want to do is connect(), which is non-blocking, and
                                                                                                                                  +
                                                                                                                                  4227 * then block until the connection is ready (at least according to our side). Ready means that
                                                                                                                                  +
                                                                                                                                  4228 * the socket is Writable (since user has no access to the socket yet, nothing can be loading
                                                                                                                                  +
                                                                                                                                  4229 * data onto the Send buffer, and obviously the congestion window is clear, so it must be
                                                                                                                                  +
                                                                                                                                  4230 * Writable). Note that, like BSD sockets, we specifically don't consider a socket Writable
                                                                                                                                  +
                                                                                                                                  4231 * until in ESTABLISHED internal state. */
                                                                                                                                  +
                                                                                                                                  4232
                                                                                                                                  +
                                                                                                                                  4233 /* For the "block until Writable" part, create and load the Event_set. Do this before connect(),
                                                                                                                                  +
                                                                                                                                  4234 * so that if it fails we don't have to then clean up the socket before returning error to user. */
                                                                                                                                  +
                                                                                                                                  4235
                                                                                                                                  +
                                                                                                                                  4236 const Event_set::Ptr event_set = event_set_create(err_code);
                                                                                                                                  +
                                                                                                                                  4237 if (!event_set)
                                                                                                                                  +
                                                                                                                                  4238 {
                                                                                                                                  +
                                                                                                                                  4239 assert(*err_code == error::Code::S_NODE_NOT_RUNNING);
                                                                                                                                  +
                                                                                                                                  4240 return Peer_socket::Ptr(); // *err_code is set.
                                                                                                                                  +
                                                                                                                                  4241 }
                                                                                                                                  +
                                                                                                                                  4242 // Now we know Node is running(); and we have event_set.
                                                                                                                                  +
                                                                                                                                  4243
                                                                                                                                  +
                                                                                                                                  4244 // We must clean up event_set at any return point below.
                                                                                                                                  +
                                                                                                                                  4245 Error_code dummy_prevents_throw;
                                                                                                                                  +
                                                                                                                                  4246 util::Auto_cleanup event_set_cleanup = util::setup_auto_cleanup([&]()
                                                                                                                                  +
                                                                                                                                  4247 {
                                                                                                                                  +
                                                                                                                                  4248 // Eat any error when closing Event_set, as it's unlikely and not interesting to user.
                                                                                                                                  +
                                                                                                                                  4249 event_set->close(&dummy_prevents_throw);
                                                                                                                                  +
                                                                                                                                  4250 });
                                                                                                                                  +
                                                                                                                                  4251
                                                                                                                                  +
                                                                                                                                  4252 const auto sock = connect_with_metadata(to, serialized_metadata, err_code, sock_opts);
                                                                                                                                  +
                                                                                                                                  4253 if (!sock)
                                                                                                                                  +
                                                                                                                                  4254 {
                                                                                                                                  +
                                                                                                                                  4255 return sock; // *err_code is set. It's probably some user error like an invalid destination.
                                                                                                                                  +
                                                                                                                                  4256 }
                                                                                                                                  +
                                                                                                                                  4257 // else we have a socket that has started connecting.
                                                                                                                                  +
                                                                                                                                  4258
                                                                                                                                  +
                                                                                                                                  4259 /* We must clean up sock (call sock->close_abruptly(&dummy_prevents_throw)) at any return point (including
                                                                                                                                  +
                                                                                                                                  4260 * exception throw) below, EXCEPT the success case. Because of the latter, we can't use the
                                                                                                                                  +
                                                                                                                                  4261 * auto_cleanup trick we used on event_set. So, we'll just have to handle sock cleanup
                                                                                                                                  +
                                                                                                                                  4262 * manually. */
                                                                                                                                  +
                                                                                                                                  4263
                                                                                                                                  +
                                                                                                                                  4264 // Add the one event about which we care.
                                                                                                                                  +
                                                                                                                                  4265 bool result = event_set->add_wanted_socket<Peer_socket>(sock, Event_set::Event_type::S_PEER_SOCKET_WRITABLE,
                                                                                                                                  +
                                                                                                                                  4266 &dummy_prevents_throw);
                                                                                                                                  +
                                                                                                                                  4267 assert(result); // Node is running, so there's no way that should have failed.
                                                                                                                                  +
                                                                                                                                  4268
                                                                                                                                  +
                                                                                                                                  4269 // Wait for Writable.
                                                                                                                                  +
                                                                                                                                  4270 result = event_set->sync_wait(max_wait, err_code);
                                                                                                                                  +
                                                                                                                                  4271 if (!result)
                                                                                                                                  +
                                                                                                                                  4272 {
                                                                                                                                  +
                                                                                                                                  4273 if (*err_code == error::Code::S_EVENT_SET_CLOSED)
                                                                                                                                  +
                                                                                                                                  4274 {
                                                                                                                                  +
                                                                                                                                  4275 // It's unlikely, but I guess someone could have destroyed Node during the wait (we do allow that during sleep).
                                                                                                                                  + +
                                                                                                                                  4277 }
                                                                                                                                  +
                                                                                                                                  4278 else
                                                                                                                                  +
                                                                                                                                  4279 {
                                                                                                                                  +
                                                                                                                                  4280 // This is quite common and is analogous to POSIX's EINTR semantics (signal interrupted the blocking call).
                                                                                                                                  +
                                                                                                                                  4281 assert(*err_code == error::Code::S_WAIT_INTERRUPTED);
                                                                                                                                  +
                                                                                                                                  4282 }
                                                                                                                                  4283
                                                                                                                                  -
                                                                                                                                  4284 // OK; either that returned 1 event, or 0 events (timeout).
                                                                                                                                  -
                                                                                                                                  4285 const bool ready = event_set->events_detected(err_code);
                                                                                                                                  -
                                                                                                                                  4286 /* Node had not been destroyed by the time sync_wait() finished, and we don't allow simultaneous
                                                                                                                                  -
                                                                                                                                  4287 * ~Node() outside a blocking sleep (see notes in class Node doc header). The only way this
                                                                                                                                  -
                                                                                                                                  4288 * failed is if Event_set was closed, and that could only happen if Node was destroyed. */
                                                                                                                                  -
                                                                                                                                  4289 assert(!*err_code);
                                                                                                                                  -
                                                                                                                                  4290
                                                                                                                                  -
                                                                                                                                  4291 if (ready)
                                                                                                                                  -
                                                                                                                                  4292 {
                                                                                                                                  -
                                                                                                                                  4293 /* Didn't time out; socket is Writable. However, that does not mean it's Writable for "good"
                                                                                                                                  -
                                                                                                                                  4294 * reasons. If an error was encountered since the original non-blocking connect (e.g., RST
                                                                                                                                  -
                                                                                                                                  4295 * received; or handshake timeout expired), then it is now Writable, but any operation like
                                                                                                                                  -
                                                                                                                                  4296 * send() or receive() will immediately yield an error. If that is the case,
                                                                                                                                  -
                                                                                                                                  4297 * close_connection_immediately() has set user-visible state to S_CLOSED. So let's check for
                                                                                                                                  -
                                                                                                                                  4298 * it and return an error in that case.
                                                                                                                                  -
                                                                                                                                  4299 *
                                                                                                                                  -
                                                                                                                                  4300 * We could also not; pretend socket is ready and let user discover error when trying to
                                                                                                                                  -
                                                                                                                                  4301 * transmit. However it seems like a good property to help him out. */
                                                                                                                                  -
                                                                                                                                  4302
                                                                                                                                  -
                                                                                                                                  4303 if (sock->state() == Peer_socket::State::S_CLOSED)
                                                                                                                                  -
                                                                                                                                  4304 {
                                                                                                                                  -
                                                                                                                                  4305 // No need to cleanup socket; it is already closed.
                                                                                                                                  -
                                                                                                                                  4306
                                                                                                                                  -
                                                                                                                                  4307 // Return error as above.
                                                                                                                                  -
                                                                                                                                  4308 *err_code = sock->m_disconnect_cause; // No need to lock; m_disconnect_cause set and can't change later.
                                                                                                                                  -
                                                                                                                                  4309 return Peer_socket::Ptr();
                                                                                                                                  -
                                                                                                                                  4310 }
                                                                                                                                  -
                                                                                                                                  4311 // else it's probably really ready for action.
                                                                                                                                  +
                                                                                                                                  4284 // Clean up (as discussed above).
                                                                                                                                  +
                                                                                                                                  4285 sock->close_abruptly(&dummy_prevents_throw); // Eat any error; user doesn't care.
                                                                                                                                  +
                                                                                                                                  4286 return Peer_socket::Ptr(); // *err_code is set.
                                                                                                                                  +
                                                                                                                                  4287 } // if (sync_wait() failed)
                                                                                                                                  +
                                                                                                                                  4288 // else we know event_set is still open, and sync_wait() succeeded.
                                                                                                                                  +
                                                                                                                                  4289
                                                                                                                                  +
                                                                                                                                  4290 // OK; either that returned 1 event, or 0 events (timeout).
                                                                                                                                  +
                                                                                                                                  4291 const bool ready = event_set->events_detected(err_code);
                                                                                                                                  +
                                                                                                                                  4292 /* Node had not been destroyed by the time sync_wait() finished, and we don't allow simultaneous
                                                                                                                                  +
                                                                                                                                  4293 * ~Node() outside a blocking sleep (see notes in class Node doc header). The only way this
                                                                                                                                  +
                                                                                                                                  4294 * failed is if Event_set was closed, and that could only happen if Node was destroyed. */
                                                                                                                                  +
                                                                                                                                  4295 assert(!*err_code);
                                                                                                                                  +
                                                                                                                                  4296
                                                                                                                                  +
                                                                                                                                  4297 if (ready)
                                                                                                                                  +
                                                                                                                                  4298 {
                                                                                                                                  +
                                                                                                                                  4299 /* Didn't time out; socket is Writable. However, that does not mean it's Writable for "good"
                                                                                                                                  +
                                                                                                                                  4300 * reasons. If an error was encountered since the original non-blocking connect (e.g., RST
                                                                                                                                  +
                                                                                                                                  4301 * received; or handshake timeout expired), then it is now Writable, but any operation like
                                                                                                                                  +
                                                                                                                                  4302 * send() or receive() will immediately yield an error. If that is the case,
                                                                                                                                  +
                                                                                                                                  4303 * close_connection_immediately() has set user-visible state to S_CLOSED. So let's check for
                                                                                                                                  +
                                                                                                                                  4304 * it and return an error in that case.
                                                                                                                                  +
                                                                                                                                  4305 *
                                                                                                                                  +
                                                                                                                                  4306 * We could also not; pretend socket is ready and let user discover error when trying to
                                                                                                                                  +
                                                                                                                                  4307 * transmit. However it seems like a good property to help him out. */
                                                                                                                                  +
                                                                                                                                  4308
                                                                                                                                  +
                                                                                                                                  4309 if (sock->state() == Peer_socket::State::S_CLOSED)
                                                                                                                                  +
                                                                                                                                  4310 {
                                                                                                                                  +
                                                                                                                                  4311 // No need to cleanup socket; it is already closed.
                                                                                                                                  4312
                                                                                                                                  -
                                                                                                                                  4313 return sock; // *err_code is success.
                                                                                                                                  -
                                                                                                                                  4314 }
                                                                                                                                  -
                                                                                                                                  4315 // else
                                                                                                                                  -
                                                                                                                                  4316
                                                                                                                                  -
                                                                                                                                  4317 // Timed out! Clean up socket, as above, and return null with a specific error (as advertised).
                                                                                                                                  -
                                                                                                                                  4318 sock->close_abruptly(&dummy_prevents_throw);
                                                                                                                                  - -
                                                                                                                                  4320 return Peer_socket::Ptr();
                                                                                                                                  -
                                                                                                                                  4321} // Node::sync_connect_impl()
                                                                                                                                  +
                                                                                                                                  4313 // Return error as above.
                                                                                                                                  +
                                                                                                                                  4314 *err_code = sock->m_disconnect_cause; // No need to lock; m_disconnect_cause set and can't change later.
                                                                                                                                  +
                                                                                                                                  4315 return Peer_socket::Ptr();
                                                                                                                                  +
                                                                                                                                  4316 }
                                                                                                                                  +
                                                                                                                                  4317 // else it's probably really ready for action.
                                                                                                                                  +
                                                                                                                                  4318
                                                                                                                                  +
                                                                                                                                  4319 return sock; // *err_code is success.
                                                                                                                                  +
                                                                                                                                  4320 }
                                                                                                                                  +
                                                                                                                                  4321 // else
                                                                                                                                  4322
                                                                                                                                  -
                                                                                                                                  4323void Node::setup_connection_timers(const Socket_id& socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  -
                                                                                                                                  4324{
                                                                                                                                  - - -
                                                                                                                                  4327 using boost::chrono::microseconds;
                                                                                                                                  -
                                                                                                                                  4328 using boost::chrono::duration_cast;
                                                                                                                                  -
                                                                                                                                  4329 using boost::weak_ptr;
                                                                                                                                  -
                                                                                                                                  4330
                                                                                                                                  -
                                                                                                                                  4331 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  4332
                                                                                                                                  -
                                                                                                                                  4333 Fine_duration rexmit_from_now = sock->opt(sock->m_opts.m_st_connect_retransmit_period);
                                                                                                                                  -
                                                                                                                                  4334
                                                                                                                                  -
                                                                                                                                  4335 // Finalize the retransmit scheduled task firing time; and update the # retries statistic.
                                                                                                                                  -
                                                                                                                                  4336 if (!initial)
                                                                                                                                  -
                                                                                                                                  4337 {
                                                                                                                                  -
                                                                                                                                  4338 assert(scheduled_task_fired(get_logger(), sock->m_init_rexmit_scheduled_task));
                                                                                                                                  -
                                                                                                                                  4339
                                                                                                                                  -
                                                                                                                                  4340 ++sock->m_init_rexmit_count;
                                                                                                                                  -
                                                                                                                                  4341 /* This is a bit more precise than leaving rexmit_from_now alone, as it counts from when firing was
                                                                                                                                  -
                                                                                                                                  4342 * actually scheduled, vs. when the timer was actually triggered by boost.asio. The 2nd addend should be a bit
                                                                                                                                  -
                                                                                                                                  4343 * negative and thus decrease rexmit_from_now a bit. */
                                                                                                                                  -
                                                                                                                                  4344 rexmit_from_now += scheduled_task_fires_from_now_or_canceled(get_logger(), sock->m_init_rexmit_scheduled_task);
                                                                                                                                  -
                                                                                                                                  4345 /* @todo RFC 6298 mandates that this must be doubled after each attempt instead of keeping
                                                                                                                                  -
                                                                                                                                  4346 * the same value. Doesn't mean we should follow it. */
                                                                                                                                  -
                                                                                                                                  4347 }
                                                                                                                                  -
                                                                                                                                  4348
                                                                                                                                  -
                                                                                                                                  4349 // Firing time is set; start timer. Call that body when task fires, unless it is first canceled.
                                                                                                                                  -
                                                                                                                                  4350 sock->m_init_rexmit_scheduled_task
                                                                                                                                  -
                                                                                                                                  4351 = schedule_task_from_now(get_logger(), rexmit_from_now, true, &m_task_engine,
                                                                                                                                  -
                                                                                                                                  4352 [this, socket_id,
                                                                                                                                  -
                                                                                                                                  4353 sock_observer = weak_ptr<Peer_socket>(sock)]
                                                                                                                                  -
                                                                                                                                  4354 (bool)
                                                                                                                                  -
                                                                                                                                  4355 {
                                                                                                                                  -
                                                                                                                                  4356 auto sock = sock_observer.lock();
                                                                                                                                  -
                                                                                                                                  4357 if (sock)
                                                                                                                                  -
                                                                                                                                  4358 {
                                                                                                                                  -
                                                                                                                                  4359 handle_connection_rexmit_timer_event(socket_id, sock);
                                                                                                                                  -
                                                                                                                                  4360 }
                                                                                                                                  -
                                                                                                                                  4361 // else { Possible or not, allow for this possibility for maintainability. }
                                                                                                                                  -
                                                                                                                                  4362 });
                                                                                                                                  -
                                                                                                                                  4363
                                                                                                                                  -
                                                                                                                                  4364 // Also set up the timeout that will stop these retries from happening.
                                                                                                                                  -
                                                                                                                                  4365 if (initial)
                                                                                                                                  -
                                                                                                                                  4366 {
                                                                                                                                  -
                                                                                                                                  4367 sock->m_connection_timeout_scheduled_task
                                                                                                                                  - -
                                                                                                                                  4369 sock->opt(sock->m_opts.m_st_connect_retransmit_timeout),
                                                                                                                                  -
                                                                                                                                  4370 true, &m_task_engine,
                                                                                                                                  -
                                                                                                                                  4371 [this, socket_id,
                                                                                                                                  -
                                                                                                                                  4372 sock_observer = weak_ptr<Peer_socket>(sock)]
                                                                                                                                  -
                                                                                                                                  4373 (bool)
                                                                                                                                  -
                                                                                                                                  4374 {
                                                                                                                                  -
                                                                                                                                  4375 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  4376
                                                                                                                                  -
                                                                                                                                  4377 auto sock = sock_observer.lock();
                                                                                                                                  -
                                                                                                                                  4378 if (!sock)
                                                                                                                                  -
                                                                                                                                  4379 {
                                                                                                                                  -
                                                                                                                                  4380 return; // Possible or not, allow for this possibility for maintainability.
                                                                                                                                  -
                                                                                                                                  4381 }
                                                                                                                                  -
                                                                                                                                  4382 // else
                                                                                                                                  -
                                                                                                                                  4383
                                                                                                                                  -
                                                                                                                                  4384 FLOW_LOG_INFO("Connection handshake timeout timer [" << sock << "] has been triggered; was on "
                                                                                                                                  -
                                                                                                                                  4385 "attempt [" << (sock->m_init_rexmit_count + 1) << "].");
                                                                                                                                  -
                                                                                                                                  4386
                                                                                                                                  -
                                                                                                                                  4387 assert((sock->m_int_state == Peer_socket::Int_state::S_SYN_SENT)
                                                                                                                                  -
                                                                                                                                  4388 || (sock->m_int_state != Peer_socket::Int_state::S_SYN_RCVD));
                                                                                                                                  +
                                                                                                                                  4323 // Timed out! Clean up socket, as above, and return null with a specific error (as advertised).
                                                                                                                                  +
                                                                                                                                  4324 sock->close_abruptly(&dummy_prevents_throw);
                                                                                                                                  + +
                                                                                                                                  4326 return Peer_socket::Ptr();
                                                                                                                                  +
                                                                                                                                  4327} // Node::sync_connect_impl()
                                                                                                                                  +
                                                                                                                                  4328
                                                                                                                                  +
                                                                                                                                  4329void Node::setup_connection_timers(const Socket_id& socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  +
                                                                                                                                  4330{
                                                                                                                                  + + +
                                                                                                                                  4333 using boost::chrono::microseconds;
                                                                                                                                  +
                                                                                                                                  4334 using boost::chrono::duration_cast;
                                                                                                                                  +
                                                                                                                                  4335 using boost::weak_ptr;
                                                                                                                                  +
                                                                                                                                  4336
                                                                                                                                  +
                                                                                                                                  4337 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4338
                                                                                                                                  +
                                                                                                                                  4339 Fine_duration rexmit_from_now = sock->opt(sock->m_opts.m_st_connect_retransmit_period);
                                                                                                                                  +
                                                                                                                                  4340
                                                                                                                                  +
                                                                                                                                  4341 // Finalize the retransmit scheduled task firing time; and update the # retries statistic.
                                                                                                                                  +
                                                                                                                                  4342 if (!initial)
                                                                                                                                  +
                                                                                                                                  4343 {
                                                                                                                                  +
                                                                                                                                  4344 assert(scheduled_task_fired(get_logger(), sock->m_init_rexmit_scheduled_task));
                                                                                                                                  +
                                                                                                                                  4345
                                                                                                                                  +
                                                                                                                                  4346 ++sock->m_init_rexmit_count;
                                                                                                                                  +
                                                                                                                                  4347 /* This is a bit more precise than leaving rexmit_from_now alone, as it counts from when firing was
                                                                                                                                  +
                                                                                                                                  4348 * actually scheduled, vs. when the timer was actually triggered by boost.asio. The 2nd addend should be a bit
                                                                                                                                  +
                                                                                                                                  4349 * negative and thus decrease rexmit_from_now a bit. */
                                                                                                                                  +
                                                                                                                                  4350 rexmit_from_now += scheduled_task_fires_from_now_or_canceled(get_logger(), sock->m_init_rexmit_scheduled_task);
                                                                                                                                  +
                                                                                                                                  4351 /* @todo RFC 6298 mandates that this must be doubled after each attempt instead of keeping
                                                                                                                                  +
                                                                                                                                  4352 * the same value. Doesn't mean we should follow it. */
                                                                                                                                  +
                                                                                                                                  4353 }
                                                                                                                                  +
                                                                                                                                  4354
                                                                                                                                  +
                                                                                                                                  4355 // Firing time is set; start timer. Call that body when task fires, unless it is first canceled.
                                                                                                                                  +
                                                                                                                                  4356 sock->m_init_rexmit_scheduled_task
                                                                                                                                  +
                                                                                                                                  4357 = schedule_task_from_now(get_logger(), rexmit_from_now, true, &m_task_engine,
                                                                                                                                  +
                                                                                                                                  4358 [this, socket_id,
                                                                                                                                  +
                                                                                                                                  4359 sock_observer = weak_ptr<Peer_socket>(sock)]
                                                                                                                                  +
                                                                                                                                  4360 (bool)
                                                                                                                                  +
                                                                                                                                  4361 {
                                                                                                                                  +
                                                                                                                                  4362 auto sock = sock_observer.lock();
                                                                                                                                  +
                                                                                                                                  4363 if (sock)
                                                                                                                                  +
                                                                                                                                  4364 {
                                                                                                                                  +
                                                                                                                                  4365 handle_connection_rexmit_timer_event(socket_id, sock);
                                                                                                                                  +
                                                                                                                                  4366 }
                                                                                                                                  +
                                                                                                                                  4367 // else { Possible or not, allow for this possibility for maintainability. }
                                                                                                                                  +
                                                                                                                                  4368 });
                                                                                                                                  +
                                                                                                                                  4369
                                                                                                                                  +
                                                                                                                                  4370 // Also set up the timeout that will stop these retries from happening.
                                                                                                                                  +
                                                                                                                                  4371 if (initial)
                                                                                                                                  +
                                                                                                                                  4372 {
                                                                                                                                  +
                                                                                                                                  4373 sock->m_connection_timeout_scheduled_task
                                                                                                                                  + +
                                                                                                                                  4375 sock->opt(sock->m_opts.m_st_connect_retransmit_timeout),
                                                                                                                                  +
                                                                                                                                  4376 true, &m_task_engine,
                                                                                                                                  +
                                                                                                                                  4377 [this, socket_id,
                                                                                                                                  +
                                                                                                                                  4378 sock_observer = weak_ptr<Peer_socket>(sock)]
                                                                                                                                  +
                                                                                                                                  4379 (bool)
                                                                                                                                  +
                                                                                                                                  4380 {
                                                                                                                                  +
                                                                                                                                  4381 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4382
                                                                                                                                  +
                                                                                                                                  4383 auto sock = sock_observer.lock();
                                                                                                                                  +
                                                                                                                                  4384 if (!sock)
                                                                                                                                  +
                                                                                                                                  4385 {
                                                                                                                                  +
                                                                                                                                  4386 return; // Possible or not, allow for this possibility for maintainability.
                                                                                                                                  +
                                                                                                                                  4387 }
                                                                                                                                  +
                                                                                                                                  4388 // else
                                                                                                                                  4389
                                                                                                                                  -
                                                                                                                                  4390 // Timeout. Give up. Send RST, in case they do come to their senses -- but it's too late for us.
                                                                                                                                  -
                                                                                                                                  4391
                                                                                                                                  -
                                                                                                                                  4392 /* Close connection in our structures and inform user. Pre-conditions
                                                                                                                                  -
                                                                                                                                  4393 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  -
                                                                                                                                  4394 * S_SYN_SENT/RCVD); err_code contains the reason for the close (yes). */
                                                                                                                                  -
                                                                                                                                  4395 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_CONN_TIMEOUT, false);
                                                                                                                                  -
                                                                                                                                  4396 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  -
                                                                                                                                  4397 * send_worker_check_state(). */
                                                                                                                                  -
                                                                                                                                  4398 });
                                                                                                                                  -
                                                                                                                                  4399 } // if (initial)
                                                                                                                                  -
                                                                                                                                  4400} // Node::setup_connection_timers()
                                                                                                                                  -
                                                                                                                                  4401
                                                                                                                                  - -
                                                                                                                                  4403{
                                                                                                                                  -
                                                                                                                                  4404 using util::Blob;
                                                                                                                                  -
                                                                                                                                  4405
                                                                                                                                  -
                                                                                                                                  4406 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4390 FLOW_LOG_INFO("Connection handshake timeout timer [" << sock << "] has been triggered; was on "
                                                                                                                                  +
                                                                                                                                  4391 "attempt [" << (sock->m_init_rexmit_count + 1) << "].");
                                                                                                                                  +
                                                                                                                                  4392
                                                                                                                                  +
                                                                                                                                  4393 assert((sock->m_int_state == Peer_socket::Int_state::S_SYN_SENT)
                                                                                                                                  +
                                                                                                                                  4394 || (sock->m_int_state != Peer_socket::Int_state::S_SYN_RCVD));
                                                                                                                                  +
                                                                                                                                  4395
                                                                                                                                  +
                                                                                                                                  4396 // Timeout. Give up. Send RST, in case they do come to their senses -- but it's too late for us.
                                                                                                                                  +
                                                                                                                                  4397
                                                                                                                                  +
                                                                                                                                  4398 /* Close connection in our structures and inform user. Pre-conditions
                                                                                                                                  +
                                                                                                                                  4399 * assumed by call: sock in m_socks and sock->state() == S_OPEN (yes, since m_int_state ==
                                                                                                                                  +
                                                                                                                                  4400 * S_SYN_SENT/RCVD); err_code contains the reason for the close (yes). */
                                                                                                                                  +
                                                                                                                                  4401 rst_and_close_connection_immediately(socket_id, sock, error::Code::S_CONN_TIMEOUT, false);
                                                                                                                                  +
                                                                                                                                  4402 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  +
                                                                                                                                  4403 * send_worker_check_state(). */
                                                                                                                                  +
                                                                                                                                  4404 });
                                                                                                                                  +
                                                                                                                                  4405 } // if (initial)
                                                                                                                                  +
                                                                                                                                  4406} // Node::setup_connection_timers()
                                                                                                                                  4407
                                                                                                                                  -
                                                                                                                                  4408 assert((sock->m_int_state == Peer_socket::Int_state::S_SYN_SENT)
                                                                                                                                  -
                                                                                                                                  4409 || (sock->m_int_state != Peer_socket::Int_state::S_SYN_RCVD));
                                                                                                                                  -
                                                                                                                                  4410
                                                                                                                                  -
                                                                                                                                  4411 // Not an error (so not WARNING), but it's rare and interesting enough for INFO.
                                                                                                                                  -
                                                                                                                                  4412 FLOW_LOG_INFO("Connection handshake retransmit timer [" << sock << "] triggered; was on "
                                                                                                                                  -
                                                                                                                                  4413 "attempt [" << (sock->m_init_rexmit_count + 1) << "].");
                                                                                                                                  -
                                                                                                                                  4414
                                                                                                                                  -
                                                                                                                                  4415 // Try again. Reproduce the SYN or SYN_ACK... but first set up the next timer.
                                                                                                                                  + +
                                                                                                                                  4409{
                                                                                                                                  +
                                                                                                                                  4410 using util::Blob;
                                                                                                                                  +
                                                                                                                                  4411
                                                                                                                                  +
                                                                                                                                  4412 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4413
                                                                                                                                  +
                                                                                                                                  4414 assert((sock->m_int_state == Peer_socket::Int_state::S_SYN_SENT)
                                                                                                                                  +
                                                                                                                                  4415 || (sock->m_int_state != Peer_socket::Int_state::S_SYN_RCVD));
                                                                                                                                  4416
                                                                                                                                  -
                                                                                                                                  4417 // Setup the next timer before sending packet for the same reason as in the original SYN/SYN_ACK-sending code.
                                                                                                                                  -
                                                                                                                                  4418 setup_connection_timers(socket_id, sock, false);
                                                                                                                                  -
                                                                                                                                  4419
                                                                                                                                  -
                                                                                                                                  4420 /* Send packet.
                                                                                                                                  -
                                                                                                                                  4421 * @todo More code reuse? Or save the serialized version inside socket and resend here verbatim? */
                                                                                                                                  +
                                                                                                                                  4417 // Not an error (so not WARNING), but it's rare and interesting enough for INFO.
                                                                                                                                  +
                                                                                                                                  4418 FLOW_LOG_INFO("Connection handshake retransmit timer [" << sock << "] triggered; was on "
                                                                                                                                  +
                                                                                                                                  4419 "attempt [" << (sock->m_init_rexmit_count + 1) << "].");
                                                                                                                                  +
                                                                                                                                  4420
                                                                                                                                  +
                                                                                                                                  4421 // Try again. Reproduce the SYN or SYN_ACK... but first set up the next timer.
                                                                                                                                  4422
                                                                                                                                  -
                                                                                                                                  4423 Low_lvl_packet::Ptr re_syn_base;
                                                                                                                                  -
                                                                                                                                  4424 if (sock->m_active_connect)
                                                                                                                                  -
                                                                                                                                  4425 {
                                                                                                                                  -
                                                                                                                                  4426 auto syn = create_syn(sock);
                                                                                                                                  -
                                                                                                                                  4427 re_syn_base = Low_lvl_packet::ptr_cast(syn);
                                                                                                                                  -
                                                                                                                                  4428 }
                                                                                                                                  -
                                                                                                                                  4429 else
                                                                                                                                  -
                                                                                                                                  4430 {
                                                                                                                                  -
                                                                                                                                  4431 // (Subtlety: As of this writing it wouldn't have changed since original SYN_ACK, but safe>sorry.)
                                                                                                                                  -
                                                                                                                                  4432 sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  4433
                                                                                                                                  -
                                                                                                                                  4434 auto syn_ack = create_syn_ack(sock);
                                                                                                                                  -
                                                                                                                                  4435 re_syn_base = Low_lvl_packet::ptr_cast(syn_ack);
                                                                                                                                  -
                                                                                                                                  4436 }
                                                                                                                                  -
                                                                                                                                  4437
                                                                                                                                  -
                                                                                                                                  4438 // Fill out common fields and asynchronously send packet.
                                                                                                                                  -
                                                                                                                                  4439 if (!async_sock_low_lvl_packet_send_or_close_immediately(sock, std::move(re_syn_base), false))
                                                                                                                                  -
                                                                                                                                  4440 {
                                                                                                                                  -
                                                                                                                                  4441 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  -
                                                                                                                                  4442 * send_worker_check_state(). */
                                                                                                                                  -
                                                                                                                                  4443 return;
                                                                                                                                  -
                                                                                                                                  4444 }
                                                                                                                                  -
                                                                                                                                  4445} // Node::handle_connection_rexmit_timer_event()
                                                                                                                                  -
                                                                                                                                  4446
                                                                                                                                  - -
                                                                                                                                  4448{
                                                                                                                                  - - -
                                                                                                                                  4451
                                                                                                                                  -
                                                                                                                                  4452 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  4453
                                                                                                                                  -
                                                                                                                                  4454 /* Cancel any timers. Note that this will NOT prevent a given timer's handler from running.
                                                                                                                                  -
                                                                                                                                  4455 * It will try to make it run ASAP with operation_aborted error code. However, it may not even
                                                                                                                                  -
                                                                                                                                  4456 * succeed in that. In particular, if by the time the current handler started the timer handler
                                                                                                                                  -
                                                                                                                                  4457 * event was already queued inside m_task_engine, then canceling the timer now will not load
                                                                                                                                  -
                                                                                                                                  4458 * operation_aborted into the handler call; it will instead fire as if the timer really expired
                                                                                                                                  -
                                                                                                                                  4459 * (which it did). Therefore the timer handler should be careful to check the state of the socket
                                                                                                                                  -
                                                                                                                                  4460 * and exit if the state is not suitable (in this case, S_CLOSED).
                                                                                                                                  -
                                                                                                                                  4461 *
                                                                                                                                  -
                                                                                                                                  4462 * Even so, try to cancel with operation_aborted just to cut down on entropy a bit (at least by
                                                                                                                                  -
                                                                                                                                  4463 * executing all handlers ASAP).
                                                                                                                                  -
                                                                                                                                  4464 *
                                                                                                                                  -
                                                                                                                                  4465 * Update: However, scheduled_task_cancel() will indeed cleanly cancel. `Timer`s are still in direct use
                                                                                                                                  -
                                                                                                                                  4466 * as well however, so the above still applies to some of the below. */
                                                                                                                                  -
                                                                                                                                  4467
                                                                                                                                  -
                                                                                                                                  4468 sock->m_rcv_delayed_ack_timer.cancel();
                                                                                                                                  -
                                                                                                                                  4469 sock->m_snd_pacing_data.m_slice_timer.cancel();
                                                                                                                                  -
                                                                                                                                  4470
                                                                                                                                  -
                                                                                                                                  4471 if (sock->m_init_rexmit_scheduled_task)
                                                                                                                                  -
                                                                                                                                  4472 {
                                                                                                                                  -
                                                                                                                                  4473 scheduled_task_cancel(get_logger(), sock->m_init_rexmit_scheduled_task);
                                                                                                                                  -
                                                                                                                                  4474 sock->m_init_rexmit_scheduled_task = Scheduled_task_handle();
                                                                                                                                  -
                                                                                                                                  4475 }
                                                                                                                                  -
                                                                                                                                  4476 if (sock->m_connection_timeout_scheduled_task)
                                                                                                                                  -
                                                                                                                                  4477 {
                                                                                                                                  -
                                                                                                                                  4478 scheduled_task_cancel(get_logger(), sock->m_connection_timeout_scheduled_task);
                                                                                                                                  -
                                                                                                                                  4479 sock->m_connection_timeout_scheduled_task = Scheduled_task_handle();
                                                                                                                                  -
                                                                                                                                  4480 }
                                                                                                                                  -
                                                                                                                                  4481 if (sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  -
                                                                                                                                  4482 {
                                                                                                                                  -
                                                                                                                                  4483 scheduled_task_cancel(get_logger(), sock->m_rcv_wnd_recovery_scheduled_task);
                                                                                                                                  -
                                                                                                                                  4484 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  -
                                                                                                                                  4485 }
                                                                                                                                  -
                                                                                                                                  4486
                                                                                                                                  -
                                                                                                                                  4487 if (sock->m_snd_drop_timer)
                                                                                                                                  +
                                                                                                                                  4423 // Setup the next timer before sending packet for the same reason as in the original SYN/SYN_ACK-sending code.
                                                                                                                                  +
                                                                                                                                  4424 setup_connection_timers(socket_id, sock, false);
                                                                                                                                  +
                                                                                                                                  4425
                                                                                                                                  +
                                                                                                                                  4426 /* Send packet.
                                                                                                                                  +
                                                                                                                                  4427 * @todo More code reuse? Or save the serialized version inside socket and resend here verbatim? */
                                                                                                                                  +
                                                                                                                                  4428
                                                                                                                                  +
                                                                                                                                  4429 Low_lvl_packet::Ptr re_syn_base;
                                                                                                                                  +
                                                                                                                                  4430 if (sock->m_active_connect)
                                                                                                                                  +
                                                                                                                                  4431 {
                                                                                                                                  +
                                                                                                                                  4432 auto syn = create_syn(sock);
                                                                                                                                  +
                                                                                                                                  4433 re_syn_base = Low_lvl_packet::ptr_cast(syn);
                                                                                                                                  +
                                                                                                                                  4434 }
                                                                                                                                  +
                                                                                                                                  4435 else
                                                                                                                                  +
                                                                                                                                  4436 {
                                                                                                                                  +
                                                                                                                                  4437 // (Subtlety: As of this writing it wouldn't have changed since original SYN_ACK, but safe>sorry.)
                                                                                                                                  +
                                                                                                                                  4438 sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  +
                                                                                                                                  4439
                                                                                                                                  +
                                                                                                                                  4440 auto syn_ack = create_syn_ack(sock);
                                                                                                                                  +
                                                                                                                                  4441 re_syn_base = Low_lvl_packet::ptr_cast(syn_ack);
                                                                                                                                  +
                                                                                                                                  4442 }
                                                                                                                                  +
                                                                                                                                  4443
                                                                                                                                  +
                                                                                                                                  4444 // Fill out common fields and asynchronously send packet.
                                                                                                                                  +
                                                                                                                                  4445 if (!async_sock_low_lvl_packet_send_or_close_immediately(sock, std::move(re_syn_base), false))
                                                                                                                                  +
                                                                                                                                  4446 {
                                                                                                                                  +
                                                                                                                                  4447 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  +
                                                                                                                                  4448 * send_worker_check_state(). */
                                                                                                                                  +
                                                                                                                                  4449 return;
                                                                                                                                  +
                                                                                                                                  4450 }
                                                                                                                                  +
                                                                                                                                  4451} // Node::handle_connection_rexmit_timer_event()
                                                                                                                                  +
                                                                                                                                  4452
                                                                                                                                  + +
                                                                                                                                  4454{
                                                                                                                                  + + +
                                                                                                                                  4457
                                                                                                                                  +
                                                                                                                                  4458 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4459
                                                                                                                                  +
                                                                                                                                  4460 /* Cancel any timers. Note that this will NOT prevent a given timer's handler from running.
                                                                                                                                  +
                                                                                                                                  4461 * It will try to make it run ASAP with operation_aborted error code. However, it may not even
                                                                                                                                  +
                                                                                                                                  4462 * succeed in that. In particular, if by the time the current handler started the timer handler
                                                                                                                                  +
                                                                                                                                  4463 * event was already queued inside m_task_engine, then canceling the timer now will not load
                                                                                                                                  +
                                                                                                                                  4464 * operation_aborted into the handler call; it will instead fire as if the timer really expired
                                                                                                                                  +
                                                                                                                                  4465 * (which it did). Therefore the timer handler should be careful to check the state of the socket
                                                                                                                                  +
                                                                                                                                  4466 * and exit if the state is not suitable (in this case, S_CLOSED).
                                                                                                                                  +
                                                                                                                                  4467 *
                                                                                                                                  +
                                                                                                                                  4468 * Even so, try to cancel with operation_aborted just to cut down on entropy a bit (at least by
                                                                                                                                  +
                                                                                                                                  4469 * executing all handlers ASAP).
                                                                                                                                  +
                                                                                                                                  4470 *
                                                                                                                                  +
                                                                                                                                  4471 * Update: However, scheduled_task_cancel() will indeed cleanly cancel. `Timer`s are still in direct use
                                                                                                                                  +
                                                                                                                                  4472 * as well however, so the above still applies to some of the below. */
                                                                                                                                  +
                                                                                                                                  4473
                                                                                                                                  +
                                                                                                                                  4474 sock->m_rcv_delayed_ack_timer.cancel();
                                                                                                                                  +
                                                                                                                                  4475 sock->m_snd_pacing_data.m_slice_timer.cancel();
                                                                                                                                  +
                                                                                                                                  4476
                                                                                                                                  +
                                                                                                                                  4477 if (sock->m_init_rexmit_scheduled_task)
                                                                                                                                  +
                                                                                                                                  4478 {
                                                                                                                                  +
                                                                                                                                  4479 scheduled_task_cancel(get_logger(), sock->m_init_rexmit_scheduled_task);
                                                                                                                                  +
                                                                                                                                  4480 sock->m_init_rexmit_scheduled_task = Scheduled_task_handle();
                                                                                                                                  +
                                                                                                                                  4481 }
                                                                                                                                  +
                                                                                                                                  4482 if (sock->m_connection_timeout_scheduled_task)
                                                                                                                                  +
                                                                                                                                  4483 {
                                                                                                                                  +
                                                                                                                                  4484 scheduled_task_cancel(get_logger(), sock->m_connection_timeout_scheduled_task);
                                                                                                                                  +
                                                                                                                                  4485 sock->m_connection_timeout_scheduled_task = Scheduled_task_handle();
                                                                                                                                  +
                                                                                                                                  4486 }
                                                                                                                                  +
                                                                                                                                  4487 if (sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  4488 {
                                                                                                                                  -
                                                                                                                                  4489 // This Drop_timer guy actually will prevent any callbacks from firing.
                                                                                                                                  -
                                                                                                                                  4490 sock->m_snd_drop_timer->done();
                                                                                                                                  -
                                                                                                                                  4491
                                                                                                                                  -
                                                                                                                                  4492 /* The two `shared_ptr`s (sock and m_snd_drop_timer) point to each other. Nullify this to break the cycle
                                                                                                                                  -
                                                                                                                                  4493 * and thus avoid memory leak. */
                                                                                                                                  -
                                                                                                                                  4494 sock->m_snd_drop_timer.reset();
                                                                                                                                  -
                                                                                                                                  4495 }
                                                                                                                                  -
                                                                                                                                  4496}
                                                                                                                                  +
                                                                                                                                  4489 scheduled_task_cancel(get_logger(), sock->m_rcv_wnd_recovery_scheduled_task);
                                                                                                                                  +
                                                                                                                                  4490 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  +
                                                                                                                                  4491 }
                                                                                                                                  +
                                                                                                                                  4492
                                                                                                                                  +
                                                                                                                                  4493 if (sock->m_snd_drop_timer)
                                                                                                                                  +
                                                                                                                                  4494 {
                                                                                                                                  +
                                                                                                                                  4495 // This Drop_timer guy actually will prevent any callbacks from firing.
                                                                                                                                  +
                                                                                                                                  4496 sock->m_snd_drop_timer->done();
                                                                                                                                  4497
                                                                                                                                  - -
                                                                                                                                  4499{
                                                                                                                                  -
                                                                                                                                  4500 sock->m_snd_drop_timeout = sock->opt(sock->m_opts.m_st_init_drop_timeout);
                                                                                                                                  -
                                                                                                                                  4501
                                                                                                                                  -
                                                                                                                                  4502 const auto on_fail = [this, socket_id, sock](const Error_code& err_code)
                                                                                                                                  -
                                                                                                                                  4503 {
                                                                                                                                  -
                                                                                                                                  4504 rst_and_close_connection_immediately(socket_id, sock, err_code, false);
                                                                                                                                  -
                                                                                                                                  4505 // ^-- defer_delta_check == false: for similar reason as when calling send_worker() from send_worker_check_state().
                                                                                                                                  -
                                                                                                                                  4506 };
                                                                                                                                  -
                                                                                                                                  4507 const auto on_timer = [this, socket_id, sock](bool drop_all_packets)
                                                                                                                                  -
                                                                                                                                  4508 {
                                                                                                                                  -
                                                                                                                                  4509 drop_timer_action(sock, drop_all_packets);
                                                                                                                                  -
                                                                                                                                  4510 };
                                                                                                                                  -
                                                                                                                                  4511
                                                                                                                                  -
                                                                                                                                  4512 /* Set up the Drop Timer. Basically give it some key fields of sock (DTO value, the In-flight
                                                                                                                                  -
                                                                                                                                  4513 * queue) and the callbacks to call when events occur, such as the Drop Timer expiring.
                                                                                                                                  -
                                                                                                                                  4514 * Additionally, when events m_snd_drop_timer wants to know about happen, we will call
                                                                                                                                  -
                                                                                                                                  4515 * m_snd_drop_timer->on_...(). */
                                                                                                                                  -
                                                                                                                                  4516 sock->m_snd_drop_timer = Drop_timer::create_drop_timer(get_logger(), &m_task_engine, &sock->m_snd_drop_timeout,
                                                                                                                                  -
                                                                                                                                  4517 Peer_socket::Ptr(sock), on_fail, on_timer);
                                                                                                                                  -
                                                                                                                                  4518}
                                                                                                                                  -
                                                                                                                                  4519
                                                                                                                                  - -
                                                                                                                                  4521 const Function<size_t (size_t max_data_size)>& snd_buf_feed_func,
                                                                                                                                  -
                                                                                                                                  4522 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  4523{
                                                                                                                                  -
                                                                                                                                  4524 using boost::asio::post;
                                                                                                                                  +
                                                                                                                                  4498 /* The two `shared_ptr`s (sock and m_snd_drop_timer) point to each other. Nullify this to break the cycle
                                                                                                                                  +
                                                                                                                                  4499 * and thus avoid memory leak. */
                                                                                                                                  +
                                                                                                                                  4500 sock->m_snd_drop_timer.reset();
                                                                                                                                  +
                                                                                                                                  4501 }
                                                                                                                                  +
                                                                                                                                  4502}
                                                                                                                                  +
                                                                                                                                  4503
                                                                                                                                  + +
                                                                                                                                  4505{
                                                                                                                                  +
                                                                                                                                  4506 sock->m_snd_drop_timeout = sock->opt(sock->m_opts.m_st_init_drop_timeout);
                                                                                                                                  +
                                                                                                                                  4507
                                                                                                                                  +
                                                                                                                                  4508 const auto on_fail = [this, socket_id, sock](const Error_code& err_code)
                                                                                                                                  +
                                                                                                                                  4509 {
                                                                                                                                  +
                                                                                                                                  4510 rst_and_close_connection_immediately(socket_id, sock, err_code, false);
                                                                                                                                  +
                                                                                                                                  4511 // ^-- defer_delta_check == false: for similar reason as when calling send_worker() from send_worker_check_state().
                                                                                                                                  +
                                                                                                                                  4512 };
                                                                                                                                  +
                                                                                                                                  4513 const auto on_timer = [this, socket_id, sock](bool drop_all_packets)
                                                                                                                                  +
                                                                                                                                  4514 {
                                                                                                                                  +
                                                                                                                                  4515 drop_timer_action(sock, drop_all_packets);
                                                                                                                                  +
                                                                                                                                  4516 };
                                                                                                                                  +
                                                                                                                                  4517
                                                                                                                                  +
                                                                                                                                  4518 /* Set up the Drop Timer. Basically give it some key fields of sock (DTO value, the In-flight
                                                                                                                                  +
                                                                                                                                  4519 * queue) and the callbacks to call when events occur, such as the Drop Timer expiring.
                                                                                                                                  +
                                                                                                                                  4520 * Additionally, when events m_snd_drop_timer wants to know about happen, we will call
                                                                                                                                  +
                                                                                                                                  4521 * m_snd_drop_timer->on_...(). */
                                                                                                                                  +
                                                                                                                                  4522 sock->m_snd_drop_timer = Drop_timer::create_drop_timer(get_logger(), &m_task_engine, &sock->m_snd_drop_timeout,
                                                                                                                                  +
                                                                                                                                  4523 Peer_socket::Ptr(sock), on_fail, on_timer);
                                                                                                                                  +
                                                                                                                                  4524}
                                                                                                                                  4525
                                                                                                                                  -
                                                                                                                                  4526 /* We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  4527 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  -
                                                                                                                                  4528 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  -
                                                                                                                                  4529
                                                                                                                                  -
                                                                                                                                  4530 // IMPORTANT: The logic here must be consistent with sock_is_writable().
                                                                                                                                  + +
                                                                                                                                  4527 const Function<size_t (size_t max_data_size)>& snd_buf_feed_func,
                                                                                                                                  +
                                                                                                                                  4528 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  4529{
                                                                                                                                  +
                                                                                                                                  4530 using boost::asio::post;
                                                                                                                                  4531
                                                                                                                                  -
                                                                                                                                  4532 if (!running())
                                                                                                                                  -
                                                                                                                                  4533 {
                                                                                                                                  - -
                                                                                                                                  4535 return 0;
                                                                                                                                  -
                                                                                                                                  4536 }
                                                                                                                                  -
                                                                                                                                  4537 // else
                                                                                                                                  -
                                                                                                                                  4538
                                                                                                                                  -
                                                                                                                                  4539 // Pre-condition is that m_mutex is locked already. So EVERYTHING that can be locked, is, including the buffers.
                                                                                                                                  -
                                                                                                                                  4540
                                                                                                                                  -
                                                                                                                                  4541 // Pre-condition.
                                                                                                                                  -
                                                                                                                                  4542 assert(sock->m_state == Peer_socket::State::S_OPEN); // Locked.
                                                                                                                                  -
                                                                                                                                  4543
                                                                                                                                  -
                                                                                                                                  4544 if (sock->m_disconnect_cause) // Locked.
                                                                                                                                  -
                                                                                                                                  4545 {
                                                                                                                                  -
                                                                                                                                  4546 // Error has been recorded, and we're not CLOSED => we are DISCONNECTING.
                                                                                                                                  -
                                                                                                                                  4547 assert(sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING);
                                                                                                                                  -
                                                                                                                                  4548
                                                                                                                                  -
                                                                                                                                  4549 /* Disconnection is underway. Adding more data to the Send buffer is pointless; we
                                                                                                                                  -
                                                                                                                                  4550 * don't allow more data to be queued to be sent after an error (though existing buffered data
                                                                                                                                  -
                                                                                                                                  4551 * may yet be sent... but that's not relevant here). @todo No graceful close yet. */
                                                                                                                                  -
                                                                                                                                  4552
                                                                                                                                  -
                                                                                                                                  4553 // Mark in *err_code and log.
                                                                                                                                  -
                                                                                                                                  4554 FLOW_ERROR_EMIT_ERROR_LOG_INFO(sock->m_disconnect_cause);
                                                                                                                                  -
                                                                                                                                  4555 return 0;
                                                                                                                                  -
                                                                                                                                  4556 }
                                                                                                                                  -
                                                                                                                                  4557 // else
                                                                                                                                  +
                                                                                                                                  4532 /* We are in user thread U != W.
                                                                                                                                  +
                                                                                                                                  4533 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  +
                                                                                                                                  4534 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  +
                                                                                                                                  4535
                                                                                                                                  +
                                                                                                                                  4536 // IMPORTANT: The logic here must be consistent with sock_is_writable().
                                                                                                                                  +
                                                                                                                                  4537
                                                                                                                                  +
                                                                                                                                  4538 if (!running())
                                                                                                                                  +
                                                                                                                                  4539 {
                                                                                                                                  + +
                                                                                                                                  4541 return 0;
                                                                                                                                  +
                                                                                                                                  4542 }
                                                                                                                                  +
                                                                                                                                  4543 // else
                                                                                                                                  +
                                                                                                                                  4544
                                                                                                                                  +
                                                                                                                                  4545 // Pre-condition is that m_mutex is locked already. So EVERYTHING that can be locked, is, including the buffers.
                                                                                                                                  +
                                                                                                                                  4546
                                                                                                                                  +
                                                                                                                                  4547 // Pre-condition.
                                                                                                                                  +
                                                                                                                                  4548 assert(sock->m_state == Peer_socket::State::S_OPEN); // Locked.
                                                                                                                                  +
                                                                                                                                  4549
                                                                                                                                  +
                                                                                                                                  4550 if (sock->m_disconnect_cause) // Locked.
                                                                                                                                  +
                                                                                                                                  4551 {
                                                                                                                                  +
                                                                                                                                  4552 // Error has been recorded, and we're not CLOSED => we are DISCONNECTING.
                                                                                                                                  +
                                                                                                                                  4553 assert(sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING);
                                                                                                                                  +
                                                                                                                                  4554
                                                                                                                                  +
                                                                                                                                  4555 /* Disconnection is underway. Adding more data to the Send buffer is pointless; we
                                                                                                                                  +
                                                                                                                                  4556 * don't allow more data to be queued to be sent after an error (though existing buffered data
                                                                                                                                  +
                                                                                                                                  4557 * may yet be sent... but that's not relevant here). @todo No graceful close yet. */
                                                                                                                                  4558
                                                                                                                                  -
                                                                                                                                  4559 // No fatal error (socket not disconnecing or closed). However it may still be connecting.
                                                                                                                                  -
                                                                                                                                  4560
                                                                                                                                  -
                                                                                                                                  4561 if (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING)
                                                                                                                                  -
                                                                                                                                  4562 {
                                                                                                                                  -
                                                                                                                                  4563 /* Here we draw a line in the sand and refuse to buffer any data. We could easily allow
                                                                                                                                  -
                                                                                                                                  4564 * buffering data even when still S_CONNECTING. However, I am copying BSD socket semantics
                                                                                                                                  -
                                                                                                                                  4565 * here, as they do seem to be useful. As a user I don't want to think I've "sent" gobs of data
                                                                                                                                  -
                                                                                                                                  4566 * while there's little to suggest that there's even anyone listening on the other side. */
                                                                                                                                  -
                                                                                                                                  4567 err_code->clear();
                                                                                                                                  -
                                                                                                                                  4568 return 0;
                                                                                                                                  -
                                                                                                                                  4569 }
                                                                                                                                  -
                                                                                                                                  4570 // else
                                                                                                                                  -
                                                                                                                                  4571 assert(sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED);
                                                                                                                                  -
                                                                                                                                  4572
                                                                                                                                  -
                                                                                                                                  4573 const bool was_deqable = snd_deqable(sock); // See below.
                                                                                                                                  -
                                                                                                                                  4574
                                                                                                                                  -
                                                                                                                                  4575 /* Write the user-provided data into m_snd_buf; provide the missing argument (max_data_size).
                                                                                                                                  -
                                                                                                                                  4576 * Round up to a multiple of max-block-size to ensure we never fragment a max-block-size-sized
                                                                                                                                  -
                                                                                                                                  4577 * chunk of data when they're using unreliable mode! */
                                                                                                                                  -
                                                                                                                                  4578 const size_t sent = snd_buf_feed_func(sock->max_block_size_multiple(sock->m_opts.m_st_snd_buf_max_size));
                                                                                                                                  -
                                                                                                                                  4579
                                                                                                                                  -
                                                                                                                                  4580 // Register that the Send buffer possibly grew.
                                                                                                                                  -
                                                                                                                                  4581 sock->m_snd_stats.buffer_fed(sock->m_snd_buf.data_size());
                                                                                                                                  -
                                                                                                                                  4582
                                                                                                                                  -
                                                                                                                                  4583 /* We've done the minimal thing send() does: added data to the send buffer. Now we may need to
                                                                                                                                  -
                                                                                                                                  4584 * kick off the actual asynchronous sending of some of these data by thread W. It's important to
                                                                                                                                  -
                                                                                                                                  4585 * discuss the overall strategy for how that works.
                                                                                                                                  -
                                                                                                                                  4586 *
                                                                                                                                  -
                                                                                                                                  4587 * Key question: how does W send low-level packets over UDP? Answer: if there's anything on the
                                                                                                                                  -
                                                                                                                                  4588 * Send buffer or retransmission queue (if retransmission is enabled), and there is no other
                                                                                                                                  -
                                                                                                                                  4589 * (congestion control, probably) reason NOT to send packets, then dequeue a packet from
                                                                                                                                  -
                                                                                                                                  4590 * retransmission queue or Send buffer and send it off to the UDP layer; repeat in a tight loop
                                                                                                                                  -
                                                                                                                                  4591 * until both Send queues are empty, or there's some reason NOT to send packets (again, congestion
                                                                                                                                  -
                                                                                                                                  4592 * control). Let's write this in pseudo-code:
                                                                                                                                  -
                                                                                                                                  4593 *
                                                                                                                                  -
                                                                                                                                  4594 * DEQ(sock): // Thread W only.
                                                                                                                                  -
                                                                                                                                  4595 * if (!sendable(sock)):
                                                                                                                                  -
                                                                                                                                  4596 * return // Slight optimization; perform this first check before locking.
                                                                                                                                  -
                                                                                                                                  4597 * lock sock // Must lock because sock->m_snd_buf accessible from other threads.
                                                                                                                                  -
                                                                                                                                  4598 * while (sendable(sock) && deqable(sock)):
                                                                                                                                  -
                                                                                                                                  4599 * dequeue sock->m_snd_buf -> block
                                                                                                                                  -
                                                                                                                                  4600 * serialize block into packet
                                                                                                                                  -
                                                                                                                                  4601 * send packet via UDP
                                                                                                                                  -
                                                                                                                                  4602 * unlock sock
                                                                                                                                  -
                                                                                                                                  4603 *
                                                                                                                                  -
                                                                                                                                  4604 * sendable(sock):
                                                                                                                                  -
                                                                                                                                  4605 * return <...probably some congestion control condition involving CWND or something>
                                                                                                                                  -
                                                                                                                                  4606 *
                                                                                                                                  -
                                                                                                                                  4607 * deqable(sock):
                                                                                                                                  -
                                                                                                                                  4608 * return !(sock->m_rexmit_q.empty() && sock->m_snd_buf.empty())
                                                                                                                                  +
                                                                                                                                  4559 // Mark in *err_code and log.
                                                                                                                                  +
                                                                                                                                  4560 FLOW_ERROR_EMIT_ERROR_LOG_INFO(sock->m_disconnect_cause);
                                                                                                                                  +
                                                                                                                                  4561 return 0;
                                                                                                                                  +
                                                                                                                                  4562 }
                                                                                                                                  +
                                                                                                                                  4563 // else
                                                                                                                                  +
                                                                                                                                  4564
                                                                                                                                  +
                                                                                                                                  4565 // No fatal error (socket not disconnecing or closed). However it may still be connecting.
                                                                                                                                  +
                                                                                                                                  4566
                                                                                                                                  +
                                                                                                                                  4567 if (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING)
                                                                                                                                  +
                                                                                                                                  4568 {
                                                                                                                                  +
                                                                                                                                  4569 /* Here we draw a line in the sand and refuse to buffer any data. We could easily allow
                                                                                                                                  +
                                                                                                                                  4570 * buffering data even when still S_CONNECTING. However, I am copying BSD socket semantics
                                                                                                                                  +
                                                                                                                                  4571 * here, as they do seem to be useful. As a user I don't want to think I've "sent" gobs of data
                                                                                                                                  +
                                                                                                                                  4572 * while there's little to suggest that there's even anyone listening on the other side. */
                                                                                                                                  +
                                                                                                                                  4573 err_code->clear();
                                                                                                                                  +
                                                                                                                                  4574 return 0;
                                                                                                                                  +
                                                                                                                                  4575 }
                                                                                                                                  +
                                                                                                                                  4576 // else
                                                                                                                                  +
                                                                                                                                  4577 assert(sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED);
                                                                                                                                  +
                                                                                                                                  4578
                                                                                                                                  +
                                                                                                                                  4579 const bool was_deqable = snd_deqable(sock); // See below.
                                                                                                                                  +
                                                                                                                                  4580
                                                                                                                                  +
                                                                                                                                  4581 /* Write the user-provided data into m_snd_buf; provide the missing argument (max_data_size).
                                                                                                                                  +
                                                                                                                                  4582 * Round up to a multiple of max-block-size to ensure we never fragment a max-block-size-sized
                                                                                                                                  +
                                                                                                                                  4583 * chunk of data when they're using unreliable mode! */
                                                                                                                                  +
                                                                                                                                  4584 const size_t sent = snd_buf_feed_func(sock->max_block_size_multiple(sock->m_opts.m_st_snd_buf_max_size));
                                                                                                                                  +
                                                                                                                                  4585
                                                                                                                                  +
                                                                                                                                  4586 // Register that the Send buffer possibly grew.
                                                                                                                                  +
                                                                                                                                  4587 sock->m_snd_stats.buffer_fed(sock->m_snd_buf.data_size());
                                                                                                                                  +
                                                                                                                                  4588
                                                                                                                                  +
                                                                                                                                  4589 /* We've done the minimal thing send() does: added data to the send buffer. Now we may need to
                                                                                                                                  +
                                                                                                                                  4590 * kick off the actual asynchronous sending of some of these data by thread W. It's important to
                                                                                                                                  +
                                                                                                                                  4591 * discuss the overall strategy for how that works.
                                                                                                                                  +
                                                                                                                                  4592 *
                                                                                                                                  +
                                                                                                                                  4593 * Key question: how does W send low-level packets over UDP? Answer: if there's anything on the
                                                                                                                                  +
                                                                                                                                  4594 * Send buffer or retransmission queue (if retransmission is enabled), and there is no other
                                                                                                                                  +
                                                                                                                                  4595 * (congestion control, probably) reason NOT to send packets, then dequeue a packet from
                                                                                                                                  +
                                                                                                                                  4596 * retransmission queue or Send buffer and send it off to the UDP layer; repeat in a tight loop
                                                                                                                                  +
                                                                                                                                  4597 * until both Send queues are empty, or there's some reason NOT to send packets (again, congestion
                                                                                                                                  +
                                                                                                                                  4598 * control). Let's write this in pseudo-code:
                                                                                                                                  +
                                                                                                                                  4599 *
                                                                                                                                  +
                                                                                                                                  4600 * DEQ(sock): // Thread W only.
                                                                                                                                  +
                                                                                                                                  4601 * if (!sendable(sock)):
                                                                                                                                  +
                                                                                                                                  4602 * return // Slight optimization; perform this first check before locking.
                                                                                                                                  +
                                                                                                                                  4603 * lock sock // Must lock because sock->m_snd_buf accessible from other threads.
                                                                                                                                  +
                                                                                                                                  4604 * while (sendable(sock) && deqable(sock)):
                                                                                                                                  +
                                                                                                                                  4605 * dequeue sock->m_snd_buf -> block
                                                                                                                                  +
                                                                                                                                  4606 * serialize block into packet
                                                                                                                                  +
                                                                                                                                  4607 * send packet via UDP
                                                                                                                                  +
                                                                                                                                  4608 * unlock sock
                                                                                                                                  4609 *
                                                                                                                                  -
                                                                                                                                  4610 * When should DEQ(sock) execute? Answer: whenever sendable(sock) and deqable(sock) are true. If
                                                                                                                                  -
                                                                                                                                  4611 * they're true, but DEQ(sock) doesn't run for time period P, then it's practically like adding
                                                                                                                                  -
                                                                                                                                  4612 * sleep(P) from the user's point of view. So how do we get DEQ(sock) to execute as soon as those
                                                                                                                                  -
                                                                                                                                  4613 * conditions are true? Well, running it repeatedly in a thread W tight loop would do it, but
                                                                                                                                  -
                                                                                                                                  4614 * obviously that's unacceptable.
                                                                                                                                  +
                                                                                                                                  4610 * sendable(sock):
                                                                                                                                  +
                                                                                                                                  4611 * return <...probably some congestion control condition involving CWND or something>
                                                                                                                                  +
                                                                                                                                  4612 *
                                                                                                                                  +
                                                                                                                                  4613 * deqable(sock):
                                                                                                                                  +
                                                                                                                                  4614 * return !(sock->m_rexmit_q.empty() && sock->m_snd_buf.empty())
                                                                                                                                  4615 *
                                                                                                                                  -
                                                                                                                                  4616 * So consider the initial state after sock enters ESTABLISHED state. sendable(sock) is true;
                                                                                                                                  -
                                                                                                                                  4617 * deqable(sock) is false. The moment deqable(sock) becomes true, we should execute DEQ(sock); in
                                                                                                                                  -
                                                                                                                                  4618 * other words in the first sock->send(), as that will add to m_snd_buf. After DEQ(sock) exits,
                                                                                                                                  -
                                                                                                                                  4619 * there's no need to call DEQ(sock) until again both conditions are true. Therefore, the
                                                                                                                                  -
                                                                                                                                  4620 * algorithm is: whenever sendable(sock) goes from false to true, and/or deqable(sock) from false
                                                                                                                                  -
                                                                                                                                  4621 * to true, call DEQ(sock). If inside DEQ(sock) one of the conditions is still false, it will
                                                                                                                                  -
                                                                                                                                  4622 * quickly return. (Call the latter a NOOP.)
                                                                                                                                  -
                                                                                                                                  4623 *
                                                                                                                                  -
                                                                                                                                  4624 * Now we must come up with a scheme that will ensure DEQ(sock) will run very quickly after either
                                                                                                                                  -
                                                                                                                                  4625 * condition (sendable(sock), deqable(sock)) becomes true; and that will not peg the CPU.
                                                                                                                                  -
                                                                                                                                  4626 *
                                                                                                                                  -
                                                                                                                                  4627 * Consider sendable(). Only thread W (transport layer) can determine this value: it depends on
                                                                                                                                  -
                                                                                                                                  4628 * wholly internal details like packets in-flight and CWND. Therefore sendable(sock) can go
                                                                                                                                  -
                                                                                                                                  4629 * false->true only in W. Hence W, whenever changing any component that might affect
                                                                                                                                  -
                                                                                                                                  4630 * sendable(sock) would do:
                                                                                                                                  -
                                                                                                                                  4631 *
                                                                                                                                  -
                                                                                                                                  4632 * // ... Something related to sendable(sock) has changed....
                                                                                                                                  -
                                                                                                                                  4633 * DEQ(sock) // So check and send if possible.
                                                                                                                                  -
                                                                                                                                  4634 *
                                                                                                                                  -
                                                                                                                                  4635 * Clearly this calls DEQ(sock) as soon as humanly possible after sendable(sock) becomes true.
                                                                                                                                  -
                                                                                                                                  4636 * Clearly it wastes no CPU cycles either. OK.
                                                                                                                                  +
                                                                                                                                  4616 * When should DEQ(sock) execute? Answer: whenever sendable(sock) and deqable(sock) are true. If
                                                                                                                                  +
                                                                                                                                  4617 * they're true, but DEQ(sock) doesn't run for time period P, then it's practically like adding
                                                                                                                                  +
                                                                                                                                  4618 * sleep(P) from the user's point of view. So how do we get DEQ(sock) to execute as soon as those
                                                                                                                                  +
                                                                                                                                  4619 * conditions are true? Well, running it repeatedly in a thread W tight loop would do it, but
                                                                                                                                  +
                                                                                                                                  4620 * obviously that's unacceptable.
                                                                                                                                  +
                                                                                                                                  4621 *
                                                                                                                                  +
                                                                                                                                  4622 * So consider the initial state after sock enters ESTABLISHED state. sendable(sock) is true;
                                                                                                                                  +
                                                                                                                                  4623 * deqable(sock) is false. The moment deqable(sock) becomes true, we should execute DEQ(sock); in
                                                                                                                                  +
                                                                                                                                  4624 * other words in the first sock->send(), as that will add to m_snd_buf. After DEQ(sock) exits,
                                                                                                                                  +
                                                                                                                                  4625 * there's no need to call DEQ(sock) until again both conditions are true. Therefore, the
                                                                                                                                  +
                                                                                                                                  4626 * algorithm is: whenever sendable(sock) goes from false to true, and/or deqable(sock) from false
                                                                                                                                  +
                                                                                                                                  4627 * to true, call DEQ(sock). If inside DEQ(sock) one of the conditions is still false, it will
                                                                                                                                  +
                                                                                                                                  4628 * quickly return. (Call the latter a NOOP.)
                                                                                                                                  +
                                                                                                                                  4629 *
                                                                                                                                  +
                                                                                                                                  4630 * Now we must come up with a scheme that will ensure DEQ(sock) will run very quickly after either
                                                                                                                                  +
                                                                                                                                  4631 * condition (sendable(sock), deqable(sock)) becomes true; and that will not peg the CPU.
                                                                                                                                  +
                                                                                                                                  4632 *
                                                                                                                                  +
                                                                                                                                  4633 * Consider sendable(). Only thread W (transport layer) can determine this value: it depends on
                                                                                                                                  +
                                                                                                                                  4634 * wholly internal details like packets in-flight and CWND. Therefore sendable(sock) can go
                                                                                                                                  +
                                                                                                                                  4635 * false->true only in W. Hence W, whenever changing any component that might affect
                                                                                                                                  +
                                                                                                                                  4636 * sendable(sock) would do:
                                                                                                                                  4637 *
                                                                                                                                  -
                                                                                                                                  4638 * Now consider deqable(). sock->m_snd_buf can only change from empty to non-empty in the
                                                                                                                                  -
                                                                                                                                  4639 * previous statement (snd_buf_feed_func()). That is in thread U != W. Suppose we write:
                                                                                                                                  +
                                                                                                                                  4638 * // ... Something related to sendable(sock) has changed....
                                                                                                                                  +
                                                                                                                                  4639 * DEQ(sock) // So check and send if possible.
                                                                                                                                  4640 *
                                                                                                                                  -
                                                                                                                                  4641 * SEND(sock, blocks): // Non-W threads only.
                                                                                                                                  -
                                                                                                                                  4642 * lock sock // Must lock because sock->m_snd_buf accessible from other threads.
                                                                                                                                  -
                                                                                                                                  4643 * add blocks -> sock->m_snd_buf
                                                                                                                                  -
                                                                                                                                  4644 * if (sock->m_snd_buf was empty before previous statement)
                                                                                                                                  -
                                                                                                                                  4645 * // Queue DEQ(sock) for asynchronous execution on thread W as soon as it's free:
                                                                                                                                  -
                                                                                                                                  4646 * post(W, DEQ(sock))
                                                                                                                                  -
                                                                                                                                  4647 * unlock sock
                                                                                                                                  -
                                                                                                                                  4648 *
                                                                                                                                  -
                                                                                                                                  4649 * Does this call DEQ(sock) as soon as deqable(sock) becomes true? Well, DEQ(sock) can only run
                                                                                                                                  -
                                                                                                                                  4650 * on thread W, and the enqueuing of blocks can only happen on thread U, and post() will cause
                                                                                                                                  -
                                                                                                                                  4651 * DEQ(sock) to run as soon as possible. Therefore that's as good as it can be. Is it correct,
                                                                                                                                  -
                                                                                                                                  4652 * however? The mainstream case is that once "unlock sock" finished in SEND(), thread W will get
                                                                                                                                  -
                                                                                                                                  4653 * some free time, execute the just-queued DEQ(), and thus everything works out. OK so far.
                                                                                                                                  +
                                                                                                                                  4641 * Clearly this calls DEQ(sock) as soon as humanly possible after sendable(sock) becomes true.
                                                                                                                                  +
                                                                                                                                  4642 * Clearly it wastes no CPU cycles either. OK.
                                                                                                                                  +
                                                                                                                                  4643 *
                                                                                                                                  +
                                                                                                                                  4644 * Now consider deqable(). sock->m_snd_buf can only change from empty to non-empty in the
                                                                                                                                  +
                                                                                                                                  4645 * previous statement (snd_buf_feed_func()). That is in thread U != W. Suppose we write:
                                                                                                                                  +
                                                                                                                                  4646 *
                                                                                                                                  +
                                                                                                                                  4647 * SEND(sock, blocks): // Non-W threads only.
                                                                                                                                  +
                                                                                                                                  4648 * lock sock // Must lock because sock->m_snd_buf accessible from other threads.
                                                                                                                                  +
                                                                                                                                  4649 * add blocks -> sock->m_snd_buf
                                                                                                                                  +
                                                                                                                                  4650 * if (sock->m_snd_buf was empty before previous statement)
                                                                                                                                  +
                                                                                                                                  4651 * // Queue DEQ(sock) for asynchronous execution on thread W as soon as it's free:
                                                                                                                                  +
                                                                                                                                  4652 * post(W, DEQ(sock))
                                                                                                                                  +
                                                                                                                                  4653 * unlock sock
                                                                                                                                  4654 *
                                                                                                                                  -
                                                                                                                                  4655 * Since, however, post() is (obviously) asynchronous and done from thread non-W, there is
                                                                                                                                  -
                                                                                                                                  4656 * potential for other tomfoolery. First consider competing SEND() calls from other threads.
                                                                                                                                  -
                                                                                                                                  4657 * Because of locking, they will be entirely sequential even from different threads and thus can
                                                                                                                                  -
                                                                                                                                  4658 * be considered as all in one thread U != W. Now suppose SEND() placed DEQ() onto W, and another
                                                                                                                                  -
                                                                                                                                  4659 * SEND() executes before DEQ() executes on W. No problem: since only DEQ() can dequeue the Send
                                                                                                                                  -
                                                                                                                                  4660 * buffer, and the 1st SEND() made the buffer non-empty, the 2nd SEND() will not affect the DEQ()
                                                                                                                                  -
                                                                                                                                  4661 * situation, since it cannot make m_snd_buf become non-empty after being empty (was already
                                                                                                                                  -
                                                                                                                                  4662 * non-empty).
                                                                                                                                  -
                                                                                                                                  4663 *
                                                                                                                                  -
                                                                                                                                  4664 * Second consider SEND(sock, blocks) executing while a W handler is executing. Now suppose this
                                                                                                                                  -
                                                                                                                                  4665 * W handler discovers that sendable() may be affected and thus calls DEQ(sock) as shown above;
                                                                                                                                  -
                                                                                                                                  4666 * meanwhile SEND() posts DEQ(sock) onto W as well. W will wait until SEND(sock, blocks) exits
                                                                                                                                  -
                                                                                                                                  4667 * (due to the lock) before executing most of DEQ(sock), but when it does it will be ITS DEQ(sock)
                                                                                                                                  -
                                                                                                                                  4668 * that executes first (regardless of whether the post from thread U happened first). This
                                                                                                                                  -
                                                                                                                                  4669 * DEQ(sock) will not be a NOOP, which is great. Now, thread W should exit that handler and
                                                                                                                                  -
                                                                                                                                  4670 * finally execute SEND()'s posted DEQ() -- which will be a NOOP, because the synchronous
                                                                                                                                  -
                                                                                                                                  4671 * DEQ(sock) from thread W preempted it.
                                                                                                                                  -
                                                                                                                                  4672 *
                                                                                                                                  -
                                                                                                                                  4673 * Is this OK? Most likely. It'll spend some extra CPU cycles on the check in the NOOP, but
                                                                                                                                  -
                                                                                                                                  4674 * that's it. Now, there is some conceivable way that, maybe, such NOOPs could happen a lot in a
                                                                                                                                  -
                                                                                                                                  4675 * very busy system and perhaps even "bunch" up to peg the CPU. However, after doing many thought
                                                                                                                                  -
                                                                                                                                  4676 * experiments, I unable to come up with anything actually worrying.
                                                                                                                                  -
                                                                                                                                  4677 *
                                                                                                                                  -
                                                                                                                                  4678 * The other way deqable(sock) can become true is if m_rexmit_q was empty but becomes non-empty.
                                                                                                                                  -
                                                                                                                                  4679 * In other words, if we detect packet as Dropped, we will have added it (if retransmission is on)
                                                                                                                                  -
                                                                                                                                  4680 * to m_rexmit_q. This can only happen on thread W and thus is handled similarly to
                                                                                                                                  -
                                                                                                                                  4681 * sendable(sock):
                                                                                                                                  -
                                                                                                                                  4682 *
                                                                                                                                  -
                                                                                                                                  4683 * // ... Something related to deqable(sock) has changed....
                                                                                                                                  -
                                                                                                                                  4684 * DEQ(sock) // So check and send if possible.
                                                                                                                                  -
                                                                                                                                  4685 *
                                                                                                                                  -
                                                                                                                                  4686 * So this system should be OK. Now let's map the above pseudocode to actual code.
                                                                                                                                  -
                                                                                                                                  4687 *
                                                                                                                                  -
                                                                                                                                  4688 * SEND(sock, blocks) is the very method you're reading now (Peer_socket::send() and
                                                                                                                                  -
                                                                                                                                  4689 * Node::send(), runs in thread U != W). DEQ(sock) is Node::send_worker(sock) (runs in thread
                                                                                                                                  -
                                                                                                                                  4690 * W). sendable(sock) is Node::can_send(sock). deqable(sock) is Node::snd_deqable(sock).
                                                                                                                                  -
                                                                                                                                  4691 * post(W, f) is post(Node::m_task_engine, f).
                                                                                                                                  -
                                                                                                                                  4692 *
                                                                                                                                  -
                                                                                                                                  4693 * OK, there is one more small caveat. If DEQ(sock) is placed onto W by SEND(sock, blocks),
                                                                                                                                  -
                                                                                                                                  4694 * then before this DEQ() is executed, thread W may change the state of sock (for example, close
                                                                                                                                  -
                                                                                                                                  4695 * it). Therefore, DEQ() must also ensure it's operating in a state where it can send data
                                                                                                                                  -
                                                                                                                                  4696 * (ESTABLISHED at least), and if not, NOOP. Of course if DEQ() is executed synchronously by W,
                                                                                                                                  -
                                                                                                                                  4697 * then this is unnecessary (since W code wouldn't execute DEQ() directly unless already in a
                                                                                                                                  -
                                                                                                                                  4698 * proper state for this). So, send_worker_check_state() is actually a little bit more than just
                                                                                                                                  -
                                                                                                                                  4699 * DEQ(), while send_worker() is just DEQ(). send() posts send_worker_check_state(), while
                                                                                                                                  -
                                                                                                                                  4700 * thread W executes send_worker() directly. */
                                                                                                                                  -
                                                                                                                                  4701
                                                                                                                                  -
                                                                                                                                  4702 if ((!was_deqable) && (sent != 0))
                                                                                                                                  -
                                                                                                                                  4703 {
                                                                                                                                  -
                                                                                                                                  4704 // Possibly send_worker() can send packets now (send buffer went from empty to not).
                                                                                                                                  -
                                                                                                                                  4705 post(m_task_engine, [this, sock]() { send_worker_check_state(sock); });
                                                                                                                                  -
                                                                                                                                  4706 }
                                                                                                                                  +
                                                                                                                                  4655 * Does this call DEQ(sock) as soon as deqable(sock) becomes true? Well, DEQ(sock) can only run
                                                                                                                                  +
                                                                                                                                  4656 * on thread W, and the enqueuing of blocks can only happen on thread U, and post() will cause
                                                                                                                                  +
                                                                                                                                  4657 * DEQ(sock) to run as soon as possible. Therefore that's as good as it can be. Is it correct,
                                                                                                                                  +
                                                                                                                                  4658 * however? The mainstream case is that once "unlock sock" finished in SEND(), thread W will get
                                                                                                                                  +
                                                                                                                                  4659 * some free time, execute the just-queued DEQ(), and thus everything works out. OK so far.
                                                                                                                                  +
                                                                                                                                  4660 *
                                                                                                                                  +
                                                                                                                                  4661 * Since, however, post() is (obviously) asynchronous and done from thread non-W, there is
                                                                                                                                  +
                                                                                                                                  4662 * potential for other tomfoolery. First consider competing SEND() calls from other threads.
                                                                                                                                  +
                                                                                                                                  4663 * Because of locking, they will be entirely sequential even from different threads and thus can
                                                                                                                                  +
                                                                                                                                  4664 * be considered as all in one thread U != W. Now suppose SEND() placed DEQ() onto W, and another
                                                                                                                                  +
                                                                                                                                  4665 * SEND() executes before DEQ() executes on W. No problem: since only DEQ() can dequeue the Send
                                                                                                                                  +
                                                                                                                                  4666 * buffer, and the 1st SEND() made the buffer non-empty, the 2nd SEND() will not affect the DEQ()
                                                                                                                                  +
                                                                                                                                  4667 * situation, since it cannot make m_snd_buf become non-empty after being empty (was already
                                                                                                                                  +
                                                                                                                                  4668 * non-empty).
                                                                                                                                  +
                                                                                                                                  4669 *
                                                                                                                                  +
                                                                                                                                  4670 * Second consider SEND(sock, blocks) executing while a W handler is executing. Now suppose this
                                                                                                                                  +
                                                                                                                                  4671 * W handler discovers that sendable() may be affected and thus calls DEQ(sock) as shown above;
                                                                                                                                  +
                                                                                                                                  4672 * meanwhile SEND() posts DEQ(sock) onto W as well. W will wait until SEND(sock, blocks) exits
                                                                                                                                  +
                                                                                                                                  4673 * (due to the lock) before executing most of DEQ(sock), but when it does it will be ITS DEQ(sock)
                                                                                                                                  +
                                                                                                                                  4674 * that executes first (regardless of whether the post from thread U happened first). This
                                                                                                                                  +
                                                                                                                                  4675 * DEQ(sock) will not be a NOOP, which is great. Now, thread W should exit that handler and
                                                                                                                                  +
                                                                                                                                  4676 * finally execute SEND()'s posted DEQ() -- which will be a NOOP, because the synchronous
                                                                                                                                  +
                                                                                                                                  4677 * DEQ(sock) from thread W preempted it.
                                                                                                                                  +
                                                                                                                                  4678 *
                                                                                                                                  +
                                                                                                                                  4679 * Is this OK? Most likely. It'll spend some extra CPU cycles on the check in the NOOP, but
                                                                                                                                  +
                                                                                                                                  4680 * that's it. Now, there is some conceivable way that, maybe, such NOOPs could happen a lot in a
                                                                                                                                  +
                                                                                                                                  4681 * very busy system and perhaps even "bunch" up to peg the CPU. However, after doing many thought
                                                                                                                                  +
                                                                                                                                  4682 * experiments, I unable to come up with anything actually worrying.
                                                                                                                                  +
                                                                                                                                  4683 *
                                                                                                                                  +
                                                                                                                                  4684 * The other way deqable(sock) can become true is if m_rexmit_q was empty but becomes non-empty.
                                                                                                                                  +
                                                                                                                                  4685 * In other words, if we detect packet as Dropped, we will have added it (if retransmission is on)
                                                                                                                                  +
                                                                                                                                  4686 * to m_rexmit_q. This can only happen on thread W and thus is handled similarly to
                                                                                                                                  +
                                                                                                                                  4687 * sendable(sock):
                                                                                                                                  +
                                                                                                                                  4688 *
                                                                                                                                  +
                                                                                                                                  4689 * // ... Something related to deqable(sock) has changed....
                                                                                                                                  +
                                                                                                                                  4690 * DEQ(sock) // So check and send if possible.
                                                                                                                                  +
                                                                                                                                  4691 *
                                                                                                                                  +
                                                                                                                                  4692 * So this system should be OK. Now let's map the above pseudocode to actual code.
                                                                                                                                  +
                                                                                                                                  4693 *
                                                                                                                                  +
                                                                                                                                  4694 * SEND(sock, blocks) is the very method you're reading now (Peer_socket::send() and
                                                                                                                                  +
                                                                                                                                  4695 * Node::send(), runs in thread U != W). DEQ(sock) is Node::send_worker(sock) (runs in thread
                                                                                                                                  +
                                                                                                                                  4696 * W). sendable(sock) is Node::can_send(sock). deqable(sock) is Node::snd_deqable(sock).
                                                                                                                                  +
                                                                                                                                  4697 * post(W, f) is post(Node::m_task_engine, f).
                                                                                                                                  +
                                                                                                                                  4698 *
                                                                                                                                  +
                                                                                                                                  4699 * OK, there is one more small caveat. If DEQ(sock) is placed onto W by SEND(sock, blocks),
                                                                                                                                  +
                                                                                                                                  4700 * then before this DEQ() is executed, thread W may change the state of sock (for example, close
                                                                                                                                  +
                                                                                                                                  4701 * it). Therefore, DEQ() must also ensure it's operating in a state where it can send data
                                                                                                                                  +
                                                                                                                                  4702 * (ESTABLISHED at least), and if not, NOOP. Of course if DEQ() is executed synchronously by W,
                                                                                                                                  +
                                                                                                                                  4703 * then this is unnecessary (since W code wouldn't execute DEQ() directly unless already in a
                                                                                                                                  +
                                                                                                                                  4704 * proper state for this). So, send_worker_check_state() is actually a little bit more than just
                                                                                                                                  +
                                                                                                                                  4705 * DEQ(), while send_worker() is just DEQ(). send() posts send_worker_check_state(), while
                                                                                                                                  +
                                                                                                                                  4706 * thread W executes send_worker() directly. */
                                                                                                                                  4707
                                                                                                                                  -
                                                                                                                                  4708 err_code->clear();
                                                                                                                                  -
                                                                                                                                  4709 return sent;
                                                                                                                                  -
                                                                                                                                  4710 // Note that sock->m_mutex is unlocked here (and send_worker() will lock it again when it [probably soon] executes).
                                                                                                                                  -
                                                                                                                                  4711} // Node::send()
                                                                                                                                  -
                                                                                                                                  4712
                                                                                                                                  -
                                                                                                                                  4713bool Node::sock_is_writable(const boost::any& sock_as_any) const
                                                                                                                                  -
                                                                                                                                  4714{
                                                                                                                                  -
                                                                                                                                  4715 using boost::any_cast;
                                                                                                                                  -
                                                                                                                                  4716
                                                                                                                                  -
                                                                                                                                  4717 const Peer_socket::Const_ptr sock = any_cast<Peer_socket::Ptr>(sock_as_any);
                                                                                                                                  +
                                                                                                                                  4708 if ((!was_deqable) && (sent != 0))
                                                                                                                                  +
                                                                                                                                  4709 {
                                                                                                                                  +
                                                                                                                                  4710 // Possibly send_worker() can send packets now (send buffer went from empty to not).
                                                                                                                                  +
                                                                                                                                  4711 post(m_task_engine, [this, sock]() { send_worker_check_state(sock); });
                                                                                                                                  +
                                                                                                                                  4712 }
                                                                                                                                  +
                                                                                                                                  4713
                                                                                                                                  +
                                                                                                                                  4714 err_code->clear();
                                                                                                                                  +
                                                                                                                                  4715 return sent;
                                                                                                                                  +
                                                                                                                                  4716 // Note that sock->m_mutex is unlocked here (and send_worker() will lock it again when it [probably soon] executes).
                                                                                                                                  +
                                                                                                                                  4717} // Node::send()
                                                                                                                                  4718
                                                                                                                                  -
                                                                                                                                  4719 Peer_socket::Lock_guard lock(sock->m_mutex); // Many threads can access/write below state.
                                                                                                                                  -
                                                                                                                                  4720
                                                                                                                                  -
                                                                                                                                  4721 /* Our task here is to return true if and only if at this very moment calling sock->send() would
                                                                                                                                  -
                                                                                                                                  4722 * yield either a return value of > 0 OR a non-success *err_code. In other words, send() would
                                                                                                                                  -
                                                                                                                                  4723 * return "something." This is used for Event_set machinery.
                                                                                                                                  -
                                                                                                                                  4724 *
                                                                                                                                  -
                                                                                                                                  4725 * This should mirror send()'s algorithm. @todo Should send() call this, for code reuse?
                                                                                                                                  -
                                                                                                                                  4726 * Maybe/maybe not. Consider performance when deciding.
                                                                                                                                  -
                                                                                                                                  4727 *
                                                                                                                                  -
                                                                                                                                  4728 * - If state is CLOSED, then some sort of error/terminating condition occurred, so send()
                                                                                                                                  -
                                                                                                                                  4729 * would return 0 and non-success Error_code == sock->m_disconnect_cause. (Writable.)
                                                                                                                                  -
                                                                                                                                  4730 * - Otherwise, if state is OPEN+DISCONNECTING, then graceful close (@todo implement it) is
                                                                                                                                  -
                                                                                                                                  4731 * underway; we do not allow more data to be sent (except what's already in Sent buffer), so
                                                                                                                                  -
                                                                                                                                  4732 * send() would return 0 and non-success Error_code == sock->m_disconnect_cause.
                                                                                                                                  -
                                                                                                                                  4733 * (Writable.)
                                                                                                                                  -
                                                                                                                                  4734 * - Otherwise, if state is OPEN+CONNECTED, and there is Send buffer space, send() would return >
                                                                                                                                  -
                                                                                                                                  4735 * 0 and no error. (Writable.)
                                                                                                                                  -
                                                                                                                                  4736 * - The other remaining possibilities:
                                                                                                                                  -
                                                                                                                                  4737 * - OPEN+CONNECTED but no Send buffer space (returns 0, no error). (Not Writable.)
                                                                                                                                  -
                                                                                                                                  4738 * - OPEN+CONNECTING -- we don't allow accumulating data in Send buffer (returns 0, no error).
                                                                                                                                  -
                                                                                                                                  4739 * (Not Writable.) */
                                                                                                                                  -
                                                                                                                                  4740
                                                                                                                                  -
                                                                                                                                  4741 return (sock->m_state == Peer_socket::State::S_CLOSED)
                                                                                                                                  -
                                                                                                                                  4742 || (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING)
                                                                                                                                  -
                                                                                                                                  4743 || ((sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  -
                                                                                                                                  4744 && snd_buf_enqable(sock));
                                                                                                                                  -
                                                                                                                                  4745} // Node::sock_is_writable()
                                                                                                                                  +
                                                                                                                                  4719bool Node::sock_is_writable(const boost::any& sock_as_any) const
                                                                                                                                  +
                                                                                                                                  4720{
                                                                                                                                  +
                                                                                                                                  4721 using boost::any_cast;
                                                                                                                                  +
                                                                                                                                  4722
                                                                                                                                  +
                                                                                                                                  4723 const Peer_socket::Const_ptr sock = any_cast<Peer_socket::Ptr>(sock_as_any);
                                                                                                                                  +
                                                                                                                                  4724
                                                                                                                                  +
                                                                                                                                  4725 Peer_socket::Lock_guard lock(sock->m_mutex); // Many threads can access/write below state.
                                                                                                                                  +
                                                                                                                                  4726
                                                                                                                                  +
                                                                                                                                  4727 /* Our task here is to return true if and only if at this very moment calling sock->send() would
                                                                                                                                  +
                                                                                                                                  4728 * yield either a return value of > 0 OR a non-success *err_code. In other words, send() would
                                                                                                                                  +
                                                                                                                                  4729 * return "something." This is used for Event_set machinery.
                                                                                                                                  +
                                                                                                                                  4730 *
                                                                                                                                  +
                                                                                                                                  4731 * This should mirror send()'s algorithm. @todo Should send() call this, for code reuse?
                                                                                                                                  +
                                                                                                                                  4732 * Maybe/maybe not. Consider performance when deciding.
                                                                                                                                  +
                                                                                                                                  4733 *
                                                                                                                                  +
                                                                                                                                  4734 * - If state is CLOSED, then some sort of error/terminating condition occurred, so send()
                                                                                                                                  +
                                                                                                                                  4735 * would return 0 and non-success Error_code == sock->m_disconnect_cause. (Writable.)
                                                                                                                                  +
                                                                                                                                  4736 * - Otherwise, if state is OPEN+DISCONNECTING, then graceful close (@todo implement it) is
                                                                                                                                  +
                                                                                                                                  4737 * underway; we do not allow more data to be sent (except what's already in Sent buffer), so
                                                                                                                                  +
                                                                                                                                  4738 * send() would return 0 and non-success Error_code == sock->m_disconnect_cause.
                                                                                                                                  +
                                                                                                                                  4739 * (Writable.)
                                                                                                                                  +
                                                                                                                                  4740 * - Otherwise, if state is OPEN+CONNECTED, and there is Send buffer space, send() would return >
                                                                                                                                  +
                                                                                                                                  4741 * 0 and no error. (Writable.)
                                                                                                                                  +
                                                                                                                                  4742 * - The other remaining possibilities:
                                                                                                                                  +
                                                                                                                                  4743 * - OPEN+CONNECTED but no Send buffer space (returns 0, no error). (Not Writable.)
                                                                                                                                  +
                                                                                                                                  4744 * - OPEN+CONNECTING -- we don't allow accumulating data in Send buffer (returns 0, no error).
                                                                                                                                  +
                                                                                                                                  4745 * (Not Writable.) */
                                                                                                                                  4746
                                                                                                                                  - -
                                                                                                                                  4748{
                                                                                                                                  -
                                                                                                                                  4749 // See big comment block in Node::send() first.
                                                                                                                                  -
                                                                                                                                  4750
                                                                                                                                  -
                                                                                                                                  4751 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4747 return (sock->m_state == Peer_socket::State::S_CLOSED)
                                                                                                                                  +
                                                                                                                                  4748 || (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING)
                                                                                                                                  +
                                                                                                                                  4749 || ((sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  +
                                                                                                                                  4750 && snd_buf_enqable(sock));
                                                                                                                                  +
                                                                                                                                  4751} // Node::sock_is_writable()
                                                                                                                                  4752
                                                                                                                                  -
                                                                                                                                  4753 /* This method can be thought of as the chunk of the finite state machine that defines what
                                                                                                                                  -
                                                                                                                                  4754 * happens when the "user called send, adding at least 1 block to the send buffer" (@todo: or any data
                                                                                                                                  -
                                                                                                                                  4755 * at all, if in reliable mode?) event is defined. Therefore, we will have a switch() that will handle every
                                                                                                                                  -
                                                                                                                                  4756 * state and decide what should happen when that event fires in that state.
                                                                                                                                  -
                                                                                                                                  4757 *
                                                                                                                                  -
                                                                                                                                  4758 * send() placed us onto thread W. When send() did so, m_int_state (which it was not allowed to
                                                                                                                                  -
                                                                                                                                  4759 * check, as only thread W can access it) was at least ESTABLISHED (since state was
                                                                                                                                  -
                                                                                                                                  4760 * S_OPEN+S_CONNECTED, ensured via assert()). Therefore, we can eliminate several states with
                                                                                                                                  -
                                                                                                                                  4761 * assert()s: SYN_SENT, SYN_RCVD. */
                                                                                                                                  -
                                                                                                                                  4762
                                                                                                                                  -
                                                                                                                                  4763 switch (sock->m_int_state)
                                                                                                                                  -
                                                                                                                                  4764 {
                                                                                                                                  - -
                                                                                                                                  4766 // Mainstream case.
                                                                                                                                  -
                                                                                                                                  4767 send_worker(sock, false);
                                                                                                                                  -
                                                                                                                                  4768 /* ^-- defer_delta_check == false: because we were invoked from thread U != W, we are NOT
                                                                                                                                  -
                                                                                                                                  4769 * invoked from async_low_lvl_recv(). Therefore, we will NOT perform
                                                                                                                                  -
                                                                                                                                  4770 * event_set_all_check_delta(false) before the boost.asio handler exits. Therefore boost.asio
                                                                                                                                  -
                                                                                                                                  4771 * may sleep (block) before event_set_all_check_delta(false). Therefore that would delay
                                                                                                                                  -
                                                                                                                                  4772 * delivery of the Writable event to the user. Therefore force the delta check immediately.
                                                                                                                                  -
                                                                                                                                  4773 * See Node::m_sock_events doc header for details. */
                                                                                                                                  -
                                                                                                                                  4774 break;
                                                                                                                                  - -
                                                                                                                                  4776 // Unlikely but legitimate.
                                                                                                                                  -
                                                                                                                                  4777 FLOW_LOG_INFO('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  4778 "in state [" << sock->m_int_state << "] "
                                                                                                                                  -
                                                                                                                                  4779 "closed before asynchronous send_worker() could proceed.");
                                                                                                                                  + +
                                                                                                                                  4754{
                                                                                                                                  +
                                                                                                                                  4755 // See big comment block in Node::send() first.
                                                                                                                                  +
                                                                                                                                  4756
                                                                                                                                  +
                                                                                                                                  4757 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4758
                                                                                                                                  +
                                                                                                                                  4759 /* This method can be thought of as the chunk of the finite state machine that defines what
                                                                                                                                  +
                                                                                                                                  4760 * happens when the "user called send, adding at least 1 block to the send buffer" (@todo: or any data
                                                                                                                                  +
                                                                                                                                  4761 * at all, if in reliable mode?) event is defined. Therefore, we will have a switch() that will handle every
                                                                                                                                  +
                                                                                                                                  4762 * state and decide what should happen when that event fires in that state.
                                                                                                                                  +
                                                                                                                                  4763 *
                                                                                                                                  +
                                                                                                                                  4764 * send() placed us onto thread W. When send() did so, m_int_state (which it was not allowed to
                                                                                                                                  +
                                                                                                                                  4765 * check, as only thread W can access it) was at least ESTABLISHED (since state was
                                                                                                                                  +
                                                                                                                                  4766 * S_OPEN+S_CONNECTED, ensured via assert()). Therefore, we can eliminate several states with
                                                                                                                                  +
                                                                                                                                  4767 * assert()s: SYN_SENT, SYN_RCVD. */
                                                                                                                                  +
                                                                                                                                  4768
                                                                                                                                  +
                                                                                                                                  4769 switch (sock->m_int_state)
                                                                                                                                  +
                                                                                                                                  4770 {
                                                                                                                                  + +
                                                                                                                                  4772 // Mainstream case.
                                                                                                                                  +
                                                                                                                                  4773 send_worker(sock, false);
                                                                                                                                  +
                                                                                                                                  4774 /* ^-- defer_delta_check == false: because we were invoked from thread U != W, we are NOT
                                                                                                                                  +
                                                                                                                                  4775 * invoked from async_low_lvl_recv(). Therefore, we will NOT perform
                                                                                                                                  +
                                                                                                                                  4776 * event_set_all_check_delta(false) before the boost.asio handler exits. Therefore boost.asio
                                                                                                                                  +
                                                                                                                                  4777 * may sleep (block) before event_set_all_check_delta(false). Therefore that would delay
                                                                                                                                  +
                                                                                                                                  4778 * delivery of the Writable event to the user. Therefore force the delta check immediately.
                                                                                                                                  +
                                                                                                                                  4779 * See Node::m_sock_events doc header for details. */
                                                                                                                                  4780 break;
                                                                                                                                  - - -
                                                                                                                                  4783 // Crash. See above reasoning.
                                                                                                                                  -
                                                                                                                                  4784 FLOW_LOG_WARNING('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  4785 "in state [" << sock->m_int_state << "] "
                                                                                                                                  -
                                                                                                                                  4786 "somehow had send() called on it.");
                                                                                                                                  -
                                                                                                                                  4787 assert(false);
                                                                                                                                  -
                                                                                                                                  4788 break;
                                                                                                                                  -
                                                                                                                                  4789 } // switch (sock->m_int_state)
                                                                                                                                  -
                                                                                                                                  4790} // Node::send_worker_check_state()
                                                                                                                                  -
                                                                                                                                  4791
                                                                                                                                  -
                                                                                                                                  4792void Node::send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  -
                                                                                                                                  4793{
                                                                                                                                  -
                                                                                                                                  4794 using boost::asio::buffer;
                                                                                                                                  -
                                                                                                                                  4795 using boost::next;
                                                                                                                                  -
                                                                                                                                  4796 using boost::ratio;
                                                                                                                                  -
                                                                                                                                  4797 using boost::ratio_string;
                                                                                                                                  -
                                                                                                                                  4798 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  4799 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  4800 using boost::shared_ptr;
                                                                                                                                  -
                                                                                                                                  4801 using std::list;
                                                                                                                                  -
                                                                                                                                  4802
                                                                                                                                  -
                                                                                                                                  4803 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  4804
                                                                                                                                  -
                                                                                                                                  4805 // See big comment block in Node::send() first.
                                                                                                                                  -
                                                                                                                                  4806
                                                                                                                                  -
                                                                                                                                  4807 // Pre-condition.
                                                                                                                                  -
                                                                                                                                  4808 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  -
                                                                                                                                  4809
                                                                                                                                  -
                                                                                                                                  4810 /* We are about to potentially send a bunch of DATA packets. Before sending a given packet, we
                                                                                                                                  -
                                                                                                                                  4811 * will call can_send() which will ask the congestion control module whether there is space in
                                                                                                                                  -
                                                                                                                                  4812 * what it thinks is the available pipe and return true if so (as well as check rcv_wnd, ensuring
                                                                                                                                  -
                                                                                                                                  4813 * the receiver's Receive buffer can handle the data once they arrive). However, how it answers
                                                                                                                                  -
                                                                                                                                  4814 * that question depends on the size of the pipe (m_snd_cong_ctl->congestion_window_bytes(),
                                                                                                                                  -
                                                                                                                                  4815 * a/k/a CWND). Many (most?) congestion control modules will want to reduce CWND when a
                                                                                                                                  -
                                                                                                                                  4816 * connection has been idle -- not sending anything, due to no data to be sent in Send buffer --
                                                                                                                                  -
                                                                                                                                  4817 * for a while. Thus we must call m_snd_cong_ctl->on_idle_timeout() if we've hit Idle Timeout.
                                                                                                                                  -
                                                                                                                                  4818 *
                                                                                                                                  -
                                                                                                                                  4819 * The definition of Idle Timeout we use is from TCP RFC 5681-4.1 (and DCCP CCID 2 RFC 4341-5.1).
                                                                                                                                  -
                                                                                                                                  4820 * It's simple: Idle Timeout is DTO (Drop Timeout) time units since a DATA packet has been last
                                                                                                                                  -
                                                                                                                                  4821 * sent. While I basically grasp the intuition behind it (if a DTO since even the last-sent
                                                                                                                                  -
                                                                                                                                  4822 * packet has expired, and no retransmission/further transmission has occurred, then there must
                                                                                                                                  -
                                                                                                                                  4823 * have been no more data for a while), I can't quite prove to myself that it's exactly right,
                                                                                                                                  -
                                                                                                                                  4824 * mostly due to the fact that DTO may change over time. It's probably right though, as RFC 4341
                                                                                                                                  -
                                                                                                                                  4825 * recommends it, even though that protocol is closer to NetFlow than TCP (full selective ACKs).
                                                                                                                                  -
                                                                                                                                  4826 * Anyway, if we see too many false Idle timeouts, revisit this.
                                                                                                                                  -
                                                                                                                                  4827 *
                                                                                                                                  -
                                                                                                                                  4828 * Why check this now? Why not start a proper timer, each time packet is sent, instead and just
                                                                                                                                  -
                                                                                                                                  4829 * inform m_snd_cong_ctl when it fires? Answer: timer management is somewhat of a pain in the ass
                                                                                                                                  -
                                                                                                                                  4830 * (as you can see in our other various timers, such as m_snd_drop_timer). Here we have an opportunity
                                                                                                                                  -
                                                                                                                                  4831 * to simply check the condition and affect CWND right before CWND would be used anyway
                                                                                                                                  -
                                                                                                                                  4832 * (can_send()). It's simpler, and the performance impact is negligible (it's just a
                                                                                                                                  -
                                                                                                                                  4833 * Fine_clock::now() call and a comparison). You ask, why not do the same for other timers
                                                                                                                                  -
                                                                                                                                  4834 * then, in particular the Drop Timer? Answer: for Drop Timer, we really need to know exactly
                                                                                                                                  -
                                                                                                                                  4835 * when it fires, so that we can Drop In-flight packets right then and possibly send more
                                                                                                                                  -
                                                                                                                                  4836 * packets (among other things). In this case there is no such requirement; we only care about
                                                                                                                                  -
                                                                                                                                  4837 * whether the Idle Timeout has tripped when we're about to send something. */
                                                                                                                                  -
                                                                                                                                  4838
                                                                                                                                  -
                                                                                                                                  4839 /* To avoid a very close race between DTO and idle timeout, apply a slight factor of > 1 to DTO.
                                                                                                                                  -
                                                                                                                                  4840 * Using boost::ratio<> instead of a double or something for same reason as in
                                                                                                                                  -
                                                                                                                                  4841 * new_round_trip_time_sample(). */
                                                                                                                                  -
                                                                                                                                  4842 using Idle_timeout_dto_factor = ratio<110, 100>;
                                                                                                                                  -
                                                                                                                                  4843 const Fine_duration idle_timeout
                                                                                                                                  -
                                                                                                                                  4844 = sock->m_snd_drop_timeout * Idle_timeout_dto_factor::num / Idle_timeout_dto_factor::den;
                                                                                                                                  -
                                                                                                                                  4845 const Fine_duration since_last_send = Fine_clock::now() - sock->m_snd_last_data_sent_when;
                                                                                                                                  -
                                                                                                                                  4846
                                                                                                                                  -
                                                                                                                                  4847 if ((sock->m_snd_last_data_sent_when != Fine_time_pt()) && (since_last_send > idle_timeout))
                                                                                                                                  -
                                                                                                                                  4848 {
                                                                                                                                  -
                                                                                                                                  4849 // Arguable if this should be INFO or TRACE. We'll see.
                                                                                                                                  -
                                                                                                                                  4850 FLOW_LOG_INFO("Idle timeout triggered for [" << sock << "]; "
                                                                                                                                  -
                                                                                                                                  4851 "last activity [" << round<milliseconds>(since_last_send) << "] ago "
                                                                                                                                  -
                                                                                                                                  4852 "exceeds idle timeout [" << round<milliseconds>(idle_timeout) << "] "
                                                                                                                                  -
                                                                                                                                  4853 "= " << (ratio_string<Idle_timeout_dto_factor, char>::prefix()) << " x "
                                                                                                                                  -
                                                                                                                                  4854 "[" << round<milliseconds>(sock->m_snd_drop_timeout) << "].");
                                                                                                                                  -
                                                                                                                                  4855 sock->m_snd_cong_ctl->on_idle_timeout();
                                                                                                                                  -
                                                                                                                                  4856 sock->m_snd_stats.idle_timeout();
                                                                                                                                  -
                                                                                                                                  4857 }
                                                                                                                                  -
                                                                                                                                  4858
                                                                                                                                  -
                                                                                                                                  4859 /* Check networking conditions (presumably congestion control) and flow control (rcv_wnd).
                                                                                                                                  -
                                                                                                                                  4860 * Ideally this would always be true, but then we'd overwhelm the link when send() is invoked on
                                                                                                                                  -
                                                                                                                                  4861 * large amounts of data and/or repeatedly. */
                                                                                                                                  -
                                                                                                                                  4862 if (!can_send(sock))
                                                                                                                                  -
                                                                                                                                  4863 {
                                                                                                                                  -
                                                                                                                                  4864 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  -
                                                                                                                                  4865 "Initial check: can_send() is false.");
                                                                                                                                  -
                                                                                                                                  4866 return;
                                                                                                                                  -
                                                                                                                                  4867 }
                                                                                                                                  -
                                                                                                                                  4868 // else can send if there are data to send.
                                                                                                                                  -
                                                                                                                                  4869
                                                                                                                                  -
                                                                                                                                  4870 /* Didn't lock sock above, as can_send() depends only on internal state, which is accessed from
                                                                                                                                  -
                                                                                                                                  4871 * thread W only. This is an optimization to avoid thread contention (with non-W send()s) for the
                                                                                                                                  -
                                                                                                                                  4872 * lock in the case when congestion control is preventing sends.
                                                                                                                                  -
                                                                                                                                  4873 *
                                                                                                                                  -
                                                                                                                                  4874 * Have to lock now, for sock->m_snd_buf access (at least). */
                                                                                                                                  + +
                                                                                                                                  4782 // Unlikely but legitimate.
                                                                                                                                  +
                                                                                                                                  4783 FLOW_LOG_INFO('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  4784 "in state [" << sock->m_int_state << "] "
                                                                                                                                  +
                                                                                                                                  4785 "closed before asynchronous send_worker() could proceed.");
                                                                                                                                  +
                                                                                                                                  4786 break;
                                                                                                                                  + + +
                                                                                                                                  4789 // Crash. See above reasoning.
                                                                                                                                  +
                                                                                                                                  4790 FLOW_LOG_WARNING('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  4791 "in state [" << sock->m_int_state << "] "
                                                                                                                                  +
                                                                                                                                  4792 "somehow had send() called on it.");
                                                                                                                                  +
                                                                                                                                  4793 assert(false);
                                                                                                                                  +
                                                                                                                                  4794 break;
                                                                                                                                  +
                                                                                                                                  4795 } // switch (sock->m_int_state)
                                                                                                                                  +
                                                                                                                                  4796} // Node::send_worker_check_state()
                                                                                                                                  +
                                                                                                                                  4797
                                                                                                                                  +
                                                                                                                                  4798void Node::send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  +
                                                                                                                                  4799{
                                                                                                                                  +
                                                                                                                                  4800 using boost::asio::buffer;
                                                                                                                                  +
                                                                                                                                  4801 using boost::next;
                                                                                                                                  +
                                                                                                                                  4802 using boost::ratio;
                                                                                                                                  +
                                                                                                                                  4803 using boost::ratio_string;
                                                                                                                                  +
                                                                                                                                  4804 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  4805 using boost::chrono::round;
                                                                                                                                  +
                                                                                                                                  4806 using boost::shared_ptr;
                                                                                                                                  +
                                                                                                                                  4807 using std::list;
                                                                                                                                  +
                                                                                                                                  4808
                                                                                                                                  +
                                                                                                                                  4809 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  4810
                                                                                                                                  +
                                                                                                                                  4811 // See big comment block in Node::send() first.
                                                                                                                                  +
                                                                                                                                  4812
                                                                                                                                  +
                                                                                                                                  4813 // Pre-condition.
                                                                                                                                  +
                                                                                                                                  4814 assert(sock->m_int_state == Peer_socket::Int_state::S_ESTABLISHED);
                                                                                                                                  +
                                                                                                                                  4815
                                                                                                                                  +
                                                                                                                                  4816 /* We are about to potentially send a bunch of DATA packets. Before sending a given packet, we
                                                                                                                                  +
                                                                                                                                  4817 * will call can_send() which will ask the congestion control module whether there is space in
                                                                                                                                  +
                                                                                                                                  4818 * what it thinks is the available pipe and return true if so (as well as check rcv_wnd, ensuring
                                                                                                                                  +
                                                                                                                                  4819 * the receiver's Receive buffer can handle the data once they arrive). However, how it answers
                                                                                                                                  +
                                                                                                                                  4820 * that question depends on the size of the pipe (m_snd_cong_ctl->congestion_window_bytes(),
                                                                                                                                  +
                                                                                                                                  4821 * a/k/a CWND). Many (most?) congestion control modules will want to reduce CWND when a
                                                                                                                                  +
                                                                                                                                  4822 * connection has been idle -- not sending anything, due to no data to be sent in Send buffer --
                                                                                                                                  +
                                                                                                                                  4823 * for a while. Thus we must call m_snd_cong_ctl->on_idle_timeout() if we've hit Idle Timeout.
                                                                                                                                  +
                                                                                                                                  4824 *
                                                                                                                                  +
                                                                                                                                  4825 * The definition of Idle Timeout we use is from TCP RFC 5681-4.1 (and DCCP CCID 2 RFC 4341-5.1).
                                                                                                                                  +
                                                                                                                                  4826 * It's simple: Idle Timeout is DTO (Drop Timeout) time units since a DATA packet has been last
                                                                                                                                  +
                                                                                                                                  4827 * sent. While I basically grasp the intuition behind it (if a DTO since even the last-sent
                                                                                                                                  +
                                                                                                                                  4828 * packet has expired, and no retransmission/further transmission has occurred, then there must
                                                                                                                                  +
                                                                                                                                  4829 * have been no more data for a while), I can't quite prove to myself that it's exactly right,
                                                                                                                                  +
                                                                                                                                  4830 * mostly due to the fact that DTO may change over time. It's probably right though, as RFC 4341
                                                                                                                                  +
                                                                                                                                  4831 * recommends it, even though that protocol is closer to NetFlow than TCP (full selective ACKs).
                                                                                                                                  +
                                                                                                                                  4832 * Anyway, if we see too many false Idle timeouts, revisit this.
                                                                                                                                  +
                                                                                                                                  4833 *
                                                                                                                                  +
                                                                                                                                  4834 * Why check this now? Why not start a proper timer, each time packet is sent, instead and just
                                                                                                                                  +
                                                                                                                                  4835 * inform m_snd_cong_ctl when it fires? Answer: timer management is somewhat of a pain in the ass
                                                                                                                                  +
                                                                                                                                  4836 * (as you can see in our other various timers, such as m_snd_drop_timer). Here we have an opportunity
                                                                                                                                  +
                                                                                                                                  4837 * to simply check the condition and affect CWND right before CWND would be used anyway
                                                                                                                                  +
                                                                                                                                  4838 * (can_send()). It's simpler, and the performance impact is negligible (it's just a
                                                                                                                                  +
                                                                                                                                  4839 * Fine_clock::now() call and a comparison). You ask, why not do the same for other timers
                                                                                                                                  +
                                                                                                                                  4840 * then, in particular the Drop Timer? Answer: for Drop Timer, we really need to know exactly
                                                                                                                                  +
                                                                                                                                  4841 * when it fires, so that we can Drop In-flight packets right then and possibly send more
                                                                                                                                  +
                                                                                                                                  4842 * packets (among other things). In this case there is no such requirement; we only care about
                                                                                                                                  +
                                                                                                                                  4843 * whether the Idle Timeout has tripped when we're about to send something. */
                                                                                                                                  +
                                                                                                                                  4844
                                                                                                                                  +
                                                                                                                                  4845 /* To avoid a very close race between DTO and idle timeout, apply a slight factor of > 1 to DTO.
                                                                                                                                  +
                                                                                                                                  4846 * Using boost::ratio<> instead of a double or something for same reason as in
                                                                                                                                  +
                                                                                                                                  4847 * new_round_trip_time_sample(). */
                                                                                                                                  +
                                                                                                                                  4848 using Idle_timeout_dto_factor = ratio<110, 100>;
                                                                                                                                  +
                                                                                                                                  4849 const Fine_duration idle_timeout
                                                                                                                                  +
                                                                                                                                  4850 = sock->m_snd_drop_timeout * Idle_timeout_dto_factor::num / Idle_timeout_dto_factor::den;
                                                                                                                                  +
                                                                                                                                  4851 const Fine_duration since_last_send = Fine_clock::now() - sock->m_snd_last_data_sent_when;
                                                                                                                                  +
                                                                                                                                  4852
                                                                                                                                  +
                                                                                                                                  4853 if ((sock->m_snd_last_data_sent_when != Fine_time_pt()) && (since_last_send > idle_timeout))
                                                                                                                                  +
                                                                                                                                  4854 {
                                                                                                                                  +
                                                                                                                                  4855 // Arguable if this should be INFO or TRACE. We'll see.
                                                                                                                                  +
                                                                                                                                  4856 FLOW_LOG_INFO("Idle timeout triggered for [" << sock << "]; "
                                                                                                                                  +
                                                                                                                                  4857 "last activity [" << round<milliseconds>(since_last_send) << "] ago "
                                                                                                                                  +
                                                                                                                                  4858 "exceeds idle timeout [" << round<milliseconds>(idle_timeout) << "] "
                                                                                                                                  +
                                                                                                                                  4859 "= " << (ratio_string<Idle_timeout_dto_factor, char>::prefix()) << " x "
                                                                                                                                  +
                                                                                                                                  4860 "[" << round<milliseconds>(sock->m_snd_drop_timeout) << "].");
                                                                                                                                  +
                                                                                                                                  4861 sock->m_snd_cong_ctl->on_idle_timeout();
                                                                                                                                  +
                                                                                                                                  4862 sock->m_snd_stats.idle_timeout();
                                                                                                                                  +
                                                                                                                                  4863 }
                                                                                                                                  +
                                                                                                                                  4864
                                                                                                                                  +
                                                                                                                                  4865 /* Check networking conditions (presumably congestion control) and flow control (rcv_wnd).
                                                                                                                                  +
                                                                                                                                  4866 * Ideally this would always be true, but then we'd overwhelm the link when send() is invoked on
                                                                                                                                  +
                                                                                                                                  4867 * large amounts of data and/or repeatedly. */
                                                                                                                                  +
                                                                                                                                  4868 if (!can_send(sock))
                                                                                                                                  +
                                                                                                                                  4869 {
                                                                                                                                  +
                                                                                                                                  4870 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  +
                                                                                                                                  4871 "Initial check: can_send() is false.");
                                                                                                                                  +
                                                                                                                                  4872 return;
                                                                                                                                  +
                                                                                                                                  4873 }
                                                                                                                                  +
                                                                                                                                  4874 // else can send if there are data to send.
                                                                                                                                  4875
                                                                                                                                  -
                                                                                                                                  4876 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  -
                                                                                                                                  4877 bool writable; // See below.
                                                                                                                                  -
                                                                                                                                  4878 {
                                                                                                                                  -
                                                                                                                                  4879 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  4880
                                                                                                                                  -
                                                                                                                                  4881 // Check whether enough data in retransmission queue or snd_buf to send a packet.
                                                                                                                                  -
                                                                                                                                  4882 if (!snd_deqable(sock))
                                                                                                                                  -
                                                                                                                                  4883 {
                                                                                                                                  -
                                                                                                                                  4884 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  -
                                                                                                                                  4885 "Initial check: can_send() is true, but no data to send.");
                                                                                                                                  -
                                                                                                                                  4886 return;
                                                                                                                                  -
                                                                                                                                  4887 }
                                                                                                                                  -
                                                                                                                                  4888 // else can send >= 1 packet.
                                                                                                                                  -
                                                                                                                                  4889
                                                                                                                                  -
                                                                                                                                  4890 // For brevity and a bit of speed:
                                                                                                                                  -
                                                                                                                                  4891 Socket_buffer& snd_buf = sock->m_snd_buf;
                                                                                                                                  -
                                                                                                                                  4892 list<Peer_socket::Sent_packet::Ptr>& rexmit_q = sock->m_snd_rexmit_q;
                                                                                                                                  -
                                                                                                                                  4893 size_t& rexmit_q_size = sock->m_snd_rexmit_q_size;
                                                                                                                                  -
                                                                                                                                  4894 Sequence_number& snd_next_seq_num = sock->m_snd_next_seq_num;
                                                                                                                                  +
                                                                                                                                  4876 /* Didn't lock sock above, as can_send() depends only on internal state, which is accessed from
                                                                                                                                  +
                                                                                                                                  4877 * thread W only. This is an optimization to avoid thread contention (with non-W send()s) for the
                                                                                                                                  +
                                                                                                                                  4878 * lock in the case when congestion control is preventing sends.
                                                                                                                                  +
                                                                                                                                  4879 *
                                                                                                                                  +
                                                                                                                                  4880 * Have to lock now, for sock->m_snd_buf access (at least). */
                                                                                                                                  +
                                                                                                                                  4881
                                                                                                                                  +
                                                                                                                                  4882 const bool rexmit_on = sock->rexmit_on();
                                                                                                                                  +
                                                                                                                                  4883 bool writable; // See below.
                                                                                                                                  +
                                                                                                                                  4884 {
                                                                                                                                  +
                                                                                                                                  4885 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  4886
                                                                                                                                  +
                                                                                                                                  4887 // Check whether enough data in retransmission queue or snd_buf to send a packet.
                                                                                                                                  +
                                                                                                                                  4888 if (!snd_deqable(sock))
                                                                                                                                  +
                                                                                                                                  4889 {
                                                                                                                                  +
                                                                                                                                  4890 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  +
                                                                                                                                  4891 "Initial check: can_send() is true, but no data to send.");
                                                                                                                                  +
                                                                                                                                  4892 return;
                                                                                                                                  +
                                                                                                                                  4893 }
                                                                                                                                  +
                                                                                                                                  4894 // else can send >= 1 packet.
                                                                                                                                  4895
                                                                                                                                  -
                                                                                                                                  4896 // @todo Implement graceful close.
                                                                                                                                  -
                                                                                                                                  4897 assert(sock->m_open_sub_state != Peer_socket::Open_sub_state::S_DISCONNECTING);
                                                                                                                                  -
                                                                                                                                  4898
                                                                                                                                  -
                                                                                                                                  4899 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  -
                                                                                                                                  4900 "Initial check: Will send from rexmit queue of size [" << rexmit_q_size << "] and/or "
                                                                                                                                  -
                                                                                                                                  4901 "Send buffer with total size [" << snd_buf.data_size() << "].");
                                                                                                                                  -
                                                                                                                                  4902 // Very verbose and CPU-intensive!
                                                                                                                                  -
                                                                                                                                  4903 FLOW_LOG_DATA("Send buffer data = [\n" << snd_buf << "].");
                                                                                                                                  +
                                                                                                                                  4896 // For brevity and a bit of speed:
                                                                                                                                  +
                                                                                                                                  4897 Socket_buffer& snd_buf = sock->m_snd_buf;
                                                                                                                                  +
                                                                                                                                  4898 list<Peer_socket::Sent_packet::Ptr>& rexmit_q = sock->m_snd_rexmit_q;
                                                                                                                                  +
                                                                                                                                  4899 size_t& rexmit_q_size = sock->m_snd_rexmit_q_size;
                                                                                                                                  +
                                                                                                                                  4900 Sequence_number& snd_next_seq_num = sock->m_snd_next_seq_num;
                                                                                                                                  +
                                                                                                                                  4901
                                                                                                                                  +
                                                                                                                                  4902 // @todo Implement graceful close.
                                                                                                                                  +
                                                                                                                                  4903 assert(sock->m_open_sub_state != Peer_socket::Open_sub_state::S_DISCONNECTING);
                                                                                                                                  4904
                                                                                                                                  -
                                                                                                                                  4905 // Send packets until one or both of can_send() and snd_deqable() become false.
                                                                                                                                  -
                                                                                                                                  4906 do
                                                                                                                                  -
                                                                                                                                  4907 {
                                                                                                                                  -
                                                                                                                                  4908 shared_ptr<Data_packet> data;
                                                                                                                                  - -
                                                                                                                                  4910 bool rexmit = false;
                                                                                                                                  -
                                                                                                                                  4911
                                                                                                                                  -
                                                                                                                                  4912 /* Record send time. It's only a temporary value for logging, until we
                                                                                                                                  -
                                                                                                                                  4913 * actually send packet. However, do generate the permanent m_order_num, which is unique. */
                                                                                                                                  -
                                                                                                                                  4914 Peer_socket::Sent_packet::Sent_when sent_when{ sock_get_new_snd_order_num(sock), Fine_clock::now(), 0 };
                                                                                                                                  -
                                                                                                                                  4915
                                                                                                                                  -
                                                                                                                                  4916 /* To provide the best experience on the receiving side, retransmit before sending new data,
                                                                                                                                  -
                                                                                                                                  4917 * so that Receive buffer on other side receives data as soon as possible. */
                                                                                                                                  -
                                                                                                                                  4918 if (rexmit_q.empty())
                                                                                                                                  -
                                                                                                                                  4919 {
                                                                                                                                  -
                                                                                                                                  4920 // Nothing in retransmission queue, so something is in Send buffer.
                                                                                                                                  +
                                                                                                                                  4905 FLOW_LOG_TRACE('[' << sock << "]: "
                                                                                                                                  +
                                                                                                                                  4906 "Initial check: Will send from rexmit queue of size [" << rexmit_q_size << "] and/or "
                                                                                                                                  +
                                                                                                                                  4907 "Send buffer with total size [" << snd_buf.data_size() << "].");
                                                                                                                                  +
                                                                                                                                  4908 // Very verbose and CPU-intensive!
                                                                                                                                  +
                                                                                                                                  4909 FLOW_LOG_DATA("Send buffer data = [\n" << snd_buf << "].");
                                                                                                                                  +
                                                                                                                                  4910
                                                                                                                                  +
                                                                                                                                  4911 // Send packets until one or both of can_send() and snd_deqable() become false.
                                                                                                                                  +
                                                                                                                                  4912 do
                                                                                                                                  +
                                                                                                                                  4913 {
                                                                                                                                  +
                                                                                                                                  4914 shared_ptr<Data_packet> data;
                                                                                                                                  + +
                                                                                                                                  4916 bool rexmit = false;
                                                                                                                                  +
                                                                                                                                  4917
                                                                                                                                  +
                                                                                                                                  4918 /* Record send time. It's only a temporary value for logging, until we
                                                                                                                                  +
                                                                                                                                  4919 * actually send packet. However, do generate the permanent m_order_num, which is unique. */
                                                                                                                                  +
                                                                                                                                  4920 Peer_socket::Sent_packet::Sent_when sent_when{ sock_get_new_snd_order_num(sock), Fine_clock::now(), 0 };
                                                                                                                                  4921
                                                                                                                                  -
                                                                                                                                  4922 // Create low-level DATA packet.
                                                                                                                                  -
                                                                                                                                  4923 data = Low_lvl_packet::create_uninit_packet<Data_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  4924 data->m_rexmit_id = 0; // First (if retransmission is off, only) send attempt.
                                                                                                                                  -
                                                                                                                                  4925
                                                                                                                                  -
                                                                                                                                  4926 // Dequeue one block into the packet's data field.
                                                                                                                                  +
                                                                                                                                  4922 /* To provide the best experience on the receiving side, retransmit before sending new data,
                                                                                                                                  +
                                                                                                                                  4923 * so that Receive buffer on other side receives data as soon as possible. */
                                                                                                                                  +
                                                                                                                                  4924 if (rexmit_q.empty())
                                                                                                                                  +
                                                                                                                                  4925 {
                                                                                                                                  +
                                                                                                                                  4926 // Nothing in retransmission queue, so something is in Send buffer.
                                                                                                                                  4927
                                                                                                                                  -
                                                                                                                                  4928 /* Try to dequeue the head block directly into data.m_data. Because we are operating snd_buf
                                                                                                                                  -
                                                                                                                                  4929 * with block_size_hint == sock->max_block_size(); and because we don't send unless CWND
                                                                                                                                  -
                                                                                                                                  4930 * allows for at least max_block_size() bytes to be sent, the following should be a
                                                                                                                                  -
                                                                                                                                  4931 * constant-time operation (a swap of internal buffers) as opposed to a copy. */
                                                                                                                                  -
                                                                                                                                  4932 snd_buf.consume_buf_move(&data->m_data, sock->max_block_size());
                                                                                                                                  +
                                                                                                                                  4928 // Create low-level DATA packet.
                                                                                                                                  +
                                                                                                                                  4929 data = Low_lvl_packet::create_uninit_packet<Data_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  4930 data->m_rexmit_id = 0; // First (if retransmission is off, only) send attempt.
                                                                                                                                  +
                                                                                                                                  4931
                                                                                                                                  +
                                                                                                                                  4932 // Dequeue one block into the packet's data field.
                                                                                                                                  4933
                                                                                                                                  -
                                                                                                                                  4934 // snd_deqable() returned true, so there must be at least one byte available.
                                                                                                                                  -
                                                                                                                                  4935 assert(!data->m_data.empty());
                                                                                                                                  -
                                                                                                                                  4936
                                                                                                                                  -
                                                                                                                                  4937 // Set sequence number; then advance the next sequence number variable for the next time we do this.
                                                                                                                                  -
                                                                                                                                  4938 data->m_seq_num = snd_next_seq_num;
                                                                                                                                  -
                                                                                                                                  4939 advance_seq_num(&snd_next_seq_num, data);
                                                                                                                                  -
                                                                                                                                  4940
                                                                                                                                  -
                                                                                                                                  4941 /* We are just about to send the packet. Assume it has been sent. It is not yet Acknowledged
                                                                                                                                  -
                                                                                                                                  4942 * and not yet Dropped. Therefore it is now In-flight. We should place its info at the back of
                                                                                                                                  -
                                                                                                                                  4943 * m_snd_flying_pkts_by_sent_when. We must maintain the invariant w/r/t that structure (see comment
                                                                                                                                  -
                                                                                                                                  4944 * for m_snd_flying_pkts_by_sent_when).
                                                                                                                                  -
                                                                                                                                  4945 *
                                                                                                                                  -
                                                                                                                                  4946 * Purpose of keeping these data: at least for comparison against Congestion Window,
                                                                                                                                  -
                                                                                                                                  4947 * for congestion control. */
                                                                                                                                  -
                                                                                                                                  4948
                                                                                                                                  -
                                                                                                                                  4949 // Guarantee that the new sequence number is > all the currently In-flight ones.
                                                                                                                                  -
                                                                                                                                  4950 assert(data->m_seq_num >= snd_past_last_flying_datum_seq_num(sock));
                                                                                                                                  -
                                                                                                                                  4951 /* Therefore we will add the following to the end of the map's ordering. Note we've
                                                                                                                                  -
                                                                                                                                  4952 * incremented m_snd_next_seq_num already, maintaining that member's invariant relationship
                                                                                                                                  -
                                                                                                                                  4953 * with m_snd_flying_pkts_by_sent_when. */
                                                                                                                                  +
                                                                                                                                  4934 /* Try to dequeue the head block directly into data.m_data. Because we are operating snd_buf
                                                                                                                                  +
                                                                                                                                  4935 * with block_size_hint == sock->max_block_size(); and because we don't send unless CWND
                                                                                                                                  +
                                                                                                                                  4936 * allows for at least max_block_size() bytes to be sent, the following should be a
                                                                                                                                  +
                                                                                                                                  4937 * constant-time operation (a swap of internal buffers) as opposed to a copy. */
                                                                                                                                  +
                                                                                                                                  4938 snd_buf.consume_buf_move(&data->m_data, sock->max_block_size());
                                                                                                                                  +
                                                                                                                                  4939
                                                                                                                                  +
                                                                                                                                  4940 // snd_deqable() returned true, so there must be at least one byte available.
                                                                                                                                  +
                                                                                                                                  4941 assert(!data->m_data.empty());
                                                                                                                                  +
                                                                                                                                  4942
                                                                                                                                  +
                                                                                                                                  4943 // Set sequence number; then advance the next sequence number variable for the next time we do this.
                                                                                                                                  +
                                                                                                                                  4944 data->m_seq_num = snd_next_seq_num;
                                                                                                                                  +
                                                                                                                                  4945 advance_seq_num(&snd_next_seq_num, data);
                                                                                                                                  +
                                                                                                                                  4946
                                                                                                                                  +
                                                                                                                                  4947 /* We are just about to send the packet. Assume it has been sent. It is not yet Acknowledged
                                                                                                                                  +
                                                                                                                                  4948 * and not yet Dropped. Therefore it is now In-flight. We should place its info at the back of
                                                                                                                                  +
                                                                                                                                  4949 * m_snd_flying_pkts_by_sent_when. We must maintain the invariant w/r/t that structure (see comment
                                                                                                                                  +
                                                                                                                                  4950 * for m_snd_flying_pkts_by_sent_when).
                                                                                                                                  +
                                                                                                                                  4951 *
                                                                                                                                  +
                                                                                                                                  4952 * Purpose of keeping these data: at least for comparison against Congestion Window,
                                                                                                                                  +
                                                                                                                                  4953 * for congestion control. */
                                                                                                                                  4954
                                                                                                                                  -
                                                                                                                                  4955 // New packet: create new metadata object. Record send time. (The latter will be rewritten later.)
                                                                                                                                  -
                                                                                                                                  4956 sent_pkt = Peer_socket::Sent_packet::Ptr(new Peer_socket::Sent_packet(rexmit_on, data, sent_when));
                                                                                                                                  -
                                                                                                                                  4957 }
                                                                                                                                  -
                                                                                                                                  4958 else // if (!rexmit_q.empty())
                                                                                                                                  -
                                                                                                                                  4959 {
                                                                                                                                  -
                                                                                                                                  4960 // Get packet and metadata from front of retransmission queue.
                                                                                                                                  -
                                                                                                                                  4961 rexmit = true;
                                                                                                                                  -
                                                                                                                                  4962 sent_pkt = rexmit_q.front();
                                                                                                                                  -
                                                                                                                                  4963
                                                                                                                                  -
                                                                                                                                  4964 --rexmit_q_size;
                                                                                                                                  -
                                                                                                                                  4965 rexmit_q.pop_front();
                                                                                                                                  -
                                                                                                                                  4966
                                                                                                                                  -
                                                                                                                                  4967 // We'd saved the packet we sent last time -- just need to update some things before resending.
                                                                                                                                  -
                                                                                                                                  4968 data = sent_pkt->m_packet;
                                                                                                                                  +
                                                                                                                                  4955 // Guarantee that the new sequence number is > all the currently In-flight ones.
                                                                                                                                  +
                                                                                                                                  4956 assert(data->m_seq_num >= snd_past_last_flying_datum_seq_num(sock));
                                                                                                                                  +
                                                                                                                                  4957 /* Therefore we will add the following to the end of the map's ordering. Note we've
                                                                                                                                  +
                                                                                                                                  4958 * incremented m_snd_next_seq_num already, maintaining that member's invariant relationship
                                                                                                                                  +
                                                                                                                                  4959 * with m_snd_flying_pkts_by_sent_when. */
                                                                                                                                  +
                                                                                                                                  4960
                                                                                                                                  +
                                                                                                                                  4961 // New packet: create new metadata object. Record send time. (The latter will be rewritten later.)
                                                                                                                                  +
                                                                                                                                  4962 sent_pkt = Peer_socket::Sent_packet::Ptr(new Peer_socket::Sent_packet(rexmit_on, data, sent_when));
                                                                                                                                  +
                                                                                                                                  4963 }
                                                                                                                                  +
                                                                                                                                  4964 else // if (!rexmit_q.empty())
                                                                                                                                  +
                                                                                                                                  4965 {
                                                                                                                                  +
                                                                                                                                  4966 // Get packet and metadata from front of retransmission queue.
                                                                                                                                  +
                                                                                                                                  4967 rexmit = true;
                                                                                                                                  +
                                                                                                                                  4968 sent_pkt = rexmit_q.front();
                                                                                                                                  4969
                                                                                                                                  -
                                                                                                                                  4970 // Retransmitting -- update retransmit count ID (used to match acks to the acked transmit attempt).
                                                                                                                                  -
                                                                                                                                  4971 ++data->m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  4970 --rexmit_q_size;
                                                                                                                                  +
                                                                                                                                  4971 rexmit_q.pop_front();
                                                                                                                                  4972
                                                                                                                                  -
                                                                                                                                  4973 // Record the send time of this newest attempt. (If pacing enabled this will be rewritten later.)
                                                                                                                                  -
                                                                                                                                  4974 sent_pkt->m_sent_when.push_back(sent_when);
                                                                                                                                  +
                                                                                                                                  4973 // We'd saved the packet we sent last time -- just need to update some things before resending.
                                                                                                                                  +
                                                                                                                                  4974 data = sent_pkt->m_packet;
                                                                                                                                  4975
                                                                                                                                  -
                                                                                                                                  4976 // Chronologically, no packets sent after this one have been acked yet, as this packet is new.
                                                                                                                                  -
                                                                                                                                  4977 sent_pkt->m_acks_after_me = 0;
                                                                                                                                  -
                                                                                                                                  4978 }
                                                                                                                                  -
                                                                                                                                  4979
                                                                                                                                  -
                                                                                                                                  4980 /* Note: We have saved Fine_clock::now() as the send time of the packet. However, especially
                                                                                                                                  -
                                                                                                                                  4981 * if pacing is enabled, we want to record it at the time it is actually sent (pacing may
                                                                                                                                  -
                                                                                                                                  4982 * delay it). Even if pacing is disabled, CPU pegging may cause a delay in sending (although
                                                                                                                                  -
                                                                                                                                  4983 * whether that should "count" is a more philosophical question). With pacing, though, since
                                                                                                                                  -
                                                                                                                                  4984 * pacing spreads out packets over SRTT, and SRTT is measured based on
                                                                                                                                  -
                                                                                                                                  4985 * Sent_packet::m_sent_when, RTTs artifically become longer and longer if we record the send
                                                                                                                                  -
                                                                                                                                  4986 * time now. Anyway, this means m_sent_when.back() should be overwritten when the packet is
                                                                                                                                  -
                                                                                                                                  4987 * actually sent (which should be very soon, unless pacing is enabled).
                                                                                                                                  -
                                                                                                                                  4988 * See async_sock_low_lvl_packet_send_paced(). */
                                                                                                                                  -
                                                                                                                                  4989
                                                                                                                                  -
                                                                                                                                  4990 // data and sent_pkt are ready.
                                                                                                                                  -
                                                                                                                                  4991
                                                                                                                                  -
                                                                                                                                  4992 // Add to snd_flying_pkts* and friends; update byte counts.
                                                                                                                                  -
                                                                                                                                  4993 snd_flying_pkts_push_one(sock, data->m_seq_num, sent_pkt);
                                                                                                                                  -
                                                                                                                                  4994
                                                                                                                                  -
                                                                                                                                  4995 /* By adding to m_snd_flying_pkts_by_sent_when (i.e., increasing In-flight byte count), we may have
                                                                                                                                  -
                                                                                                                                  4996 * affected the result of can_send(). We do check it at the end of the while () body, so OK. */
                                                                                                                                  +
                                                                                                                                  4976 // Retransmitting -- update retransmit count ID (used to match acks to the acked transmit attempt).
                                                                                                                                  +
                                                                                                                                  4977 ++data->m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  4978
                                                                                                                                  +
                                                                                                                                  4979 // Record the send time of this newest attempt. (If pacing enabled this will be rewritten later.)
                                                                                                                                  +
                                                                                                                                  4980 sent_pkt->m_sent_when.push_back(sent_when);
                                                                                                                                  +
                                                                                                                                  4981
                                                                                                                                  +
                                                                                                                                  4982 // Chronologically, no packets sent after this one have been acked yet, as this packet is new.
                                                                                                                                  +
                                                                                                                                  4983 sent_pkt->m_acks_after_me = 0;
                                                                                                                                  +
                                                                                                                                  4984 }
                                                                                                                                  +
                                                                                                                                  4985
                                                                                                                                  +
                                                                                                                                  4986 /* Note: We have saved Fine_clock::now() as the send time of the packet. However, especially
                                                                                                                                  +
                                                                                                                                  4987 * if pacing is enabled, we want to record it at the time it is actually sent (pacing may
                                                                                                                                  +
                                                                                                                                  4988 * delay it). Even if pacing is disabled, CPU pegging may cause a delay in sending (although
                                                                                                                                  +
                                                                                                                                  4989 * whether that should "count" is a more philosophical question). With pacing, though, since
                                                                                                                                  +
                                                                                                                                  4990 * pacing spreads out packets over SRTT, and SRTT is measured based on
                                                                                                                                  +
                                                                                                                                  4991 * Sent_packet::m_sent_when, RTTs artifically become longer and longer if we record the send
                                                                                                                                  +
                                                                                                                                  4992 * time now. Anyway, this means m_sent_when.back() should be overwritten when the packet is
                                                                                                                                  +
                                                                                                                                  4993 * actually sent (which should be very soon, unless pacing is enabled).
                                                                                                                                  +
                                                                                                                                  4994 * See async_sock_low_lvl_packet_send_paced(). */
                                                                                                                                  +
                                                                                                                                  4995
                                                                                                                                  +
                                                                                                                                  4996 // data and sent_pkt are ready.
                                                                                                                                  4997
                                                                                                                                  -
                                                                                                                                  4998 // Fill out common fields and asynchronously send packet (packet pacing potentially performed inside).
                                                                                                                                  - - -
                                                                                                                                  5001 defer_delta_check))
                                                                                                                                  -
                                                                                                                                  5002 {
                                                                                                                                  -
                                                                                                                                  5003 return;
                                                                                                                                  -
                                                                                                                                  5004 }
                                                                                                                                  -
                                                                                                                                  5005
                                                                                                                                  -
                                                                                                                                  5006 sock->m_snd_stats.data_sent(data->m_data.size(), rexmit);
                                                                                                                                  -
                                                                                                                                  5007 }
                                                                                                                                  -
                                                                                                                                  5008 while (can_send(sock) && snd_deqable(sock)); // (there is CWND/rcv_wnd space; and either rexmittable or new data)
                                                                                                                                  -
                                                                                                                                  5009
                                                                                                                                  -
                                                                                                                                  5010 FLOW_LOG_TRACE('[' << sock << "]; connection [" << sock << "]: "
                                                                                                                                  -
                                                                                                                                  5011 "Final check: "
                                                                                                                                  -
                                                                                                                                  5012 "can_send() == [" << can_send(sock) << "]; "
                                                                                                                                  -
                                                                                                                                  5013 "snd_deqable() == [" << snd_deqable(sock) << "].");
                                                                                                                                  -
                                                                                                                                  5014
                                                                                                                                  -
                                                                                                                                  5015 writable = snd_buf_enqable(sock); // Must do before releasing lock.
                                                                                                                                  -
                                                                                                                                  5016 } // lock
                                                                                                                                  -
                                                                                                                                  5017
                                                                                                                                  -
                                                                                                                                  5018 /* Finally, check if the above has dequeued enough of m_snd_buf for it to accept more data from
                                                                                                                                  -
                                                                                                                                  5019 * user. If so, sock is certainly now Writable. Therefore we should soon inform anyone waiting
                                                                                                                                  -
                                                                                                                                  5020 * on any Event_sets for sock to become Writable.
                                                                                                                                  -
                                                                                                                                  5021 *
                                                                                                                                  -
                                                                                                                                  5022 * Caveat: Similar to that in Node::handle_syn_ack_ack_to_syn_rcvd() at similar point in the
                                                                                                                                  -
                                                                                                                                  5023 * code.
                                                                                                                                  -
                                                                                                                                  5024 *
                                                                                                                                  -
                                                                                                                                  5025 * Also: why do this outside the above locked block? Same reason as similar code in
                                                                                                                                  -
                                                                                                                                  5026 * handle_data_to_established(). */
                                                                                                                                  -
                                                                                                                                  5027 if (writable &&
                                                                                                                                  - -
                                                                                                                                  5029 {
                                                                                                                                  -
                                                                                                                                  5030 // Possibly inform the user for any applicable Event_sets right now.
                                                                                                                                  -
                                                                                                                                  5031 event_set_all_check_delta(defer_delta_check);
                                                                                                                                  -
                                                                                                                                  5032 }
                                                                                                                                  -
                                                                                                                                  5033
                                                                                                                                  -
                                                                                                                                  5034 /* @todo After we implement graceful close, if we'd emptied m_snd_buf above, then here we should
                                                                                                                                  -
                                                                                                                                  5035 * advance the graceful close towards the final situation (m_int_state and m_state both
                                                                                                                                  -
                                                                                                                                  5036 * S_CLOSED). */
                                                                                                                                  -
                                                                                                                                  5037} // Node::send_worker()
                                                                                                                                  -
                                                                                                                                  5038
                                                                                                                                  - -
                                                                                                                                  5040{
                                                                                                                                  -
                                                                                                                                  5041 using std::min;
                                                                                                                                  -
                                                                                                                                  5042
                                                                                                                                  -
                                                                                                                                  5043 /* m_snd_cong_ctl is the congestion control module, and its CWND value determines how many bytes can
                                                                                                                                  -
                                                                                                                                  5044 * be In-flight at any given time. If there are enough free bytes (CWND - In-flight) to send
                                                                                                                                  -
                                                                                                                                  5045 * data, then we can send. Otherwise we cannot. Easy, except what's "data"? There are two
                                                                                                                                  -
                                                                                                                                  5046 * reasonable answers. One: a byte or more. Two: min(max-block-size, Send buffer size). The former
                                                                                                                                  -
                                                                                                                                  5047 * answer is fine but somewhat annoying, because then we have to lock sock here***. The 2nd answer
                                                                                                                                  -
                                                                                                                                  5048 * clearly works but is potentially a little greedier than necessary (i.e., if the 1st block to
                                                                                                                                  -
                                                                                                                                  5049 * send is small enough to fit into CWND, but CWND doesn't have max-block-size space).
                                                                                                                                  -
                                                                                                                                  5050 * However, actually, we pretty much have to choose the 2nd answer regardless, as we don't want to
                                                                                                                                  -
                                                                                                                                  5051 * fragment max-block-size-sized chunks, if we can help it (in the spirit of the reliability
                                                                                                                                  -
                                                                                                                                  5052 * guarantee [when running in unreliable mode] made in send() method doc header).
                                                                                                                                  -
                                                                                                                                  5053 *
                                                                                                                                  -
                                                                                                                                  5054 * I choose the 2nd answer, because (1) it's easier (no locking of sock); (2) it is used by real
                                                                                                                                  -
                                                                                                                                  5055 * TCP implementations which keep CWND in multiples of MSS (equivalent of max-block-size); (3)
                                                                                                                                  -
                                                                                                                                  5056 * it's still safe; and (4) see previous paragraph's end. Regarding safety: it's safe, since
                                                                                                                                  -
                                                                                                                                  5057 * there can be no deadlock, because even if there's < MBS bytes free, eventually In-flight
                                                                                                                                  -
                                                                                                                                  5058 * packets will become Acknowledged or Dropped and no longer be In-flight, freeing up CWND space;
                                                                                                                                  -
                                                                                                                                  5059 * and CWND is guaranteed to always be at least 1 * MBS. Thus eventually can_send() will return
                                                                                                                                  -
                                                                                                                                  5060 * true.
                                                                                                                                  -
                                                                                                                                  5061 *
                                                                                                                                  -
                                                                                                                                  5062 * *** - I am now not sure why I wrote this. Why would we have to lock sock here in that case? */
                                                                                                                                  -
                                                                                                                                  5063
                                                                                                                                  -
                                                                                                                                  5064 // We have rcv_wnd also; so pretend previous paragraph has: s/CWND/min(CWND, rcv_wnd)/.
                                                                                                                                  -
                                                                                                                                  5065
                                                                                                                                  -
                                                                                                                                  5066 const size_t pipe_taken = sock->m_snd_flying_bytes;
                                                                                                                                  -
                                                                                                                                  5067 const size_t cong_wnd = sock->m_snd_cong_ctl->congestion_window_bytes();
                                                                                                                                  -
                                                                                                                                  5068 const size_t& rcv_wnd = sock->m_snd_remote_rcv_wnd; // @todo Any particular reason this has & but not pipe_taken?
                                                                                                                                  -
                                                                                                                                  5069 // Send no more than the network NOR the other side's Receive buffer can take.
                                                                                                                                  -
                                                                                                                                  5070 const size_t pipe_total = min(cong_wnd, rcv_wnd);
                                                                                                                                  +
                                                                                                                                  4998 // Add to snd_flying_pkts* and friends; update byte counts.
                                                                                                                                  +
                                                                                                                                  4999 snd_flying_pkts_push_one(sock, data->m_seq_num, sent_pkt);
                                                                                                                                  +
                                                                                                                                  5000
                                                                                                                                  +
                                                                                                                                  5001 /* By adding to m_snd_flying_pkts_by_sent_when (i.e., increasing In-flight byte count), we may have
                                                                                                                                  +
                                                                                                                                  5002 * affected the result of can_send(). We do check it at the end of the while () body, so OK. */
                                                                                                                                  +
                                                                                                                                  5003
                                                                                                                                  +
                                                                                                                                  5004 // Fill out common fields and asynchronously send packet (packet pacing potentially performed inside).
                                                                                                                                  + + +
                                                                                                                                  5007 defer_delta_check))
                                                                                                                                  +
                                                                                                                                  5008 {
                                                                                                                                  +
                                                                                                                                  5009 return;
                                                                                                                                  +
                                                                                                                                  5010 }
                                                                                                                                  +
                                                                                                                                  5011
                                                                                                                                  +
                                                                                                                                  5012 sock->m_snd_stats.data_sent(data->m_data.size(), rexmit);
                                                                                                                                  +
                                                                                                                                  5013 }
                                                                                                                                  +
                                                                                                                                  5014 while (can_send(sock) && snd_deqable(sock)); // (there is CWND/rcv_wnd space; and either rexmittable or new data)
                                                                                                                                  +
                                                                                                                                  5015
                                                                                                                                  +
                                                                                                                                  5016 FLOW_LOG_TRACE('[' << sock << "]; connection [" << sock << "]: "
                                                                                                                                  +
                                                                                                                                  5017 "Final check: "
                                                                                                                                  +
                                                                                                                                  5018 "can_send() == [" << can_send(sock) << "]; "
                                                                                                                                  +
                                                                                                                                  5019 "snd_deqable() == [" << snd_deqable(sock) << "].");
                                                                                                                                  +
                                                                                                                                  5020
                                                                                                                                  +
                                                                                                                                  5021 writable = snd_buf_enqable(sock); // Must do before releasing lock.
                                                                                                                                  +
                                                                                                                                  5022 } // lock
                                                                                                                                  +
                                                                                                                                  5023
                                                                                                                                  +
                                                                                                                                  5024 /* Finally, check if the above has dequeued enough of m_snd_buf for it to accept more data from
                                                                                                                                  +
                                                                                                                                  5025 * user. If so, sock is certainly now Writable. Therefore we should soon inform anyone waiting
                                                                                                                                  +
                                                                                                                                  5026 * on any Event_sets for sock to become Writable.
                                                                                                                                  +
                                                                                                                                  5027 *
                                                                                                                                  +
                                                                                                                                  5028 * Caveat: Similar to that in Node::handle_syn_ack_ack_to_syn_rcvd() at similar point in the
                                                                                                                                  +
                                                                                                                                  5029 * code.
                                                                                                                                  +
                                                                                                                                  5030 *
                                                                                                                                  +
                                                                                                                                  5031 * Also: why do this outside the above locked block? Same reason as similar code in
                                                                                                                                  +
                                                                                                                                  5032 * handle_data_to_established(). */
                                                                                                                                  +
                                                                                                                                  5033 if (writable &&
                                                                                                                                  + +
                                                                                                                                  5035 {
                                                                                                                                  +
                                                                                                                                  5036 // Possibly inform the user for any applicable Event_sets right now.
                                                                                                                                  +
                                                                                                                                  5037 event_set_all_check_delta(defer_delta_check);
                                                                                                                                  +
                                                                                                                                  5038 }
                                                                                                                                  +
                                                                                                                                  5039
                                                                                                                                  +
                                                                                                                                  5040 /* @todo After we implement graceful close, if we'd emptied m_snd_buf above, then here we should
                                                                                                                                  +
                                                                                                                                  5041 * advance the graceful close towards the final situation (m_int_state and m_state both
                                                                                                                                  +
                                                                                                                                  5042 * S_CLOSED). */
                                                                                                                                  +
                                                                                                                                  5043} // Node::send_worker()
                                                                                                                                  +
                                                                                                                                  5044
                                                                                                                                  + +
                                                                                                                                  5046{
                                                                                                                                  +
                                                                                                                                  5047 using std::min;
                                                                                                                                  +
                                                                                                                                  5048
                                                                                                                                  +
                                                                                                                                  5049 /* m_snd_cong_ctl is the congestion control module, and its CWND value determines how many bytes can
                                                                                                                                  +
                                                                                                                                  5050 * be In-flight at any given time. If there are enough free bytes (CWND - In-flight) to send
                                                                                                                                  +
                                                                                                                                  5051 * data, then we can send. Otherwise we cannot. Easy, except what's "data"? There are two
                                                                                                                                  +
                                                                                                                                  5052 * reasonable answers. One: a byte or more. Two: min(max-block-size, Send buffer size). The former
                                                                                                                                  +
                                                                                                                                  5053 * answer is fine but somewhat annoying, because then we have to lock sock here***. The 2nd answer
                                                                                                                                  +
                                                                                                                                  5054 * clearly works but is potentially a little greedier than necessary (i.e., if the 1st block to
                                                                                                                                  +
                                                                                                                                  5055 * send is small enough to fit into CWND, but CWND doesn't have max-block-size space).
                                                                                                                                  +
                                                                                                                                  5056 * However, actually, we pretty much have to choose the 2nd answer regardless, as we don't want to
                                                                                                                                  +
                                                                                                                                  5057 * fragment max-block-size-sized chunks, if we can help it (in the spirit of the reliability
                                                                                                                                  +
                                                                                                                                  5058 * guarantee [when running in unreliable mode] made in send() method doc header).
                                                                                                                                  +
                                                                                                                                  5059 *
                                                                                                                                  +
                                                                                                                                  5060 * I choose the 2nd answer, because (1) it's easier (no locking of sock); (2) it is used by real
                                                                                                                                  +
                                                                                                                                  5061 * TCP implementations which keep CWND in multiples of MSS (equivalent of max-block-size); (3)
                                                                                                                                  +
                                                                                                                                  5062 * it's still safe; and (4) see previous paragraph's end. Regarding safety: it's safe, since
                                                                                                                                  +
                                                                                                                                  5063 * there can be no deadlock, because even if there's < MBS bytes free, eventually In-flight
                                                                                                                                  +
                                                                                                                                  5064 * packets will become Acknowledged or Dropped and no longer be In-flight, freeing up CWND space;
                                                                                                                                  +
                                                                                                                                  5065 * and CWND is guaranteed to always be at least 1 * MBS. Thus eventually can_send() will return
                                                                                                                                  +
                                                                                                                                  5066 * true.
                                                                                                                                  +
                                                                                                                                  5067 *
                                                                                                                                  +
                                                                                                                                  5068 * *** - I am now not sure why I wrote this. Why would we have to lock sock here in that case? */
                                                                                                                                  +
                                                                                                                                  5069
                                                                                                                                  +
                                                                                                                                  5070 // We have rcv_wnd also; so pretend previous paragraph has: s/CWND/min(CWND, rcv_wnd)/.
                                                                                                                                  5071
                                                                                                                                  -
                                                                                                                                  5072 const bool can
                                                                                                                                  -
                                                                                                                                  5073 = (pipe_taken < pipe_total) && ((pipe_total - pipe_taken) >= sock->max_block_size());
                                                                                                                                  -
                                                                                                                                  5074
                                                                                                                                  -
                                                                                                                                  5075 FLOW_LOG_TRACE("cong_ctl [" << sock << "] info: can_send = [" << can << "]; "
                                                                                                                                  -
                                                                                                                                  5076 "pipe_taken = [" << sock->bytes_blocks_str(pipe_taken) << "]; "
                                                                                                                                  -
                                                                                                                                  5077 "cong_wnd = [" << sock->bytes_blocks_str(cong_wnd) << "]; "
                                                                                                                                  -
                                                                                                                                  5078 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "].");
                                                                                                                                  -
                                                                                                                                  5079
                                                                                                                                  -
                                                                                                                                  5080 return can;
                                                                                                                                  -
                                                                                                                                  5081} // Node::can_send()
                                                                                                                                  -
                                                                                                                                  5082
                                                                                                                                  - -
                                                                                                                                  5084 const Function<size_t ()>& rcv_buf_consume_func,
                                                                                                                                  -
                                                                                                                                  5085 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  5086{
                                                                                                                                  -
                                                                                                                                  5087 using boost::asio::post;
                                                                                                                                  +
                                                                                                                                  5072 const size_t pipe_taken = sock->m_snd_flying_bytes;
                                                                                                                                  +
                                                                                                                                  5073 const size_t cong_wnd = sock->m_snd_cong_ctl->congestion_window_bytes();
                                                                                                                                  +
                                                                                                                                  5074 const size_t& rcv_wnd = sock->m_snd_remote_rcv_wnd; // @todo Any particular reason this has & but not pipe_taken?
                                                                                                                                  +
                                                                                                                                  5075 // Send no more than the network NOR the other side's Receive buffer can take.
                                                                                                                                  +
                                                                                                                                  5076 const size_t pipe_total = min(cong_wnd, rcv_wnd);
                                                                                                                                  +
                                                                                                                                  5077
                                                                                                                                  +
                                                                                                                                  5078 const bool can
                                                                                                                                  +
                                                                                                                                  5079 = (pipe_taken < pipe_total) && ((pipe_total - pipe_taken) >= sock->max_block_size());
                                                                                                                                  +
                                                                                                                                  5080
                                                                                                                                  +
                                                                                                                                  5081 FLOW_LOG_TRACE("cong_ctl [" << sock << "] info: can_send = [" << can << "]; "
                                                                                                                                  +
                                                                                                                                  5082 "pipe_taken = [" << sock->bytes_blocks_str(pipe_taken) << "]; "
                                                                                                                                  +
                                                                                                                                  5083 "cong_wnd = [" << sock->bytes_blocks_str(cong_wnd) << "]; "
                                                                                                                                  +
                                                                                                                                  5084 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "].");
                                                                                                                                  +
                                                                                                                                  5085
                                                                                                                                  +
                                                                                                                                  5086 return can;
                                                                                                                                  +
                                                                                                                                  5087} // Node::can_send()
                                                                                                                                  5088
                                                                                                                                  -
                                                                                                                                  5089 /* We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  5090 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  -
                                                                                                                                  5091 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  -
                                                                                                                                  5092
                                                                                                                                  -
                                                                                                                                  5093 // IMPORTANT: The logic here must be consistent with sock_is_readable().
                                                                                                                                  + +
                                                                                                                                  5090 const Function<size_t ()>& rcv_buf_consume_func,
                                                                                                                                  +
                                                                                                                                  5091 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  5092{
                                                                                                                                  +
                                                                                                                                  5093 using boost::asio::post;
                                                                                                                                  5094
                                                                                                                                  -
                                                                                                                                  5095 if (!running())
                                                                                                                                  -
                                                                                                                                  5096 {
                                                                                                                                  - -
                                                                                                                                  5098 return 0;
                                                                                                                                  -
                                                                                                                                  5099 }
                                                                                                                                  -
                                                                                                                                  5100 // else
                                                                                                                                  -
                                                                                                                                  5101
                                                                                                                                  -
                                                                                                                                  5102 // Pre-condition is that m_mutex is locked already. So EVERYTHING that can be locked, is, including the buffers.
                                                                                                                                  -
                                                                                                                                  5103
                                                                                                                                  -
                                                                                                                                  5104 // Pre-condition.
                                                                                                                                  -
                                                                                                                                  5105 assert(sock->m_state == Peer_socket::State::S_OPEN); // Locked.
                                                                                                                                  -
                                                                                                                                  5106 assert((sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED) ||
                                                                                                                                  -
                                                                                                                                  5107 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING) ||
                                                                                                                                  -
                                                                                                                                  5108 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  +
                                                                                                                                  5095 /* We are in user thread U != W.
                                                                                                                                  +
                                                                                                                                  5096 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  +
                                                                                                                                  5097 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  +
                                                                                                                                  5098
                                                                                                                                  +
                                                                                                                                  5099 // IMPORTANT: The logic here must be consistent with sock_is_readable().
                                                                                                                                  +
                                                                                                                                  5100
                                                                                                                                  +
                                                                                                                                  5101 if (!running())
                                                                                                                                  +
                                                                                                                                  5102 {
                                                                                                                                  + +
                                                                                                                                  5104 return 0;
                                                                                                                                  +
                                                                                                                                  5105 }
                                                                                                                                  +
                                                                                                                                  5106 // else
                                                                                                                                  +
                                                                                                                                  5107
                                                                                                                                  +
                                                                                                                                  5108 // Pre-condition is that m_mutex is locked already. So EVERYTHING that can be locked, is, including the buffers.
                                                                                                                                  5109
                                                                                                                                  -
                                                                                                                                  5110 /* In the rest of the method we must ensure we handle all the cases (-1a/b/c-, -2-) documented in
                                                                                                                                  -
                                                                                                                                  5111 * the Peer_socket::receive() documentation header. -3- was already handled by
                                                                                                                                  -
                                                                                                                                  5112 * Peer_socket::receive() before calling us. */
                                                                                                                                  -
                                                                                                                                  5113
                                                                                                                                  -
                                                                                                                                  5114 // Try to dequeue stuff into their buffer.
                                                                                                                                  -
                                                                                                                                  5115 const bool no_bytes_available = sock->m_rcv_buf.empty();
                                                                                                                                  -
                                                                                                                                  5116 const size_t bytes_consumed = rcv_buf_consume_func();
                                                                                                                                  -
                                                                                                                                  5117
                                                                                                                                  -
                                                                                                                                  5118 if (bytes_consumed != 0)
                                                                                                                                  -
                                                                                                                                  5119 {
                                                                                                                                  -
                                                                                                                                  5120 /* Unequivocal: if there was stuff in the Receive buffer and was able to place it into their
                                                                                                                                  -
                                                                                                                                  5121 * buffer then there is no error. (Even if m_disconnect_cause is not success, we are only
                                                                                                                                  -
                                                                                                                                  5122 * supposed to report that after the Receive buffer has been emptied.)
                                                                                                                                  -
                                                                                                                                  5123 *
                                                                                                                                  -
                                                                                                                                  5124 * This handles case -2-. */
                                                                                                                                  -
                                                                                                                                  5125 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  5126 "has successfully returned [" << bytes_consumed << "] bytes.");
                                                                                                                                  -
                                                                                                                                  5127 err_code->clear();
                                                                                                                                  -
                                                                                                                                  5128
                                                                                                                                  -
                                                                                                                                  5129 /* We have changed (increased) the amount of free space in m_rcv_buf. This has rcv_wnd
                                                                                                                                  -
                                                                                                                                  5130 * implications. We have to at least check whether we should send a window update to the
                                                                                                                                  -
                                                                                                                                  5131 * other side. However all such book-keeping must be done in thread W due to the data
                                                                                                                                  -
                                                                                                                                  5132 * involved; call this->receive_wnd_updated(sock). */
                                                                                                                                  -
                                                                                                                                  5133 post(m_task_engine, [this, sock]() { receive_wnd_updated(sock); });
                                                                                                                                  +
                                                                                                                                  5110 // Pre-condition.
                                                                                                                                  +
                                                                                                                                  5111 assert(sock->m_state == Peer_socket::State::S_OPEN); // Locked.
                                                                                                                                  +
                                                                                                                                  5112 assert((sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTED) ||
                                                                                                                                  +
                                                                                                                                  5113 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING) ||
                                                                                                                                  +
                                                                                                                                  5114 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  +
                                                                                                                                  5115
                                                                                                                                  +
                                                                                                                                  5116 /* In the rest of the method we must ensure we handle all the cases (-1a/b/c-, -2-) documented in
                                                                                                                                  +
                                                                                                                                  5117 * the Peer_socket::receive() documentation header. -3- was already handled by
                                                                                                                                  +
                                                                                                                                  5118 * Peer_socket::receive() before calling us. */
                                                                                                                                  +
                                                                                                                                  5119
                                                                                                                                  +
                                                                                                                                  5120 // Try to dequeue stuff into their buffer.
                                                                                                                                  +
                                                                                                                                  5121 const bool no_bytes_available = sock->m_rcv_buf.empty();
                                                                                                                                  +
                                                                                                                                  5122 const size_t bytes_consumed = rcv_buf_consume_func();
                                                                                                                                  +
                                                                                                                                  5123
                                                                                                                                  +
                                                                                                                                  5124 if (bytes_consumed != 0)
                                                                                                                                  +
                                                                                                                                  5125 {
                                                                                                                                  +
                                                                                                                                  5126 /* Unequivocal: if there was stuff in the Receive buffer and was able to place it into their
                                                                                                                                  +
                                                                                                                                  5127 * buffer then there is no error. (Even if m_disconnect_cause is not success, we are only
                                                                                                                                  +
                                                                                                                                  5128 * supposed to report that after the Receive buffer has been emptied.)
                                                                                                                                  +
                                                                                                                                  5129 *
                                                                                                                                  +
                                                                                                                                  5130 * This handles case -2-. */
                                                                                                                                  +
                                                                                                                                  5131 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  5132 "has successfully returned [" << bytes_consumed << "] bytes.");
                                                                                                                                  +
                                                                                                                                  5133 err_code->clear();
                                                                                                                                  5134
                                                                                                                                  -
                                                                                                                                  5135 if (sock->m_rcv_buf.empty()
                                                                                                                                  -
                                                                                                                                  5136 && (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING))
                                                                                                                                  -
                                                                                                                                  5137 {
                                                                                                                                  -
                                                                                                                                  5138 /* We've emptied the Receive buffer; and we're in the middle of a graceful close. (@todo
                                                                                                                                  -
                                                                                                                                  5139 * Graceful close not yet implemented.) There are two possibilities. One, m_int_state ==
                                                                                                                                  -
                                                                                                                                  5140 * S_CLOSED. In this case the graceful close, at the transport layer, is over, and the only
                                                                                                                                  -
                                                                                                                                  5141 * thing stopping us from entering m_state == S_CLOSED (via close_connection_immediately())
                                                                                                                                  -
                                                                                                                                  5142 * was that the user hadn't read all of m_rcv_buf. In this case thread W should
                                                                                                                                  -
                                                                                                                                  5143 * close_connection_immediately(). Two, m_int_state may be after ESTABLISHED but before
                                                                                                                                  -
                                                                                                                                  5144 * CLOSED, in which case thread W still has to finish up graceful closing anyway.
                                                                                                                                  -
                                                                                                                                  5145 *
                                                                                                                                  -
                                                                                                                                  5146 * We are in thread W and cannot work with m_int_state, so checking it here is not possible.
                                                                                                                                  -
                                                                                                                                  5147 * Therefore we put this task onto thread W. */
                                                                                                                                  -
                                                                                                                                  5148 post(m_task_engine,
                                                                                                                                  -
                                                                                                                                  5149 [this, sock]() { receive_emptied_rcv_buf_while_disconnecting(sock); });
                                                                                                                                  -
                                                                                                                                  5150 }
                                                                                                                                  -
                                                                                                                                  5151 return bytes_consumed;
                                                                                                                                  -
                                                                                                                                  5152 }
                                                                                                                                  -
                                                                                                                                  5153 // else if (bytes_consumed == 0)
                                                                                                                                  -
                                                                                                                                  5154
                                                                                                                                  -
                                                                                                                                  5155 if (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING)
                                                                                                                                  -
                                                                                                                                  5156 {
                                                                                                                                  -
                                                                                                                                  5157 /* This is case -1b-. Since we are CONNECTING, no data could have been received yet (simply
                                                                                                                                  -
                                                                                                                                  5158 * not at that stage of connection opening), so Receive buffer is empty. */
                                                                                                                                  -
                                                                                                                                  5159 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  5160 "has successfully returned no bytes because still not fully connected.");
                                                                                                                                  -
                                                                                                                                  5161 err_code->clear();
                                                                                                                                  -
                                                                                                                                  5162 return 0;
                                                                                                                                  -
                                                                                                                                  5163 }
                                                                                                                                  -
                                                                                                                                  5164 // else if (state is CONNECTED or DISCONNECTING)
                                                                                                                                  -
                                                                                                                                  5165
                                                                                                                                  -
                                                                                                                                  5166 /* We're CONNECTED or DISCONNECTING but could get no bytes. Let's examine each state.
                                                                                                                                  -
                                                                                                                                  5167 *
                                                                                                                                  -
                                                                                                                                  5168 * - CONNECTED: Either they provided a zero-sized target buffer (in which case
                                                                                                                                  -
                                                                                                                                  5169 * !no_bytes_available), or the Receive buffer is simply empty. Thus this is either -1a- or
                                                                                                                                  -
                                                                                                                                  5170 * -1c- (no_bytes_available determines which).
                                                                                                                                  -
                                                                                                                                  5171 *
                                                                                                                                  -
                                                                                                                                  5172 * - DISCONNECTING: Either:
                                                                                                                                  -
                                                                                                                                  5173 * - the initial block was too large for the max_data_size they provided in their receive()
                                                                                                                                  -
                                                                                                                                  5174 * call (in which case !no_bytes_available); or
                                                                                                                                  -
                                                                                                                                  5175 * - they called close_final() (@todo not yet implemented) and thus the Receive buffer was
                                                                                                                                  -
                                                                                                                                  5176 * cleared at that time, and all incoming data were ignored after that; thus the Receive
                                                                                                                                  -
                                                                                                                                  5177 * buffer is empty, but a graceful close is still in progress; or
                                                                                                                                  -
                                                                                                                                  5178 * - they did not call close_final(), but there is a graceful close in progress, and the
                                                                                                                                  -
                                                                                                                                  5179 * Receive buffer is simply empty.
                                                                                                                                  -
                                                                                                                                  5180 * Thus this is either -1a- or -1c-. */
                                                                                                                                  -
                                                                                                                                  5181
                                                                                                                                  -
                                                                                                                                  5182 if (!no_bytes_available)
                                                                                                                                  -
                                                                                                                                  5183 {
                                                                                                                                  -
                                                                                                                                  5184 // This is case -1c-.
                                                                                                                                  -
                                                                                                                                  5185 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  5186 "has data to return, but the provided buffer size is too small.");
                                                                                                                                  -
                                                                                                                                  5187 err_code->clear();
                                                                                                                                  -
                                                                                                                                  5188 return 0;
                                                                                                                                  -
                                                                                                                                  5189 }
                                                                                                                                  -
                                                                                                                                  5190 // else if (no_bytes_available)
                                                                                                                                  -
                                                                                                                                  5191
                                                                                                                                  -
                                                                                                                                  5192 // This is case -1a-.
                                                                                                                                  -
                                                                                                                                  5193 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  -
                                                                                                                                  5194 "returning no data because Receive buffer empty.");
                                                                                                                                  -
                                                                                                                                  5195
                                                                                                                                  -
                                                                                                                                  5196 err_code->clear();
                                                                                                                                  +
                                                                                                                                  5135 /* We have changed (increased) the amount of free space in m_rcv_buf. This has rcv_wnd
                                                                                                                                  +
                                                                                                                                  5136 * implications. We have to at least check whether we should send a window update to the
                                                                                                                                  +
                                                                                                                                  5137 * other side. However all such book-keeping must be done in thread W due to the data
                                                                                                                                  +
                                                                                                                                  5138 * involved; call this->receive_wnd_updated(sock). */
                                                                                                                                  +
                                                                                                                                  5139 post(m_task_engine, [this, sock]() { receive_wnd_updated(sock); });
                                                                                                                                  +
                                                                                                                                  5140
                                                                                                                                  +
                                                                                                                                  5141 if (sock->m_rcv_buf.empty()
                                                                                                                                  +
                                                                                                                                  5142 && (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING))
                                                                                                                                  +
                                                                                                                                  5143 {
                                                                                                                                  +
                                                                                                                                  5144 /* We've emptied the Receive buffer; and we're in the middle of a graceful close. (@todo
                                                                                                                                  +
                                                                                                                                  5145 * Graceful close not yet implemented.) There are two possibilities. One, m_int_state ==
                                                                                                                                  +
                                                                                                                                  5146 * S_CLOSED. In this case the graceful close, at the transport layer, is over, and the only
                                                                                                                                  +
                                                                                                                                  5147 * thing stopping us from entering m_state == S_CLOSED (via close_connection_immediately())
                                                                                                                                  +
                                                                                                                                  5148 * was that the user hadn't read all of m_rcv_buf. In this case thread W should
                                                                                                                                  +
                                                                                                                                  5149 * close_connection_immediately(). Two, m_int_state may be after ESTABLISHED but before
                                                                                                                                  +
                                                                                                                                  5150 * CLOSED, in which case thread W still has to finish up graceful closing anyway.
                                                                                                                                  +
                                                                                                                                  5151 *
                                                                                                                                  +
                                                                                                                                  5152 * We are in thread W and cannot work with m_int_state, so checking it here is not possible.
                                                                                                                                  +
                                                                                                                                  5153 * Therefore we put this task onto thread W. */
                                                                                                                                  +
                                                                                                                                  5154 post(m_task_engine,
                                                                                                                                  +
                                                                                                                                  5155 [this, sock]() { receive_emptied_rcv_buf_while_disconnecting(sock); });
                                                                                                                                  +
                                                                                                                                  5156 }
                                                                                                                                  +
                                                                                                                                  5157 return bytes_consumed;
                                                                                                                                  +
                                                                                                                                  5158 }
                                                                                                                                  +
                                                                                                                                  5159 // else if (bytes_consumed == 0)
                                                                                                                                  +
                                                                                                                                  5160
                                                                                                                                  +
                                                                                                                                  5161 if (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_CONNECTING)
                                                                                                                                  +
                                                                                                                                  5162 {
                                                                                                                                  +
                                                                                                                                  5163 /* This is case -1b-. Since we are CONNECTING, no data could have been received yet (simply
                                                                                                                                  +
                                                                                                                                  5164 * not at that stage of connection opening), so Receive buffer is empty. */
                                                                                                                                  +
                                                                                                                                  5165 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  5166 "has successfully returned no bytes because still not fully connected.");
                                                                                                                                  +
                                                                                                                                  5167 err_code->clear();
                                                                                                                                  +
                                                                                                                                  5168 return 0;
                                                                                                                                  +
                                                                                                                                  5169 }
                                                                                                                                  +
                                                                                                                                  5170 // else if (state is CONNECTED or DISCONNECTING)
                                                                                                                                  +
                                                                                                                                  5171
                                                                                                                                  +
                                                                                                                                  5172 /* We're CONNECTED or DISCONNECTING but could get no bytes. Let's examine each state.
                                                                                                                                  +
                                                                                                                                  5173 *
                                                                                                                                  +
                                                                                                                                  5174 * - CONNECTED: Either they provided a zero-sized target buffer (in which case
                                                                                                                                  +
                                                                                                                                  5175 * !no_bytes_available), or the Receive buffer is simply empty. Thus this is either -1a- or
                                                                                                                                  +
                                                                                                                                  5176 * -1c- (no_bytes_available determines which).
                                                                                                                                  +
                                                                                                                                  5177 *
                                                                                                                                  +
                                                                                                                                  5178 * - DISCONNECTING: Either:
                                                                                                                                  +
                                                                                                                                  5179 * - the initial block was too large for the max_data_size they provided in their receive()
                                                                                                                                  +
                                                                                                                                  5180 * call (in which case !no_bytes_available); or
                                                                                                                                  +
                                                                                                                                  5181 * - they called close_final() (@todo not yet implemented) and thus the Receive buffer was
                                                                                                                                  +
                                                                                                                                  5182 * cleared at that time, and all incoming data were ignored after that; thus the Receive
                                                                                                                                  +
                                                                                                                                  5183 * buffer is empty, but a graceful close is still in progress; or
                                                                                                                                  +
                                                                                                                                  5184 * - they did not call close_final(), but there is a graceful close in progress, and the
                                                                                                                                  +
                                                                                                                                  5185 * Receive buffer is simply empty.
                                                                                                                                  +
                                                                                                                                  5186 * Thus this is either -1a- or -1c-. */
                                                                                                                                  +
                                                                                                                                  5187
                                                                                                                                  +
                                                                                                                                  5188 if (!no_bytes_available)
                                                                                                                                  +
                                                                                                                                  5189 {
                                                                                                                                  +
                                                                                                                                  5190 // This is case -1c-.
                                                                                                                                  +
                                                                                                                                  5191 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  5192 "has data to return, but the provided buffer size is too small.");
                                                                                                                                  +
                                                                                                                                  5193 err_code->clear();
                                                                                                                                  +
                                                                                                                                  5194 return 0;
                                                                                                                                  +
                                                                                                                                  5195 }
                                                                                                                                  +
                                                                                                                                  5196 // else if (no_bytes_available)
                                                                                                                                  5197
                                                                                                                                  -
                                                                                                                                  5198 /* @todo Sigh. There's more. Yes, in some situations we can return 0/success here. In other
                                                                                                                                  -
                                                                                                                                  5199 * situations, though, we should return 0/<Error_code for graceful close> here. The latter
                                                                                                                                  -
                                                                                                                                  5200 * case would be in the situations where we know no data is coming, or user has said he doesn't
                                                                                                                                  -
                                                                                                                                  5201 * care about any more data:
                                                                                                                                  -
                                                                                                                                  5202 *
                                                                                                                                  -
                                                                                                                                  5203 * -1- A graceful close was initiated by the OTHER side. (Therefore no data could be coming to
                                                                                                                                  -
                                                                                                                                  5204 * save into Receive buffer.)
                                                                                                                                  -
                                                                                                                                  5205 * -2- Only we initiated the graceful close, but it was via close_final(), i.e., user is not
                                                                                                                                  -
                                                                                                                                  5206 * interested in any incoming data anymore. (Therefore we'll always just ignore any
                                                                                                                                  -
                                                                                                                                  5207 * incoming DATA and not put it into Receive buffer.)
                                                                                                                                  -
                                                                                                                                  5208 * -3- Only we initiated the graceful close, and it was via close_start() (i.e., user cares
                                                                                                                                  -
                                                                                                                                  5209 * about further incoming data); however, the final handshake has reached a state in which
                                                                                                                                  -
                                                                                                                                  5210 * further data cannot be incoming. (Therefore no data could be coming to save into Receive
                                                                                                                                  -
                                                                                                                                  5211 * buffer.)
                                                                                                                                  -
                                                                                                                                  5212 *
                                                                                                                                  -
                                                                                                                                  5213 * I am not writing code for this logic at this time. The implementations depends on how
                                                                                                                                  -
                                                                                                                                  5214 * exactly our graceful close works. This entire method, right now, is dead code, since there is
                                                                                                                                  -
                                                                                                                                  5215 * no graceful close, but I wrote it anyway to provide a skeleton for the future, since I
                                                                                                                                  -
                                                                                                                                  5216 * already thought about it. However it would be unreasonable to implement the above logic in the
                                                                                                                                  -
                                                                                                                                  5217 * absence of graceful close in the first place, skeleton or not. Therefore, dead code or not, I
                                                                                                                                  -
                                                                                                                                  5218 * do the "conservative" thing: return 0/success even in the above situations. Eventually the
                                                                                                                                  -
                                                                                                                                  5219 * graceful close will complete, at which point we'll return an error anyway, so the user won't be
                                                                                                                                  -
                                                                                                                                  5220 * left uninformed forever (worst case: the close will time out).
                                                                                                                                  -
                                                                                                                                  5221 *
                                                                                                                                  -
                                                                                                                                  5222 * For when we do implement the above logic, some thoughts: Detecting the situation in thread U
                                                                                                                                  -
                                                                                                                                  5223 * != W may be difficult and may introduce complex synchronization issues. One way
                                                                                                                                  -
                                                                                                                                  5224 * to do it might be to introduce synchronized bool Peer_socket::m_no_more_rcv_data, which
                                                                                                                                  -
                                                                                                                                  5225 * starts at false and can become true (but not false again). This member would be set to true,
                                                                                                                                  -
                                                                                                                                  5226 * by thread W, if and only if one of the above situations is detected by thread W. Then here
                                                                                                                                  -
                                                                                                                                  5227 * we'd check it, and if it's true, return error; otherwise return success.
                                                                                                                                  -
                                                                                                                                  5228 *
                                                                                                                                  -
                                                                                                                                  5229 * IMPORTANT: The logic here must be consistent with sock_is_readable(). */
                                                                                                                                  -
                                                                                                                                  5230 return 0;
                                                                                                                                  -
                                                                                                                                  5231} // Node::receive()
                                                                                                                                  -
                                                                                                                                  5232
                                                                                                                                  -
                                                                                                                                  5233bool Node::sock_is_readable(const boost::any& sock_as_any) const
                                                                                                                                  -
                                                                                                                                  5234{
                                                                                                                                  -
                                                                                                                                  5235 using boost::any_cast;
                                                                                                                                  -
                                                                                                                                  5236
                                                                                                                                  -
                                                                                                                                  5237 const Peer_socket::Const_ptr sock = any_cast<Peer_socket::Ptr>(sock_as_any);
                                                                                                                                  +
                                                                                                                                  5198 // This is case -1a-.
                                                                                                                                  +
                                                                                                                                  5199 FLOW_LOG_TRACE("User thread receive() for [" << sock << "] "
                                                                                                                                  +
                                                                                                                                  5200 "returning no data because Receive buffer empty.");
                                                                                                                                  +
                                                                                                                                  5201
                                                                                                                                  +
                                                                                                                                  5202 err_code->clear();
                                                                                                                                  +
                                                                                                                                  5203
                                                                                                                                  +
                                                                                                                                  5204 /* @todo Sigh. There's more. Yes, in some situations we can return 0/success here. In other
                                                                                                                                  +
                                                                                                                                  5205 * situations, though, we should return 0/<Error_code for graceful close> here. The latter
                                                                                                                                  +
                                                                                                                                  5206 * case would be in the situations where we know no data is coming, or user has said he doesn't
                                                                                                                                  +
                                                                                                                                  5207 * care about any more data:
                                                                                                                                  +
                                                                                                                                  5208 *
                                                                                                                                  +
                                                                                                                                  5209 * -1- A graceful close was initiated by the OTHER side. (Therefore no data could be coming to
                                                                                                                                  +
                                                                                                                                  5210 * save into Receive buffer.)
                                                                                                                                  +
                                                                                                                                  5211 * -2- Only we initiated the graceful close, but it was via close_final(), i.e., user is not
                                                                                                                                  +
                                                                                                                                  5212 * interested in any incoming data anymore. (Therefore we'll always just ignore any
                                                                                                                                  +
                                                                                                                                  5213 * incoming DATA and not put it into Receive buffer.)
                                                                                                                                  +
                                                                                                                                  5214 * -3- Only we initiated the graceful close, and it was via close_start() (i.e., user cares
                                                                                                                                  +
                                                                                                                                  5215 * about further incoming data); however, the final handshake has reached a state in which
                                                                                                                                  +
                                                                                                                                  5216 * further data cannot be incoming. (Therefore no data could be coming to save into Receive
                                                                                                                                  +
                                                                                                                                  5217 * buffer.)
                                                                                                                                  +
                                                                                                                                  5218 *
                                                                                                                                  +
                                                                                                                                  5219 * I am not writing code for this logic at this time. The implementations depends on how
                                                                                                                                  +
                                                                                                                                  5220 * exactly our graceful close works. This entire method, right now, is dead code, since there is
                                                                                                                                  +
                                                                                                                                  5221 * no graceful close, but I wrote it anyway to provide a skeleton for the future, since I
                                                                                                                                  +
                                                                                                                                  5222 * already thought about it. However it would be unreasonable to implement the above logic in the
                                                                                                                                  +
                                                                                                                                  5223 * absence of graceful close in the first place, skeleton or not. Therefore, dead code or not, I
                                                                                                                                  +
                                                                                                                                  5224 * do the "conservative" thing: return 0/success even in the above situations. Eventually the
                                                                                                                                  +
                                                                                                                                  5225 * graceful close will complete, at which point we'll return an error anyway, so the user won't be
                                                                                                                                  +
                                                                                                                                  5226 * left uninformed forever (worst case: the close will time out).
                                                                                                                                  +
                                                                                                                                  5227 *
                                                                                                                                  +
                                                                                                                                  5228 * For when we do implement the above logic, some thoughts: Detecting the situation in thread U
                                                                                                                                  +
                                                                                                                                  5229 * != W may be difficult and may introduce complex synchronization issues. One way
                                                                                                                                  +
                                                                                                                                  5230 * to do it might be to introduce synchronized bool Peer_socket::m_no_more_rcv_data, which
                                                                                                                                  +
                                                                                                                                  5231 * starts at false and can become true (but not false again). This member would be set to true,
                                                                                                                                  +
                                                                                                                                  5232 * by thread W, if and only if one of the above situations is detected by thread W. Then here
                                                                                                                                  +
                                                                                                                                  5233 * we'd check it, and if it's true, return error; otherwise return success.
                                                                                                                                  +
                                                                                                                                  5234 *
                                                                                                                                  +
                                                                                                                                  5235 * IMPORTANT: The logic here must be consistent with sock_is_readable(). */
                                                                                                                                  +
                                                                                                                                  5236 return 0;
                                                                                                                                  +
                                                                                                                                  5237} // Node::receive()
                                                                                                                                  5238
                                                                                                                                  -
                                                                                                                                  5239 Peer_socket::Lock_guard lock(sock->m_mutex); // Many threads can access/write below state.
                                                                                                                                  -
                                                                                                                                  5240
                                                                                                                                  -
                                                                                                                                  5241 /* Our task here is to return true if and only if at this very moment calling sock->receive(),
                                                                                                                                  -
                                                                                                                                  5242 * assuming sufficient user buffer space, would yield either a return value of > 0 OR a
                                                                                                                                  -
                                                                                                                                  5243 * non-success *err_code. In other words, receive() would return "something." This is used for
                                                                                                                                  -
                                                                                                                                  5244 * Event_set machinery.
                                                                                                                                  -
                                                                                                                                  5245 *
                                                                                                                                  -
                                                                                                                                  5246 * This should mirror receive()'s algorithm. @todo Should receive() call this, for code reuse?
                                                                                                                                  -
                                                                                                                                  5247 * Maybe/maybe not. Consider performance when deciding.
                                                                                                                                  -
                                                                                                                                  5248 *
                                                                                                                                  -
                                                                                                                                  5249 * - If state is CLOSED, then some sort of error/terminating condition occurred, so receive()
                                                                                                                                  -
                                                                                                                                  5250 * would return 0 and non-success Error_code == sock->m_disconnect_cause. (Readable.)
                                                                                                                                  -
                                                                                                                                  5251 * - Otherwise, if Receive buffer can be dequeued, receive() would return > 0.
                                                                                                                                  -
                                                                                                                                  5252 * - Otherwise, if Receive buffer cannot be dequeued, receive() would return 0 and no error. (Not
                                                                                                                                  -
                                                                                                                                  5253 * Readable.) Note that Receive buffer is guaranteed to be clear when entering non-Readable
                                                                                                                                  -
                                                                                                                                  5254 * non-error states (OPEN+CONNECTING, OPEN+DISCONNECTING). (Readable.)
                                                                                                                                  -
                                                                                                                                  5255 *
                                                                                                                                  -
                                                                                                                                  5256 * @todo Once we implement graceful close, there will be situations where Receive buffer is empty, state is
                                                                                                                                  -
                                                                                                                                  5257 * OPEN+DISCONNECTING, m_disconnect_cause = <cause of disconnect>, and we should return true (Readable)
                                                                                                                                  -
                                                                                                                                  5258 * here (only when we also know that no future Receive traffic possible). See receive(). */
                                                                                                                                  -
                                                                                                                                  5259
                                                                                                                                  -
                                                                                                                                  5260 return (sock->m_state == Peer_socket::State::S_CLOSED) || rcv_buf_deqable(sock);
                                                                                                                                  -
                                                                                                                                  5261} // Node::sock_is_readable()
                                                                                                                                  -
                                                                                                                                  5262
                                                                                                                                  - -
                                                                                                                                  5264{
                                                                                                                                  -
                                                                                                                                  5265 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5266
                                                                                                                                  -
                                                                                                                                  5267 /* rcv_wnd (free Receive buffer space) is sent to other side opportunistically in ACKs. While
                                                                                                                                  -
                                                                                                                                  5268 * sender is sending data, they will have a good idea of our rcv_wnd as well. Is that (in a
                                                                                                                                  -
                                                                                                                                  5269 * one-way-traffic situation) sufficient however? If the sender is not sending data, because the
                                                                                                                                  -
                                                                                                                                  5270 * application on the sender doesn't provide more data to send, then the discussion is moot.
                                                                                                                                  -
                                                                                                                                  5271 * What if the sender is not sending data, because we have told it rcv_wnd is 0 (meaning our
                                                                                                                                  -
                                                                                                                                  5272 * Receive buffer is full)? This can and will happen. For example suppose our application layer
                                                                                                                                  -
                                                                                                                                  5273 * simply stops reading from Receive buffer for a while, resulting in rcv_wnd 0 sent in one of the
                                                                                                                                  -
                                                                                                                                  5274 * ACKs. Now sender knows rcv_wnd is 0. Now suppose our application reads off the entire Receive
                                                                                                                                  -
                                                                                                                                  5275 * buffer. rcv_wnd is now 100%, but since sender is not sending (because it thinks rcv_wnd is
                                                                                                                                  -
                                                                                                                                  5276 * still 0), there will be no ACKs onto which to add rcv_wnd. Thus the traffic completely stops.
                                                                                                                                  -
                                                                                                                                  5277 *
                                                                                                                                  -
                                                                                                                                  5278 * Original RFC 793 (as well as RFC 1122) suggests TCP sender should deal with this by "probing"
                                                                                                                                  -
                                                                                                                                  5279 * with 1-byte (I think) data segments sent regularly (every RTO; our DTO) in order to trigger
                                                                                                                                  -
                                                                                                                                  5280 * ACKs, which would eventually expose the non-zero rcv_wnd. To me this seems to have the
                                                                                                                                  -
                                                                                                                                  5281 * disadvantage of complexity and implications on how we packetize data (especially since in
                                                                                                                                  -
                                                                                                                                  5282 * unreliable mode we're not supposed to break up contiguous blocks of max-block-size bytes).
                                                                                                                                  -
                                                                                                                                  5283 * Also it is not as responsive as it could be. Consider that the most common scenario in
                                                                                                                                  -
                                                                                                                                  5284 * high-speed downloads is that the Receive buffer is exceeded only momentarily (due to thread
                                                                                                                                  -
                                                                                                                                  5285 * contention on receiver or something) but is then quickly emptied (once the thread contention is
                                                                                                                                  -
                                                                                                                                  5286 * resolved). In case that happens in a fraction of a second, having the probe occur a DTO later
                                                                                                                                  -
                                                                                                                                  5287 * wastes a long time. Instead the RECEIVER could take initiative and send an empty ACK with a
                                                                                                                                  -
                                                                                                                                  5288 * rcv_wnd update. When should it do this? A naive answer would be to do it simply EVERY time
                                                                                                                                  -
                                                                                                                                  5289 * free Receive buffer space increases. However that'd be terrible, as in a typical scenario
                                                                                                                                  -
                                                                                                                                  5290 * (where lots of bytes arrive, while user reads off lots of bytes due to them becoming available
                                                                                                                                  -
                                                                                                                                  5291 * to read) it would explode the number of ACKs. Even in the "sender has stopped due to
                                                                                                                                  -
                                                                                                                                  5292 * rcv_wnd=0" situation, this would result in a ton of ACKs. Plus it would cause sender to start
                                                                                                                                  -
                                                                                                                                  5293 * recovering with quite small windows which is inefficient. So the less naive way is to send the
                                                                                                                                  -
                                                                                                                                  5294 * ACK of our volition if free buffer space has increased by some % of its max capacity (like
                                                                                                                                  -
                                                                                                                                  5295 * 50%).
                                                                                                                                  -
                                                                                                                                  5296 *
                                                                                                                                  -
                                                                                                                                  5297 * This would certainly solve aforementioned situation where Receive buffer fills up momentarily
                                                                                                                                  -
                                                                                                                                  5298 * but then is quickly cleared. A fraction of a second later, the free space will have increased
                                                                                                                                  -
                                                                                                                                  5299 * by over 50%, an ACK would go to sender, and sender would work with a nice large rcv_wnd.
                                                                                                                                  -
                                                                                                                                  5300 * However, if the Receiver only reads off 49% of the data and then stops, traffic would remain
                                                                                                                                  -
                                                                                                                                  5301 * stuck (even though 49% of the buffer is available). This is where the sender-side probing
                                                                                                                                  -
                                                                                                                                  5302 * would solve it (slowly); though sender-side unsolicited ACKing on a timer would also do. I
                                                                                                                                  -
                                                                                                                                  5303 * leave that as a @todo; probably important in a widely-used net_flow; but without it it should be
                                                                                                                                  -
                                                                                                                                  5304 * sufficient for the initial intended purpose of net_flow. In that use scenario, we count on the
                                                                                                                                  -
                                                                                                                                  5305 * receiver code to be well behaved and read from Receive buffer as soon as the computer lets it.
                                                                                                                                  -
                                                                                                                                  5306 *
                                                                                                                                  -
                                                                                                                                  5307 * With that settled, there is one more concern. This is intuitively clear but is also mentioned
                                                                                                                                  -
                                                                                                                                  5308 * in RFC 1122-4.2.2.17. Suppose the receiver-initiated ACK after 50% of buffer is cleared is
                                                                                                                                  -
                                                                                                                                  5309 * dropped by the network. ACKs are not reliable (there are no ACKs of ACKs), so then we're back
                                                                                                                                  -
                                                                                                                                  5310 * in no-more-traffic-forever land. To solve this, I implement this scheme: Having sent that ACK,
                                                                                                                                  -
                                                                                                                                  5311 * start a timer and then send it again periodically, until some long time period (something like
                                                                                                                                  -
                                                                                                                                  5312 * a minute) expires (just in case) OR we get a new DATA packet from the sender. In the latter
                                                                                                                                  -
                                                                                                                                  5313 * case we're back in business, as it implies sender got our window update. Note that this
                                                                                                                                  -
                                                                                                                                  5314 * mechanism is not necessary any longer, once we implement sender-side probing as explained
                                                                                                                                  -
                                                                                                                                  5315 * above. */
                                                                                                                                  -
                                                                                                                                  5316
                                                                                                                                  -
                                                                                                                                  5317 // As always, no need to lock m_state, etc., unless we plan to alter them, since no other thread can alter them.
                                                                                                                                  -
                                                                                                                                  5318
                                                                                                                                  -
                                                                                                                                  5319 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  -
                                                                                                                                  5320 {
                                                                                                                                  -
                                                                                                                                  5321 /* Yes, they emptied Receive buffer. However, we haven't finished the graceful close.
                                                                                                                                  -
                                                                                                                                  5322 * Therefore -- even though one more barrier to reaching m_state == S_CLOSED has been removed --
                                                                                                                                  -
                                                                                                                                  5323 * there's nothing further to do at this time. In fact, in certain situations we might even
                                                                                                                                  -
                                                                                                                                  5324 * get more data onto the Receive buffer! @todo No graceful close yet. */
                                                                                                                                  -
                                                                                                                                  5325 FLOW_LOG_INFO('[' << sock << "] Receive buffer space freed, "
                                                                                                                                  -
                                                                                                                                  5326 "but state is now [" << sock->m_int_state << "]; ignoring.");
                                                                                                                                  -
                                                                                                                                  5327 return;
                                                                                                                                  -
                                                                                                                                  5328 }
                                                                                                                                  -
                                                                                                                                  5329 // else if (m_int_state == S_ESTABLISHED)
                                                                                                                                  -
                                                                                                                                  5330
                                                                                                                                  -
                                                                                                                                  5331 if (sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  -
                                                                                                                                  5332 {
                                                                                                                                  -
                                                                                                                                  5333 /* We have already sent the unsolicited ACK and are currently in the phase where we're
                                                                                                                                  -
                                                                                                                                  5334 * periodically sending more, until we get some DATA from sender or a long period of time
                                                                                                                                  -
                                                                                                                                  5335 * passes. Even if we've freed yet another large chunk of the buffer since the last ACK, do
                                                                                                                                  -
                                                                                                                                  5336 * not start again... just let it continue. */
                                                                                                                                  -
                                                                                                                                  5337 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space freed, but "
                                                                                                                                  -
                                                                                                                                  5338 "we are already in rcv_wnd recovery mode. Nothing to do.");
                                                                                                                                  -
                                                                                                                                  5339 return;
                                                                                                                                  -
                                                                                                                                  5340 }
                                                                                                                                  -
                                                                                                                                  5341 // else
                                                                                                                                  -
                                                                                                                                  5342
                                                                                                                                  -
                                                                                                                                  5343 // Grab available Receive buffer space.
                                                                                                                                  -
                                                                                                                                  5344 const size_t rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  5345 // @todo That was a ~copy/paste of Node::async_low_lvl_ack_send(). Add code reuse.
                                                                                                                                  -
                                                                                                                                  5346
                                                                                                                                  -
                                                                                                                                  5347 const size_t& last_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5239bool Node::sock_is_readable(const boost::any& sock_as_any) const
                                                                                                                                  +
                                                                                                                                  5240{
                                                                                                                                  +
                                                                                                                                  5241 using boost::any_cast;
                                                                                                                                  +
                                                                                                                                  5242
                                                                                                                                  +
                                                                                                                                  5243 const Peer_socket::Const_ptr sock = any_cast<Peer_socket::Ptr>(sock_as_any);
                                                                                                                                  +
                                                                                                                                  5244
                                                                                                                                  +
                                                                                                                                  5245 Peer_socket::Lock_guard lock(sock->m_mutex); // Many threads can access/write below state.
                                                                                                                                  +
                                                                                                                                  5246
                                                                                                                                  +
                                                                                                                                  5247 /* Our task here is to return true if and only if at this very moment calling sock->receive(),
                                                                                                                                  +
                                                                                                                                  5248 * assuming sufficient user buffer space, would yield either a return value of > 0 OR a
                                                                                                                                  +
                                                                                                                                  5249 * non-success *err_code. In other words, receive() would return "something." This is used for
                                                                                                                                  +
                                                                                                                                  5250 * Event_set machinery.
                                                                                                                                  +
                                                                                                                                  5251 *
                                                                                                                                  +
                                                                                                                                  5252 * This should mirror receive()'s algorithm. @todo Should receive() call this, for code reuse?
                                                                                                                                  +
                                                                                                                                  5253 * Maybe/maybe not. Consider performance when deciding.
                                                                                                                                  +
                                                                                                                                  5254 *
                                                                                                                                  +
                                                                                                                                  5255 * - If state is CLOSED, then some sort of error/terminating condition occurred, so receive()
                                                                                                                                  +
                                                                                                                                  5256 * would return 0 and non-success Error_code == sock->m_disconnect_cause. (Readable.)
                                                                                                                                  +
                                                                                                                                  5257 * - Otherwise, if Receive buffer can be dequeued, receive() would return > 0.
                                                                                                                                  +
                                                                                                                                  5258 * - Otherwise, if Receive buffer cannot be dequeued, receive() would return 0 and no error. (Not
                                                                                                                                  +
                                                                                                                                  5259 * Readable.) Note that Receive buffer is guaranteed to be clear when entering non-Readable
                                                                                                                                  +
                                                                                                                                  5260 * non-error states (OPEN+CONNECTING, OPEN+DISCONNECTING). (Readable.)
                                                                                                                                  +
                                                                                                                                  5261 *
                                                                                                                                  +
                                                                                                                                  5262 * @todo Once we implement graceful close, there will be situations where Receive buffer is empty, state is
                                                                                                                                  +
                                                                                                                                  5263 * OPEN+DISCONNECTING, m_disconnect_cause = <cause of disconnect>, and we should return true (Readable)
                                                                                                                                  +
                                                                                                                                  5264 * here (only when we also know that no future Receive traffic possible). See receive(). */
                                                                                                                                  +
                                                                                                                                  5265
                                                                                                                                  +
                                                                                                                                  5266 return (sock->m_state == Peer_socket::State::S_CLOSED) || rcv_buf_deqable(sock);
                                                                                                                                  +
                                                                                                                                  5267} // Node::sock_is_readable()
                                                                                                                                  +
                                                                                                                                  5268
                                                                                                                                  + +
                                                                                                                                  5270{
                                                                                                                                  +
                                                                                                                                  5271 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5272
                                                                                                                                  +
                                                                                                                                  5273 /* rcv_wnd (free Receive buffer space) is sent to other side opportunistically in ACKs. While
                                                                                                                                  +
                                                                                                                                  5274 * sender is sending data, they will have a good idea of our rcv_wnd as well. Is that (in a
                                                                                                                                  +
                                                                                                                                  5275 * one-way-traffic situation) sufficient however? If the sender is not sending data, because the
                                                                                                                                  +
                                                                                                                                  5276 * application on the sender doesn't provide more data to send, then the discussion is moot.
                                                                                                                                  +
                                                                                                                                  5277 * What if the sender is not sending data, because we have told it rcv_wnd is 0 (meaning our
                                                                                                                                  +
                                                                                                                                  5278 * Receive buffer is full)? This can and will happen. For example suppose our application layer
                                                                                                                                  +
                                                                                                                                  5279 * simply stops reading from Receive buffer for a while, resulting in rcv_wnd 0 sent in one of the
                                                                                                                                  +
                                                                                                                                  5280 * ACKs. Now sender knows rcv_wnd is 0. Now suppose our application reads off the entire Receive
                                                                                                                                  +
                                                                                                                                  5281 * buffer. rcv_wnd is now 100%, but since sender is not sending (because it thinks rcv_wnd is
                                                                                                                                  +
                                                                                                                                  5282 * still 0), there will be no ACKs onto which to add rcv_wnd. Thus the traffic completely stops.
                                                                                                                                  +
                                                                                                                                  5283 *
                                                                                                                                  +
                                                                                                                                  5284 * Original RFC 793 (as well as RFC 1122) suggests TCP sender should deal with this by "probing"
                                                                                                                                  +
                                                                                                                                  5285 * with 1-byte (I think) data segments sent regularly (every RTO; our DTO) in order to trigger
                                                                                                                                  +
                                                                                                                                  5286 * ACKs, which would eventually expose the non-zero rcv_wnd. To me this seems to have the
                                                                                                                                  +
                                                                                                                                  5287 * disadvantage of complexity and implications on how we packetize data (especially since in
                                                                                                                                  +
                                                                                                                                  5288 * unreliable mode we're not supposed to break up contiguous blocks of max-block-size bytes).
                                                                                                                                  +
                                                                                                                                  5289 * Also it is not as responsive as it could be. Consider that the most common scenario in
                                                                                                                                  +
                                                                                                                                  5290 * high-speed downloads is that the Receive buffer is exceeded only momentarily (due to thread
                                                                                                                                  +
                                                                                                                                  5291 * contention on receiver or something) but is then quickly emptied (once the thread contention is
                                                                                                                                  +
                                                                                                                                  5292 * resolved). In case that happens in a fraction of a second, having the probe occur a DTO later
                                                                                                                                  +
                                                                                                                                  5293 * wastes a long time. Instead the RECEIVER could take initiative and send an empty ACK with a
                                                                                                                                  +
                                                                                                                                  5294 * rcv_wnd update. When should it do this? A naive answer would be to do it simply EVERY time
                                                                                                                                  +
                                                                                                                                  5295 * free Receive buffer space increases. However that'd be terrible, as in a typical scenario
                                                                                                                                  +
                                                                                                                                  5296 * (where lots of bytes arrive, while user reads off lots of bytes due to them becoming available
                                                                                                                                  +
                                                                                                                                  5297 * to read) it would explode the number of ACKs. Even in the "sender has stopped due to
                                                                                                                                  +
                                                                                                                                  5298 * rcv_wnd=0" situation, this would result in a ton of ACKs. Plus it would cause sender to start
                                                                                                                                  +
                                                                                                                                  5299 * recovering with quite small windows which is inefficient. So the less naive way is to send the
                                                                                                                                  +
                                                                                                                                  5300 * ACK of our volition if free buffer space has increased by some % of its max capacity (like
                                                                                                                                  +
                                                                                                                                  5301 * 50%).
                                                                                                                                  +
                                                                                                                                  5302 *
                                                                                                                                  +
                                                                                                                                  5303 * This would certainly solve aforementioned situation where Receive buffer fills up momentarily
                                                                                                                                  +
                                                                                                                                  5304 * but then is quickly cleared. A fraction of a second later, the free space will have increased
                                                                                                                                  +
                                                                                                                                  5305 * by over 50%, an ACK would go to sender, and sender would work with a nice large rcv_wnd.
                                                                                                                                  +
                                                                                                                                  5306 * However, if the Receiver only reads off 49% of the data and then stops, traffic would remain
                                                                                                                                  +
                                                                                                                                  5307 * stuck (even though 49% of the buffer is available). This is where the sender-side probing
                                                                                                                                  +
                                                                                                                                  5308 * would solve it (slowly); though sender-side unsolicited ACKing on a timer would also do. I
                                                                                                                                  +
                                                                                                                                  5309 * leave that as a @todo; probably important in a widely-used net_flow; but without it it should be
                                                                                                                                  +
                                                                                                                                  5310 * sufficient for the initial intended purpose of net_flow. In that use scenario, we count on the
                                                                                                                                  +
                                                                                                                                  5311 * receiver code to be well behaved and read from Receive buffer as soon as the computer lets it.
                                                                                                                                  +
                                                                                                                                  5312 *
                                                                                                                                  +
                                                                                                                                  5313 * With that settled, there is one more concern. This is intuitively clear but is also mentioned
                                                                                                                                  +
                                                                                                                                  5314 * in RFC 1122-4.2.2.17. Suppose the receiver-initiated ACK after 50% of buffer is cleared is
                                                                                                                                  +
                                                                                                                                  5315 * dropped by the network. ACKs are not reliable (there are no ACKs of ACKs), so then we're back
                                                                                                                                  +
                                                                                                                                  5316 * in no-more-traffic-forever land. To solve this, I implement this scheme: Having sent that ACK,
                                                                                                                                  +
                                                                                                                                  5317 * start a timer and then send it again periodically, until some long time period (something like
                                                                                                                                  +
                                                                                                                                  5318 * a minute) expires (just in case) OR we get a new DATA packet from the sender. In the latter
                                                                                                                                  +
                                                                                                                                  5319 * case we're back in business, as it implies sender got our window update. Note that this
                                                                                                                                  +
                                                                                                                                  5320 * mechanism is not necessary any longer, once we implement sender-side probing as explained
                                                                                                                                  +
                                                                                                                                  5321 * above. */
                                                                                                                                  +
                                                                                                                                  5322
                                                                                                                                  +
                                                                                                                                  5323 // As always, no need to lock m_state, etc., unless we plan to alter them, since no other thread can alter them.
                                                                                                                                  +
                                                                                                                                  5324
                                                                                                                                  +
                                                                                                                                  5325 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  5326 {
                                                                                                                                  +
                                                                                                                                  5327 /* Yes, they emptied Receive buffer. However, we haven't finished the graceful close.
                                                                                                                                  +
                                                                                                                                  5328 * Therefore -- even though one more barrier to reaching m_state == S_CLOSED has been removed --
                                                                                                                                  +
                                                                                                                                  5329 * there's nothing further to do at this time. In fact, in certain situations we might even
                                                                                                                                  +
                                                                                                                                  5330 * get more data onto the Receive buffer! @todo No graceful close yet. */
                                                                                                                                  +
                                                                                                                                  5331 FLOW_LOG_INFO('[' << sock << "] Receive buffer space freed, "
                                                                                                                                  +
                                                                                                                                  5332 "but state is now [" << sock->m_int_state << "]; ignoring.");
                                                                                                                                  +
                                                                                                                                  5333 return;
                                                                                                                                  +
                                                                                                                                  5334 }
                                                                                                                                  +
                                                                                                                                  5335 // else if (m_int_state == S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  5336
                                                                                                                                  +
                                                                                                                                  5337 if (sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  +
                                                                                                                                  5338 {
                                                                                                                                  +
                                                                                                                                  5339 /* We have already sent the unsolicited ACK and are currently in the phase where we're
                                                                                                                                  +
                                                                                                                                  5340 * periodically sending more, until we get some DATA from sender or a long period of time
                                                                                                                                  +
                                                                                                                                  5341 * passes. Even if we've freed yet another large chunk of the buffer since the last ACK, do
                                                                                                                                  +
                                                                                                                                  5342 * not start again... just let it continue. */
                                                                                                                                  +
                                                                                                                                  5343 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space freed, but "
                                                                                                                                  +
                                                                                                                                  5344 "we are already in rcv_wnd recovery mode. Nothing to do.");
                                                                                                                                  +
                                                                                                                                  5345 return;
                                                                                                                                  +
                                                                                                                                  5346 }
                                                                                                                                  +
                                                                                                                                  5347 // else
                                                                                                                                  5348
                                                                                                                                  -
                                                                                                                                  5349 if (rcv_wnd <= last_rcv_wnd)
                                                                                                                                  -
                                                                                                                                  5350 {
                                                                                                                                  -
                                                                                                                                  5351 /* This seems odd, but one can imagine more data arriving between when we were placed onto W's
                                                                                                                                  -
                                                                                                                                  5352 * task queue and when we executed. So it's not that odd and not worth INFO or WARNING. */
                                                                                                                                  -
                                                                                                                                  5353 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space freed, but "
                                                                                                                                  -
                                                                                                                                  5354 "free space [" << sock->bytes_blocks_str(rcv_wnd) << "] <= prev "
                                                                                                                                  -
                                                                                                                                  5355 "free space [" << sock->bytes_blocks_str(last_rcv_wnd) << "]. Nothing to do.");
                                                                                                                                  -
                                                                                                                                  5356 return;
                                                                                                                                  -
                                                                                                                                  5357 }
                                                                                                                                  -
                                                                                                                                  5358 // else
                                                                                                                                  -
                                                                                                                                  5359
                                                                                                                                  -
                                                                                                                                  5360 const size_t diff = rcv_wnd - last_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  5361 const unsigned int pct = sock->opt(sock->m_opts.m_st_rcv_buf_max_size_to_advertise_percent);
                                                                                                                                  -
                                                                                                                                  5362 const size_t max_rcv_buf_size = sock->max_block_size_multiple(sock->m_opts.m_st_rcv_buf_max_size);
                                                                                                                                  -
                                                                                                                                  5363 const size_t min_inc = max_rcv_buf_size * pct / 100;
                                                                                                                                  -
                                                                                                                                  5364
                                                                                                                                  -
                                                                                                                                  5365 if (diff < min_inc)
                                                                                                                                  -
                                                                                                                                  5366 {
                                                                                                                                  -
                                                                                                                                  5367 // Not big enough increase; wait until more space is freed before informing other side.
                                                                                                                                  -
                                                                                                                                  5368 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space "
                                                                                                                                  -
                                                                                                                                  5369 "freed is [" << sock->bytes_blocks_str(diff) << "] since last advertisement; "
                                                                                                                                  -
                                                                                                                                  5370 "< threshold [" << pct << "%] x "
                                                                                                                                  -
                                                                                                                                  5371 "[" << sock->bytes_blocks_str(max_rcv_buf_size) << "] = "
                                                                                                                                  -
                                                                                                                                  5372 "[" << sock->bytes_blocks_str(min_inc) << "]. Not advertising rcv_wnd yet.");
                                                                                                                                  -
                                                                                                                                  5373 return;
                                                                                                                                  -
                                                                                                                                  5374 }
                                                                                                                                  -
                                                                                                                                  5375 // else cool. Let's advertise it.
                                                                                                                                  -
                                                                                                                                  5376
                                                                                                                                  -
                                                                                                                                  5377 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  -
                                                                                                                                  5378 FLOW_LOG_INFO('[' << sock << "] Receive buffer space "
                                                                                                                                  -
                                                                                                                                  5379 "freed is [" << sock->bytes_blocks_str(diff) << "] since last advertisement; "
                                                                                                                                  -
                                                                                                                                  5380 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "]; "
                                                                                                                                  -
                                                                                                                                  5381 ">= threshold [" << pct << "%] x "
                                                                                                                                  -
                                                                                                                                  5382 "[" << sock->bytes_blocks_str(max_rcv_buf_size) << "] = "
                                                                                                                                  -
                                                                                                                                  5383 "[" << sock->bytes_blocks_str(min_inc) << "]. Sending unsolicited rcv_wnd-advertising ACK "
                                                                                                                                  -
                                                                                                                                  5384 "and entering rcv_wnd recovery.");
                                                                                                                                  -
                                                                                                                                  5385
                                                                                                                                  -
                                                                                                                                  5386 // Prevent any further shenanigans (see above), until we exit this mode.
                                                                                                                                  -
                                                                                                                                  5387 sock->m_rcv_in_rcv_wnd_recovery = true;
                                                                                                                                  -
                                                                                                                                  5388 // Mark this down, so that we exit this mode eventually.
                                                                                                                                  -
                                                                                                                                  5389 sock->m_rcv_wnd_recovery_start_time = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  5390
                                                                                                                                  -
                                                                                                                                  5391 // Record we started the mode.
                                                                                                                                  -
                                                                                                                                  5392 sock->m_rcv_stats.rcv_wnd_recovery_event_start();
                                                                                                                                  -
                                                                                                                                  5393
                                                                                                                                  -
                                                                                                                                  5394 async_rcv_wnd_recovery(sock, rcv_wnd);
                                                                                                                                  -
                                                                                                                                  5395} // Node::receive_wnd_updated()
                                                                                                                                  +
                                                                                                                                  5349 // Grab available Receive buffer space.
                                                                                                                                  +
                                                                                                                                  5350 const size_t rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  +
                                                                                                                                  5351 // @todo That was a ~copy/paste of Node::async_low_lvl_ack_send(). Add code reuse.
                                                                                                                                  +
                                                                                                                                  5352
                                                                                                                                  +
                                                                                                                                  5353 const size_t& last_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5354
                                                                                                                                  +
                                                                                                                                  5355 if (rcv_wnd <= last_rcv_wnd)
                                                                                                                                  +
                                                                                                                                  5356 {
                                                                                                                                  +
                                                                                                                                  5357 /* This seems odd, but one can imagine more data arriving between when we were placed onto W's
                                                                                                                                  +
                                                                                                                                  5358 * task queue and when we executed. So it's not that odd and not worth INFO or WARNING. */
                                                                                                                                  +
                                                                                                                                  5359 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space freed, but "
                                                                                                                                  +
                                                                                                                                  5360 "free space [" << sock->bytes_blocks_str(rcv_wnd) << "] <= prev "
                                                                                                                                  +
                                                                                                                                  5361 "free space [" << sock->bytes_blocks_str(last_rcv_wnd) << "]. Nothing to do.");
                                                                                                                                  +
                                                                                                                                  5362 return;
                                                                                                                                  +
                                                                                                                                  5363 }
                                                                                                                                  +
                                                                                                                                  5364 // else
                                                                                                                                  +
                                                                                                                                  5365
                                                                                                                                  +
                                                                                                                                  5366 const size_t diff = rcv_wnd - last_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5367 const unsigned int pct = sock->opt(sock->m_opts.m_st_rcv_buf_max_size_to_advertise_percent);
                                                                                                                                  +
                                                                                                                                  5368 const size_t max_rcv_buf_size = sock->max_block_size_multiple(sock->m_opts.m_st_rcv_buf_max_size);
                                                                                                                                  +
                                                                                                                                  5369 const size_t min_inc = max_rcv_buf_size * pct / 100;
                                                                                                                                  +
                                                                                                                                  5370
                                                                                                                                  +
                                                                                                                                  5371 if (diff < min_inc)
                                                                                                                                  +
                                                                                                                                  5372 {
                                                                                                                                  +
                                                                                                                                  5373 // Not big enough increase; wait until more space is freed before informing other side.
                                                                                                                                  +
                                                                                                                                  5374 FLOW_LOG_TRACE('[' << sock << "] Receive buffer space "
                                                                                                                                  +
                                                                                                                                  5375 "freed is [" << sock->bytes_blocks_str(diff) << "] since last advertisement; "
                                                                                                                                  +
                                                                                                                                  5376 "< threshold [" << pct << "%] x "
                                                                                                                                  +
                                                                                                                                  5377 "[" << sock->bytes_blocks_str(max_rcv_buf_size) << "] = "
                                                                                                                                  +
                                                                                                                                  5378 "[" << sock->bytes_blocks_str(min_inc) << "]. Not advertising rcv_wnd yet.");
                                                                                                                                  +
                                                                                                                                  5379 return;
                                                                                                                                  +
                                                                                                                                  5380 }
                                                                                                                                  +
                                                                                                                                  5381 // else cool. Let's advertise it.
                                                                                                                                  +
                                                                                                                                  5382
                                                                                                                                  +
                                                                                                                                  5383 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  +
                                                                                                                                  5384 FLOW_LOG_INFO('[' << sock << "] Receive buffer space "
                                                                                                                                  +
                                                                                                                                  5385 "freed is [" << sock->bytes_blocks_str(diff) << "] since last advertisement; "
                                                                                                                                  +
                                                                                                                                  5386 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "]; "
                                                                                                                                  +
                                                                                                                                  5387 ">= threshold [" << pct << "%] x "
                                                                                                                                  +
                                                                                                                                  5388 "[" << sock->bytes_blocks_str(max_rcv_buf_size) << "] = "
                                                                                                                                  +
                                                                                                                                  5389 "[" << sock->bytes_blocks_str(min_inc) << "]. Sending unsolicited rcv_wnd-advertising ACK "
                                                                                                                                  +
                                                                                                                                  5390 "and entering rcv_wnd recovery.");
                                                                                                                                  +
                                                                                                                                  5391
                                                                                                                                  +
                                                                                                                                  5392 // Prevent any further shenanigans (see above), until we exit this mode.
                                                                                                                                  +
                                                                                                                                  5393 sock->m_rcv_in_rcv_wnd_recovery = true;
                                                                                                                                  +
                                                                                                                                  5394 // Mark this down, so that we exit this mode eventually.
                                                                                                                                  +
                                                                                                                                  5395 sock->m_rcv_wnd_recovery_start_time = Fine_clock::now();
                                                                                                                                  5396
                                                                                                                                  - -
                                                                                                                                  5398{
                                                                                                                                  -
                                                                                                                                  5399 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  5400 using boost::chrono::round;
                                                                                                                                  -
                                                                                                                                  5401 using boost::weak_ptr;
                                                                                                                                  +
                                                                                                                                  5397 // Record we started the mode.
                                                                                                                                  +
                                                                                                                                  5398 sock->m_rcv_stats.rcv_wnd_recovery_event_start();
                                                                                                                                  +
                                                                                                                                  5399
                                                                                                                                  +
                                                                                                                                  5400 async_rcv_wnd_recovery(sock, rcv_wnd);
                                                                                                                                  +
                                                                                                                                  5401} // Node::receive_wnd_updated()
                                                                                                                                  5402
                                                                                                                                  -
                                                                                                                                  5403 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5404
                                                                                                                                  -
                                                                                                                                  5405 // As discussed in Node::receive_wnd_updated(), send the ACK and then periodically re-send it until canceled.
                                                                                                                                  -
                                                                                                                                  5406
                                                                                                                                  -
                                                                                                                                  5407 // Create an ACK with no packets acknowledged (so just a window update) and send it off.
                                                                                                                                  -
                                                                                                                                  5408 auto ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5409 ack->m_rcv_wnd = rcv_wnd;
                                                                                                                                  -
                                                                                                                                  5410 // Record that it was advertised!
                                                                                                                                  -
                                                                                                                                  5411 sock->m_rcv_last_sent_rcv_wnd = rcv_wnd;
                                                                                                                                  + +
                                                                                                                                  5404{
                                                                                                                                  +
                                                                                                                                  5405 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  5406 using boost::chrono::round;
                                                                                                                                  +
                                                                                                                                  5407 using boost::weak_ptr;
                                                                                                                                  +
                                                                                                                                  5408
                                                                                                                                  +
                                                                                                                                  5409 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5410
                                                                                                                                  +
                                                                                                                                  5411 // As discussed in Node::receive_wnd_updated(), send the ACK and then periodically re-send it until canceled.
                                                                                                                                  5412
                                                                                                                                  - - -
                                                                                                                                  5415 false))
                                                                                                                                  -
                                                                                                                                  5416 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  -
                                                                                                                                  5417 {
                                                                                                                                  -
                                                                                                                                  5418 return;
                                                                                                                                  -
                                                                                                                                  5419 }
                                                                                                                                  -
                                                                                                                                  5420 // else
                                                                                                                                  -
                                                                                                                                  5421
                                                                                                                                  -
                                                                                                                                  5422 // Register one ACK packet we will send ASAP (and that it acknowledged no individual packets).
                                                                                                                                  -
                                                                                                                                  5423 sock->m_rcv_stats.sent_low_lvl_ack_packet(true);
                                                                                                                                  -
                                                                                                                                  5424
                                                                                                                                  -
                                                                                                                                  5425 // ACK queued to send soon. Now, as discussed, protect against it being lost by scheduling a timer.
                                                                                                                                  -
                                                                                                                                  5426
                                                                                                                                  -
                                                                                                                                  5427 const Fine_duration fire_when_from_now = sock->opt(sock->m_opts.m_dyn_rcv_wnd_recovery_timer_period);
                                                                                                                                  -
                                                                                                                                  5428
                                                                                                                                  -
                                                                                                                                  5429 FLOW_LOG_INFO("Setting timer to fire "
                                                                                                                                  -
                                                                                                                                  5430 "[" << round<milliseconds>(fire_when_from_now) << "] from now.");
                                                                                                                                  -
                                                                                                                                  5431
                                                                                                                                  -
                                                                                                                                  5432 /* As usual, when scheduling a thing we can use the much simpler util::schedule_task_*() API; or the
                                                                                                                                  -
                                                                                                                                  5433 * full-featured boost.asio Timer. We don't need the advanced features; so the only possible reason
                                                                                                                                  -
                                                                                                                                  5434 * to go with Timer would be the perf considerations (see schedule_task_from_now() doc header for discussion).
                                                                                                                                  -
                                                                                                                                  5435 * It is emphatically NOT the case that lots of these tasks are scheduled/fired/canceled per unit time;
                                                                                                                                  -
                                                                                                                                  5436 * e.g., we see it as rare enough to be OK with an INFO log message. Hence no need to reuse a Timer repeatedly,
                                                                                                                                  -
                                                                                                                                  5437 * so use the simple API. */
                                                                                                                                  -
                                                                                                                                  5438
                                                                                                                                  -
                                                                                                                                  5439 sock->m_rcv_wnd_recovery_scheduled_task
                                                                                                                                  -
                                                                                                                                  5440 = schedule_task_from_now(get_logger(), fire_when_from_now, true, &m_task_engine,
                                                                                                                                  -
                                                                                                                                  5441 [this, sock_observer = weak_ptr<Peer_socket>(sock)](bool)
                                                                                                                                  -
                                                                                                                                  5442 {
                                                                                                                                  -
                                                                                                                                  5443 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5413 // Create an ACK with no packets acknowledged (so just a window update) and send it off.
                                                                                                                                  +
                                                                                                                                  5414 auto ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5415 ack->m_rcv_wnd = rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5416 // Record that it was advertised!
                                                                                                                                  +
                                                                                                                                  5417 sock->m_rcv_last_sent_rcv_wnd = rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5418
                                                                                                                                  + + +
                                                                                                                                  5421 false))
                                                                                                                                  +
                                                                                                                                  5422 // ^-- defer_delta_check == false: for similar reason as in send_worker_check_state() calling send_worker().
                                                                                                                                  +
                                                                                                                                  5423 {
                                                                                                                                  +
                                                                                                                                  5424 return;
                                                                                                                                  +
                                                                                                                                  5425 }
                                                                                                                                  +
                                                                                                                                  5426 // else
                                                                                                                                  +
                                                                                                                                  5427
                                                                                                                                  +
                                                                                                                                  5428 // Register one ACK packet we will send ASAP (and that it acknowledged no individual packets).
                                                                                                                                  +
                                                                                                                                  5429 sock->m_rcv_stats.sent_low_lvl_ack_packet(true);
                                                                                                                                  +
                                                                                                                                  5430
                                                                                                                                  +
                                                                                                                                  5431 // ACK queued to send soon. Now, as discussed, protect against it being lost by scheduling a timer.
                                                                                                                                  +
                                                                                                                                  5432
                                                                                                                                  +
                                                                                                                                  5433 const Fine_duration fire_when_from_now = sock->opt(sock->m_opts.m_dyn_rcv_wnd_recovery_timer_period);
                                                                                                                                  +
                                                                                                                                  5434
                                                                                                                                  +
                                                                                                                                  5435 FLOW_LOG_INFO("Setting timer to fire "
                                                                                                                                  +
                                                                                                                                  5436 "[" << round<milliseconds>(fire_when_from_now) << "] from now.");
                                                                                                                                  +
                                                                                                                                  5437
                                                                                                                                  +
                                                                                                                                  5438 /* As usual, when scheduling a thing we can use the much simpler util::schedule_task_*() API; or the
                                                                                                                                  +
                                                                                                                                  5439 * full-featured boost.asio Timer. We don't need the advanced features; so the only possible reason
                                                                                                                                  +
                                                                                                                                  5440 * to go with Timer would be the perf considerations (see schedule_task_from_now() doc header for discussion).
                                                                                                                                  +
                                                                                                                                  5441 * It is emphatically NOT the case that lots of these tasks are scheduled/fired/canceled per unit time;
                                                                                                                                  +
                                                                                                                                  5442 * e.g., we see it as rare enough to be OK with an INFO log message. Hence no need to reuse a Timer repeatedly,
                                                                                                                                  +
                                                                                                                                  5443 * so use the simple API. */
                                                                                                                                  5444
                                                                                                                                  -
                                                                                                                                  5445 auto sock = sock_observer.lock();
                                                                                                                                  -
                                                                                                                                  5446 if (!sock)
                                                                                                                                  -
                                                                                                                                  5447 {
                                                                                                                                  -
                                                                                                                                  5448 return; // Possible or not, allow for this possibility for maintainability.
                                                                                                                                  -
                                                                                                                                  5449 }
                                                                                                                                  -
                                                                                                                                  5450 // else
                                                                                                                                  -
                                                                                                                                  5451
                                                                                                                                  -
                                                                                                                                  5452 const Fine_duration since_recovery_started = Fine_clock::now() - sock->m_rcv_wnd_recovery_start_time;
                                                                                                                                  -
                                                                                                                                  5453 if (since_recovery_started > sock->opt(sock->m_opts.m_dyn_rcv_wnd_recovery_max_period))
                                                                                                                                  -
                                                                                                                                  5454 {
                                                                                                                                  -
                                                                                                                                  5455 // We've kept ACKing for a long time, and still no data. Give up: it's all up to the sender now.
                                                                                                                                  -
                                                                                                                                  5456
                                                                                                                                  -
                                                                                                                                  5457 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  -
                                                                                                                                  5458 FLOW_LOG_INFO('[' << sock << "]: still no new DATA arrived since last rcv_wnd advertisement; "
                                                                                                                                  -
                                                                                                                                  5459 "Time since entering recovery [" << round<milliseconds>(since_recovery_started) << "] expired. "
                                                                                                                                  -
                                                                                                                                  5460 "Ending rcv_wnd recovery.");
                                                                                                                                  -
                                                                                                                                  5461 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  +
                                                                                                                                  5445 sock->m_rcv_wnd_recovery_scheduled_task
                                                                                                                                  +
                                                                                                                                  5446 = schedule_task_from_now(get_logger(), fire_when_from_now, true, &m_task_engine,
                                                                                                                                  +
                                                                                                                                  5447 [this, sock_observer = weak_ptr<Peer_socket>(sock)](bool)
                                                                                                                                  +
                                                                                                                                  5448 {
                                                                                                                                  +
                                                                                                                                  5449 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5450
                                                                                                                                  +
                                                                                                                                  5451 auto sock = sock_observer.lock();
                                                                                                                                  +
                                                                                                                                  5452 if (!sock)
                                                                                                                                  +
                                                                                                                                  5453 {
                                                                                                                                  +
                                                                                                                                  5454 return; // Possible or not, allow for this possibility for maintainability.
                                                                                                                                  +
                                                                                                                                  5455 }
                                                                                                                                  +
                                                                                                                                  5456 // else
                                                                                                                                  +
                                                                                                                                  5457
                                                                                                                                  +
                                                                                                                                  5458 const Fine_duration since_recovery_started = Fine_clock::now() - sock->m_rcv_wnd_recovery_start_time;
                                                                                                                                  +
                                                                                                                                  5459 if (since_recovery_started > sock->opt(sock->m_opts.m_dyn_rcv_wnd_recovery_max_period))
                                                                                                                                  +
                                                                                                                                  5460 {
                                                                                                                                  +
                                                                                                                                  5461 // We've kept ACKing for a long time, and still no data. Give up: it's all up to the sender now.
                                                                                                                                  5462
                                                                                                                                  -
                                                                                                                                  5463 // Record we ended in timeout.
                                                                                                                                  -
                                                                                                                                  5464 sock->m_rcv_stats.rcv_wnd_recovery_event_finish(false);
                                                                                                                                  -
                                                                                                                                  5465
                                                                                                                                  -
                                                                                                                                  5466 return;
                                                                                                                                  -
                                                                                                                                  5467 }
                                                                                                                                  -
                                                                                                                                  5468 // else
                                                                                                                                  -
                                                                                                                                  5469
                                                                                                                                  -
                                                                                                                                  5470 // Still in rcv_wnd recovery. Send another unsolicited ACK (as in receive_wnd_updated()).
                                                                                                                                  +
                                                                                                                                  5463 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  +
                                                                                                                                  5464 FLOW_LOG_INFO('[' << sock << "]: still no new DATA arrived since last rcv_wnd advertisement; "
                                                                                                                                  +
                                                                                                                                  5465 "Time since entering recovery [" << round<milliseconds>(since_recovery_started) << "] expired. "
                                                                                                                                  +
                                                                                                                                  5466 "Ending rcv_wnd recovery.");
                                                                                                                                  +
                                                                                                                                  5467 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  +
                                                                                                                                  5468
                                                                                                                                  +
                                                                                                                                  5469 // Record we ended in timeout.
                                                                                                                                  +
                                                                                                                                  5470 sock->m_rcv_stats.rcv_wnd_recovery_event_finish(false);
                                                                                                                                  5471
                                                                                                                                  -
                                                                                                                                  5472 // Re-grab available Receive buffer space.
                                                                                                                                  -
                                                                                                                                  5473 const size_t rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  5474
                                                                                                                                  -
                                                                                                                                  5475 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  -
                                                                                                                                  5476 FLOW_LOG_INFO('[' << sock << "]: still no new DATA arrived since last rcv_wnd advertisement; "
                                                                                                                                  -
                                                                                                                                  5477 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "]; "
                                                                                                                                  -
                                                                                                                                  5478 "time since entering recovery [" << round<milliseconds>(since_recovery_started) << "]. "
                                                                                                                                  -
                                                                                                                                  5479 "Sending unsolicited rcv_wnd-advertising ACK and continuing rcv_wnd recovery.");
                                                                                                                                  +
                                                                                                                                  5472 return;
                                                                                                                                  +
                                                                                                                                  5473 }
                                                                                                                                  +
                                                                                                                                  5474 // else
                                                                                                                                  +
                                                                                                                                  5475
                                                                                                                                  +
                                                                                                                                  5476 // Still in rcv_wnd recovery. Send another unsolicited ACK (as in receive_wnd_updated()).
                                                                                                                                  +
                                                                                                                                  5477
                                                                                                                                  +
                                                                                                                                  5478 // Re-grab available Receive buffer space.
                                                                                                                                  +
                                                                                                                                  5479 const size_t rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  5480
                                                                                                                                  -
                                                                                                                                  5481 async_rcv_wnd_recovery(sock, rcv_wnd);
                                                                                                                                  -
                                                                                                                                  5482 }); // on-scheduled-task-fired
                                                                                                                                  -
                                                                                                                                  5483} // Node::async_rcv_wnd_recovery()
                                                                                                                                  -
                                                                                                                                  5484
                                                                                                                                  - -
                                                                                                                                  5486{
                                                                                                                                  -
                                                                                                                                  5487 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  5488 using boost::chrono::round;
                                                                                                                                  - +
                                                                                                                                  5481 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  +
                                                                                                                                  5482 FLOW_LOG_INFO('[' << sock << "]: still no new DATA arrived since last rcv_wnd advertisement; "
                                                                                                                                  +
                                                                                                                                  5483 "rcv_wnd = [" << sock->bytes_blocks_str(rcv_wnd) << "]; "
                                                                                                                                  +
                                                                                                                                  5484 "time since entering recovery [" << round<milliseconds>(since_recovery_started) << "]. "
                                                                                                                                  +
                                                                                                                                  5485 "Sending unsolicited rcv_wnd-advertising ACK and continuing rcv_wnd recovery.");
                                                                                                                                  +
                                                                                                                                  5486
                                                                                                                                  +
                                                                                                                                  5487 async_rcv_wnd_recovery(sock, rcv_wnd);
                                                                                                                                  +
                                                                                                                                  5488 }); // on-scheduled-task-fired
                                                                                                                                  +
                                                                                                                                  5489} // Node::async_rcv_wnd_recovery()
                                                                                                                                  5490
                                                                                                                                  -
                                                                                                                                  5491 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5492
                                                                                                                                  -
                                                                                                                                  5493 // We got some good DATA. If we were sending unsolicited window update ACKs, we can now stop.
                                                                                                                                  -
                                                                                                                                  5494
                                                                                                                                  -
                                                                                                                                  5495 if (!sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  -
                                                                                                                                  5496 {
                                                                                                                                  -
                                                                                                                                  5497 // We weren't.
                                                                                                                                  -
                                                                                                                                  5498 return;
                                                                                                                                  -
                                                                                                                                  5499 }
                                                                                                                                  -
                                                                                                                                  5500 // else
                                                                                                                                  -
                                                                                                                                  5501
                                                                                                                                  -
                                                                                                                                  5502 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  -
                                                                                                                                  5503 FLOW_LOG_INFO('[' << sock << "]: Canceling rcv_wnd recovery; "
                                                                                                                                  -
                                                                                                                                  5504 "Time since entering recovery "
                                                                                                                                  -
                                                                                                                                  5505 "[" << round<milliseconds>(Fine_clock::now() - sock->m_rcv_wnd_recovery_start_time) << "].");
                                                                                                                                  -
                                                                                                                                  5506
                                                                                                                                  -
                                                                                                                                  5507 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  -
                                                                                                                                  5508#ifndef NDEBUG
                                                                                                                                  -
                                                                                                                                  5509 const bool canceled =
                                                                                                                                  -
                                                                                                                                  5510#endif
                                                                                                                                  -
                                                                                                                                  5511 scheduled_task_cancel(get_logger(), sock->m_rcv_wnd_recovery_scheduled_task);
                                                                                                                                  -
                                                                                                                                  5512 assert(canceled);
                                                                                                                                  -
                                                                                                                                  5513
                                                                                                                                  -
                                                                                                                                  5514 // Record we ended in success.
                                                                                                                                  -
                                                                                                                                  5515 sock->m_rcv_stats.rcv_wnd_recovery_event_finish(true);
                                                                                                                                  -
                                                                                                                                  5516}
                                                                                                                                  -
                                                                                                                                  5517
                                                                                                                                  - -
                                                                                                                                  5519{
                                                                                                                                  -
                                                                                                                                  5520 using std::numeric_limits;
                                                                                                                                  -
                                                                                                                                  5521
                                                                                                                                  -
                                                                                                                                  5522 // We are in thread W.
                                                                                                                                  + +
                                                                                                                                  5492{
                                                                                                                                  +
                                                                                                                                  5493 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  5494 using boost::chrono::round;
                                                                                                                                  + +
                                                                                                                                  5496
                                                                                                                                  +
                                                                                                                                  5497 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5498
                                                                                                                                  +
                                                                                                                                  5499 // We got some good DATA. If we were sending unsolicited window update ACKs, we can now stop.
                                                                                                                                  +
                                                                                                                                  5500
                                                                                                                                  +
                                                                                                                                  5501 if (!sock->m_rcv_in_rcv_wnd_recovery)
                                                                                                                                  +
                                                                                                                                  5502 {
                                                                                                                                  +
                                                                                                                                  5503 // We weren't.
                                                                                                                                  +
                                                                                                                                  5504 return;
                                                                                                                                  +
                                                                                                                                  5505 }
                                                                                                                                  +
                                                                                                                                  5506 // else
                                                                                                                                  +
                                                                                                                                  5507
                                                                                                                                  +
                                                                                                                                  5508 // This is ~equally as rare as Receive buffer overflows, so this is worth an INFO message.
                                                                                                                                  +
                                                                                                                                  5509 FLOW_LOG_INFO('[' << sock << "]: Canceling rcv_wnd recovery; "
                                                                                                                                  +
                                                                                                                                  5510 "Time since entering recovery "
                                                                                                                                  +
                                                                                                                                  5511 "[" << round<milliseconds>(Fine_clock::now() - sock->m_rcv_wnd_recovery_start_time) << "].");
                                                                                                                                  +
                                                                                                                                  5512
                                                                                                                                  +
                                                                                                                                  5513 sock->m_rcv_in_rcv_wnd_recovery = false;
                                                                                                                                  +
                                                                                                                                  5514#ifndef NDEBUG
                                                                                                                                  +
                                                                                                                                  5515 const bool canceled =
                                                                                                                                  +
                                                                                                                                  5516#endif
                                                                                                                                  +
                                                                                                                                  5517 scheduled_task_cancel(get_logger(), sock->m_rcv_wnd_recovery_scheduled_task);
                                                                                                                                  +
                                                                                                                                  5518 assert(canceled);
                                                                                                                                  +
                                                                                                                                  5519
                                                                                                                                  +
                                                                                                                                  5520 // Record we ended in success.
                                                                                                                                  +
                                                                                                                                  5521 sock->m_rcv_stats.rcv_wnd_recovery_event_finish(true);
                                                                                                                                  +
                                                                                                                                  5522}
                                                                                                                                  5523
                                                                                                                                  -
                                                                                                                                  5524 if (!sock->opt(sock->m_opts.m_st_rcv_flow_control_on))
                                                                                                                                  -
                                                                                                                                  5525 {
                                                                                                                                  -
                                                                                                                                  5526 /* Flow control disabled, so if we always advertise the same huge value, the other side will
                                                                                                                                  -
                                                                                                                                  5527 * never stop sending due to rcv_wnd. On this side, we won't activate rcv_wnd recovery, because
                                                                                                                                  -
                                                                                                                                  5528 * the "last advertised" window will always equal the current window. */
                                                                                                                                  -
                                                                                                                                  5529 return numeric_limits<size_t>::max();
                                                                                                                                  -
                                                                                                                                  5530 }
                                                                                                                                  -
                                                                                                                                  5531 // else
                                                                                                                                  -
                                                                                                                                  5532
                                                                                                                                  -
                                                                                                                                  5533 // Grab available Receive buffer space. We have to momentarily lock sock due to access to sock->m_rcv_buf.
                                                                                                                                  -
                                                                                                                                  5534 size_t rcv_buf_size;
                                                                                                                                  -
                                                                                                                                  5535 {
                                                                                                                                  - -
                                                                                                                                  5537 rcv_buf_size = sock->m_rcv_buf.data_size();
                                                                                                                                  -
                                                                                                                                  5538 }
                                                                                                                                  -
                                                                                                                                  5539
                                                                                                                                  -
                                                                                                                                  5540 // Add the reassembly queue cumulative stored data size. Why? See sock_data_to_reassembly_q_unless_overflow().
                                                                                                                                  -
                                                                                                                                  5541 if (sock->rexmit_on())
                                                                                                                                  -
                                                                                                                                  5542 {
                                                                                                                                  -
                                                                                                                                  5543 rcv_buf_size += sock->m_rcv_reassembly_q_data_size; // (At least one reason we must be in thread W.)
                                                                                                                                  + +
                                                                                                                                  5525{
                                                                                                                                  +
                                                                                                                                  5526 using std::numeric_limits;
                                                                                                                                  +
                                                                                                                                  5527
                                                                                                                                  +
                                                                                                                                  5528 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5529
                                                                                                                                  +
                                                                                                                                  5530 if (!sock->opt(sock->m_opts.m_st_rcv_flow_control_on))
                                                                                                                                  +
                                                                                                                                  5531 {
                                                                                                                                  +
                                                                                                                                  5532 /* Flow control disabled, so if we always advertise the same huge value, the other side will
                                                                                                                                  +
                                                                                                                                  5533 * never stop sending due to rcv_wnd. On this side, we won't activate rcv_wnd recovery, because
                                                                                                                                  +
                                                                                                                                  5534 * the "last advertised" window will always equal the current window. */
                                                                                                                                  +
                                                                                                                                  5535 return numeric_limits<size_t>::max();
                                                                                                                                  +
                                                                                                                                  5536 }
                                                                                                                                  +
                                                                                                                                  5537 // else
                                                                                                                                  +
                                                                                                                                  5538
                                                                                                                                  +
                                                                                                                                  5539 // Grab available Receive buffer space. We have to momentarily lock sock due to access to sock->m_rcv_buf.
                                                                                                                                  +
                                                                                                                                  5540 size_t rcv_buf_size;
                                                                                                                                  +
                                                                                                                                  5541 {
                                                                                                                                  + +
                                                                                                                                  5543 rcv_buf_size = sock->m_rcv_buf.data_size();
                                                                                                                                  5544 }
                                                                                                                                  5545
                                                                                                                                  -
                                                                                                                                  5546 const size_t max_rcv_buf_size = sock->max_block_size_multiple(sock->m_opts.m_st_rcv_buf_max_size);
                                                                                                                                  -
                                                                                                                                  5547
                                                                                                                                  -
                                                                                                                                  5548 return (max_rcv_buf_size > rcv_buf_size) ? (max_rcv_buf_size - rcv_buf_size) : 0;
                                                                                                                                  -
                                                                                                                                  5549}
                                                                                                                                  -
                                                                                                                                  5550
                                                                                                                                  - -
                                                                                                                                  5552{
                                                                                                                                  -
                                                                                                                                  5553 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5554
                                                                                                                                  -
                                                                                                                                  5555 /* As always, no need to lock m_state, etc., unless we plan to alter them, since no other thread can alter them.
                                                                                                                                  -
                                                                                                                                  5556 * ...On the other hand, we are going to be checking m_rcv_buf for emptiness below, and if it's not empty,
                                                                                                                                  -
                                                                                                                                  5557 * a user thread U != W may be altering it right now by consuming it. So, lock.
                                                                                                                                  -
                                                                                                                                  5558 *
                                                                                                                                  -
                                                                                                                                  5559 * Could think about locking later in this function, but this is called so rarely I'd rather not have to
                                                                                                                                  -
                                                                                                                                  5560 * worry about whether it's OK to do that and just not. */
                                                                                                                                  -
                                                                                                                                  5561 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  5562
                                                                                                                                  -
                                                                                                                                  5563 if (sock->m_state == Peer_socket::State::S_CLOSED)
                                                                                                                                  -
                                                                                                                                  5564 {
                                                                                                                                  -
                                                                                                                                  5565 /* When were placed onto thread W, state was S_OPEN+S_DISCONNECTING, but before boost.asio
                                                                                                                                  -
                                                                                                                                  5566 * could execute us, it executed another handler which already moved us to S_CLOSED for
                                                                                                                                  -
                                                                                                                                  5567 * whatever reason (there are many valid ones). So just don't do anything, as we no longer
                                                                                                                                  -
                                                                                                                                  5568 * apply. It's kind of interesting, so log INFO message. */
                                                                                                                                  -
                                                                                                                                  5569 FLOW_LOG_INFO('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  5570 "was completely closed before asynchronous "
                                                                                                                                  -
                                                                                                                                  5571 "receive_emptied_rcv_buf_while_disconnecting() could proceed.");
                                                                                                                                  -
                                                                                                                                  5572 return;
                                                                                                                                  -
                                                                                                                                  5573 }
                                                                                                                                  -
                                                                                                                                  5574 // else
                                                                                                                                  -
                                                                                                                                  5575
                                                                                                                                  -
                                                                                                                                  5576 // Sanity-check (we cannot be called until there's a graceful close underway).
                                                                                                                                  -
                                                                                                                                  5577 assert((sock->m_state == Peer_socket::State::S_OPEN) &&
                                                                                                                                  -
                                                                                                                                  5578 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  -
                                                                                                                                  5579
                                                                                                                                  -
                                                                                                                                  5580 const Socket_id socket_id = Node::socket_id(sock);
                                                                                                                                  +
                                                                                                                                  5546 // Add the reassembly queue cumulative stored data size. Why? See sock_data_to_reassembly_q_unless_overflow().
                                                                                                                                  +
                                                                                                                                  5547 if (sock->rexmit_on())
                                                                                                                                  +
                                                                                                                                  5548 {
                                                                                                                                  +
                                                                                                                                  5549 rcv_buf_size += sock->m_rcv_reassembly_q_data_size; // (At least one reason we must be in thread W.)
                                                                                                                                  +
                                                                                                                                  5550 }
                                                                                                                                  +
                                                                                                                                  5551
                                                                                                                                  +
                                                                                                                                  5552 const size_t max_rcv_buf_size = sock->max_block_size_multiple(sock->m_opts.m_st_rcv_buf_max_size);
                                                                                                                                  +
                                                                                                                                  5553
                                                                                                                                  +
                                                                                                                                  5554 return (max_rcv_buf_size > rcv_buf_size) ? (max_rcv_buf_size - rcv_buf_size) : 0;
                                                                                                                                  +
                                                                                                                                  5555}
                                                                                                                                  +
                                                                                                                                  5556
                                                                                                                                  + +
                                                                                                                                  5558{
                                                                                                                                  +
                                                                                                                                  5559 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5560
                                                                                                                                  +
                                                                                                                                  5561 /* As always, no need to lock m_state, etc., unless we plan to alter them, since no other thread can alter them.
                                                                                                                                  +
                                                                                                                                  5562 * ...On the other hand, we are going to be checking m_rcv_buf for emptiness below, and if it's not empty,
                                                                                                                                  +
                                                                                                                                  5563 * a user thread U != W may be altering it right now by consuming it. So, lock.
                                                                                                                                  +
                                                                                                                                  5564 *
                                                                                                                                  +
                                                                                                                                  5565 * Could think about locking later in this function, but this is called so rarely I'd rather not have to
                                                                                                                                  +
                                                                                                                                  5566 * worry about whether it's OK to do that and just not. */
                                                                                                                                  +
                                                                                                                                  5567 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  5568
                                                                                                                                  +
                                                                                                                                  5569 if (sock->m_state == Peer_socket::State::S_CLOSED)
                                                                                                                                  +
                                                                                                                                  5570 {
                                                                                                                                  +
                                                                                                                                  5571 /* When were placed onto thread W, state was S_OPEN+S_DISCONNECTING, but before boost.asio
                                                                                                                                  +
                                                                                                                                  5572 * could execute us, it executed another handler which already moved us to S_CLOSED for
                                                                                                                                  +
                                                                                                                                  5573 * whatever reason (there are many valid ones). So just don't do anything, as we no longer
                                                                                                                                  +
                                                                                                                                  5574 * apply. It's kind of interesting, so log INFO message. */
                                                                                                                                  +
                                                                                                                                  5575 FLOW_LOG_INFO('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  5576 "was completely closed before asynchronous "
                                                                                                                                  +
                                                                                                                                  5577 "receive_emptied_rcv_buf_while_disconnecting() could proceed.");
                                                                                                                                  +
                                                                                                                                  5578 return;
                                                                                                                                  +
                                                                                                                                  5579 }
                                                                                                                                  +
                                                                                                                                  5580 // else
                                                                                                                                  5581
                                                                                                                                  -
                                                                                                                                  5582 if (sock->m_int_state != Peer_socket::Int_state::S_CLOSED)
                                                                                                                                  -
                                                                                                                                  5583 {
                                                                                                                                  -
                                                                                                                                  5584 /* Yes, they emptied Receive buffer. However, we haven't finished the graceful close.
                                                                                                                                  -
                                                                                                                                  5585 * Therefore -- even though one more barrier to reaching m_state == S_CLOSED has been removed --
                                                                                                                                  -
                                                                                                                                  5586 * there's nothing further to do at this time. In fact, in certain situations we might even
                                                                                                                                  -
                                                                                                                                  5587 * get more data onto the Receive buffer! @todo No graceful close yet. */
                                                                                                                                  -
                                                                                                                                  5588 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  5589 "is gracefully closing, and Receive buffer is empty, but graceful close itself not yet finished.");
                                                                                                                                  -
                                                                                                                                  5590 return;
                                                                                                                                  -
                                                                                                                                  5591 }
                                                                                                                                  -
                                                                                                                                  5592 // else if (m_int_state == S_CLOSED)
                                                                                                                                  -
                                                                                                                                  5593
                                                                                                                                  -
                                                                                                                                  5594 // Ensure Receive buffer is indeed still empty. (Can still get data while gracefully closing.)
                                                                                                                                  -
                                                                                                                                  5595 if (!sock->m_rcv_buf.empty())
                                                                                                                                  -
                                                                                                                                  5596 {
                                                                                                                                  -
                                                                                                                                  5597 /* Some data arrived between the time we were placed on thread W and boost.asio executing us.
                                                                                                                                  -
                                                                                                                                  5598 * So we can't do anything; user has to receive() the stuff first, which should call us again. */
                                                                                                                                  -
                                                                                                                                  5599 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  5600 "is gracefully closing, but Receive buffer has data again.");
                                                                                                                                  -
                                                                                                                                  5601 return;
                                                                                                                                  -
                                                                                                                                  5602 }
                                                                                                                                  -
                                                                                                                                  5603 // else if (m_int_state == S_CLOSED, and m_rcv_buf is empty)
                                                                                                                                  -
                                                                                                                                  5604
                                                                                                                                  -
                                                                                                                                  5605 // Yes, the transport layer final handshake is finished. Since Receive buffer now empty, no more barriers remain.
                                                                                                                                  -
                                                                                                                                  5606 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  -
                                                                                                                                  5607 "is gracefully closing, and Receive buffer is now empty. Ready to permanently close.");
                                                                                                                                  - -
                                                                                                                                  5609 Error_code(), /* err_code == success indicates clean close here. */
                                                                                                                                  -
                                                                                                                                  5610 false);
                                                                                                                                  -
                                                                                                                                  5611 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  -
                                                                                                                                  5612 * send_worker_check_state(). */
                                                                                                                                  -
                                                                                                                                  5613} // Node::receive_emptied_rcv_buf_while_disconnecting()
                                                                                                                                  -
                                                                                                                                  5614
                                                                                                                                  - -
                                                                                                                                  5616{
                                                                                                                                  -
                                                                                                                                  5617 using boost::adopt_lock;
                                                                                                                                  - - +
                                                                                                                                  5582 // Sanity-check (we cannot be called until there's a graceful close underway).
                                                                                                                                  +
                                                                                                                                  5583 assert((sock->m_state == Peer_socket::State::S_OPEN) &&
                                                                                                                                  +
                                                                                                                                  5584 (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  +
                                                                                                                                  5585
                                                                                                                                  +
                                                                                                                                  5586 const Socket_id socket_id = Node::socket_id(sock);
                                                                                                                                  +
                                                                                                                                  5587
                                                                                                                                  +
                                                                                                                                  5588 if (sock->m_int_state != Peer_socket::Int_state::S_CLOSED)
                                                                                                                                  +
                                                                                                                                  5589 {
                                                                                                                                  +
                                                                                                                                  5590 /* Yes, they emptied Receive buffer. However, we haven't finished the graceful close.
                                                                                                                                  +
                                                                                                                                  5591 * Therefore -- even though one more barrier to reaching m_state == S_CLOSED has been removed --
                                                                                                                                  +
                                                                                                                                  5592 * there's nothing further to do at this time. In fact, in certain situations we might even
                                                                                                                                  +
                                                                                                                                  5593 * get more data onto the Receive buffer! @todo No graceful close yet. */
                                                                                                                                  +
                                                                                                                                  5594 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  5595 "is gracefully closing, and Receive buffer is empty, but graceful close itself not yet finished.");
                                                                                                                                  +
                                                                                                                                  5596 return;
                                                                                                                                  +
                                                                                                                                  5597 }
                                                                                                                                  +
                                                                                                                                  5598 // else if (m_int_state == S_CLOSED)
                                                                                                                                  +
                                                                                                                                  5599
                                                                                                                                  +
                                                                                                                                  5600 // Ensure Receive buffer is indeed still empty. (Can still get data while gracefully closing.)
                                                                                                                                  +
                                                                                                                                  5601 if (!sock->m_rcv_buf.empty())
                                                                                                                                  +
                                                                                                                                  5602 {
                                                                                                                                  +
                                                                                                                                  5603 /* Some data arrived between the time we were placed on thread W and boost.asio executing us.
                                                                                                                                  +
                                                                                                                                  5604 * So we can't do anything; user has to receive() the stuff first, which should call us again. */
                                                                                                                                  +
                                                                                                                                  5605 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  5606 "is gracefully closing, but Receive buffer has data again.");
                                                                                                                                  +
                                                                                                                                  5607 return;
                                                                                                                                  +
                                                                                                                                  5608 }
                                                                                                                                  +
                                                                                                                                  5609 // else if (m_int_state == S_CLOSED, and m_rcv_buf is empty)
                                                                                                                                  +
                                                                                                                                  5610
                                                                                                                                  +
                                                                                                                                  5611 // Yes, the transport layer final handshake is finished. Since Receive buffer now empty, no more barriers remain.
                                                                                                                                  +
                                                                                                                                  5612 FLOW_LOG_TRACE('[' << sock << "] "
                                                                                                                                  +
                                                                                                                                  5613 "is gracefully closing, and Receive buffer is now empty. Ready to permanently close.");
                                                                                                                                  + +
                                                                                                                                  5615 Error_code(), /* err_code == success indicates clean close here. */
                                                                                                                                  +
                                                                                                                                  5616 false);
                                                                                                                                  +
                                                                                                                                  5617 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  +
                                                                                                                                  5618 * send_worker_check_state(). */
                                                                                                                                  +
                                                                                                                                  5619} // Node::receive_emptied_rcv_buf_while_disconnecting()
                                                                                                                                  5620
                                                                                                                                  -
                                                                                                                                  5621 /* We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  5622 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  -
                                                                                                                                  5623 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  -
                                                                                                                                  5624
                                                                                                                                  -
                                                                                                                                  5625 {
                                                                                                                                  -
                                                                                                                                  5626 /* WARNING!!! sock->m_mutex is locked, but WE must unlock it before returning! Can't leave that
                                                                                                                                  -
                                                                                                                                  5627 * to the caller, because we must unlock at a specific point below, right before post()ing
                                                                                                                                  -
                                                                                                                                  5628 * close_abruptly_worker() onto thread W. Use a Lock_guard that adopts an
                                                                                                                                  -
                                                                                                                                  5629 * already-locked mutex. */
                                                                                                                                  -
                                                                                                                                  5630 Peer_socket::Lock_guard lock(sock->m_mutex, adopt_lock);
                                                                                                                                  -
                                                                                                                                  5631
                                                                                                                                  -
                                                                                                                                  5632 if (!running())
                                                                                                                                  -
                                                                                                                                  5633 {
                                                                                                                                  - -
                                                                                                                                  5635 return;
                                                                                                                                  -
                                                                                                                                  5636 }
                                                                                                                                  -
                                                                                                                                  5637 // else
                                                                                                                                  -
                                                                                                                                  5638
                                                                                                                                  -
                                                                                                                                  5639 // Pre-condition.
                                                                                                                                  -
                                                                                                                                  5640 assert(sock->m_state == Peer_socket::State::S_OPEN);
                                                                                                                                  -
                                                                                                                                  5641
                                                                                                                                  -
                                                                                                                                  5642 /* Put the rest of the work into thread W. For justification, see big comment in listen().
                                                                                                                                  -
                                                                                                                                  5643 * Addendum regarding performance: close_abruptly() is probably called more frequently than
                                                                                                                                  -
                                                                                                                                  5644 * listen(), but I doubt the performance impact is serious even so. send() and receive() might be
                                                                                                                                  -
                                                                                                                                  5645 * a different story. */
                                                                                                                                  -
                                                                                                                                  5646
                                                                                                                                  -
                                                                                                                                  5647 // We're done -- must unlock so that thread W can do what it wants to with sock.
                                                                                                                                  -
                                                                                                                                  5648 } // lock
                                                                                                                                  -
                                                                                                                                  5649
                                                                                                                                  -
                                                                                                                                  5650 // Load this onto thread W boost.asio work queue. We don't return until it runs, so [&].
                                                                                                                                  -
                                                                                                                                  5651 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION, [&]()
                                                                                                                                  -
                                                                                                                                  5652 {
                                                                                                                                  -
                                                                                                                                  5653 // We are in thread W. Thread U is waiting for us to do our stuff and return.
                                                                                                                                  -
                                                                                                                                  5654
                                                                                                                                  -
                                                                                                                                  5655 /* Since we were placed onto thread W, another handler may have been executed before boost.asio
                                                                                                                                  -
                                                                                                                                  5656 * got to us. Therefore we may already be S_CLOSED. Detect this. */
                                                                                                                                  -
                                                                                                                                  5657
                                                                                                                                  -
                                                                                                                                  5658 if (sock->m_state == Peer_socket::State::S_CLOSED) // No need to lock: only W can write to this.
                                                                                                                                  -
                                                                                                                                  5659 {
                                                                                                                                  -
                                                                                                                                  5660 // Yep, already closed. sock->m_disconnect_cause is already set to closure reason. Done.
                                                                                                                                  -
                                                                                                                                  5661 *err_code = sock->m_disconnect_cause;
                                                                                                                                  -
                                                                                                                                  5662 return;
                                                                                                                                  -
                                                                                                                                  5663 }
                                                                                                                                  -
                                                                                                                                  5664 // else
                                                                                                                                  -
                                                                                                                                  5665
                                                                                                                                  -
                                                                                                                                  5666 /* Cool, we're not quite closed yet. We could be connecting... or connected... or even in the
                                                                                                                                  -
                                                                                                                                  5667 * middle of graceful close (@todo that's not yet implemented). Any of those situations allow
                                                                                                                                  -
                                                                                                                                  5668 * close_abruptly(), just as (indeed because of the fact that) any of those situations allow
                                                                                                                                  -
                                                                                                                                  5669 * close_connection_immediately() (..., error::...).
                                                                                                                                  -
                                                                                                                                  5670 *
                                                                                                                                  -
                                                                                                                                  5671 * Therefore simply do the following. Pre-conditions hold: sock is in m_socks and is S_OPEN
                                                                                                                                  -
                                                                                                                                  5672 * (because not S_CLOSED); 3rd arg contains failure reason. */
                                                                                                                                  - -
                                                                                                                                  5674 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  -
                                                                                                                                  5675 * send_worker_check_state(). */
                                                                                                                                  -
                                                                                                                                  5676
                                                                                                                                  -
                                                                                                                                  5677 // That set sock->m_disconnect_cause. Closure successful. Done.
                                                                                                                                  -
                                                                                                                                  5678 err_code->clear(); // Success.
                                                                                                                                  -
                                                                                                                                  5679 }); // asio_exec_ctx_post()
                                                                                                                                  -
                                                                                                                                  5680 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  -
                                                                                                                                  5681} // Node::close_abruptly()
                                                                                                                                  + +
                                                                                                                                  5622{
                                                                                                                                  +
                                                                                                                                  5623 using boost::adopt_lock;
                                                                                                                                  + + +
                                                                                                                                  5626
                                                                                                                                  +
                                                                                                                                  5627 /* We are in user thread U != W.
                                                                                                                                  +
                                                                                                                                  5628 * It's important to keep that in mind in this method. In particular, it is absolutely unsafe to
                                                                                                                                  +
                                                                                                                                  5629 * access m_int_state, which belongs solely to thread W and is never locked. */
                                                                                                                                  +
                                                                                                                                  5630
                                                                                                                                  +
                                                                                                                                  5631 {
                                                                                                                                  +
                                                                                                                                  5632 /* WARNING!!! sock->m_mutex is locked, but WE must unlock it before returning! Can't leave that
                                                                                                                                  +
                                                                                                                                  5633 * to the caller, because we must unlock at a specific point below, right before post()ing
                                                                                                                                  +
                                                                                                                                  5634 * close_abruptly_worker() onto thread W. Use a Lock_guard that adopts an
                                                                                                                                  +
                                                                                                                                  5635 * already-locked mutex. */
                                                                                                                                  +
                                                                                                                                  5636 Peer_socket::Lock_guard lock(sock->m_mutex, adopt_lock);
                                                                                                                                  +
                                                                                                                                  5637
                                                                                                                                  +
                                                                                                                                  5638 if (!running())
                                                                                                                                  +
                                                                                                                                  5639 {
                                                                                                                                  + +
                                                                                                                                  5641 return;
                                                                                                                                  +
                                                                                                                                  5642 }
                                                                                                                                  +
                                                                                                                                  5643 // else
                                                                                                                                  +
                                                                                                                                  5644
                                                                                                                                  +
                                                                                                                                  5645 // Pre-condition.
                                                                                                                                  +
                                                                                                                                  5646 assert(sock->m_state == Peer_socket::State::S_OPEN);
                                                                                                                                  +
                                                                                                                                  5647
                                                                                                                                  +
                                                                                                                                  5648 /* Put the rest of the work into thread W. For justification, see big comment in listen().
                                                                                                                                  +
                                                                                                                                  5649 * Addendum regarding performance: close_abruptly() is probably called more frequently than
                                                                                                                                  +
                                                                                                                                  5650 * listen(), but I doubt the performance impact is serious even so. send() and receive() might be
                                                                                                                                  +
                                                                                                                                  5651 * a different story. */
                                                                                                                                  +
                                                                                                                                  5652
                                                                                                                                  +
                                                                                                                                  5653 // We're done -- must unlock so that thread W can do what it wants to with sock.
                                                                                                                                  +
                                                                                                                                  5654 } // lock
                                                                                                                                  +
                                                                                                                                  5655
                                                                                                                                  +
                                                                                                                                  5656 // Load this onto thread W boost.asio work queue. We don't return until it runs, so [&].
                                                                                                                                  +
                                                                                                                                  5657 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION, [&]()
                                                                                                                                  +
                                                                                                                                  5658 {
                                                                                                                                  +
                                                                                                                                  5659 // We are in thread W. Thread U is waiting for us to do our stuff and return.
                                                                                                                                  +
                                                                                                                                  5660
                                                                                                                                  +
                                                                                                                                  5661 /* Since we were placed onto thread W, another handler may have been executed before boost.asio
                                                                                                                                  +
                                                                                                                                  5662 * got to us. Therefore we may already be S_CLOSED. Detect this. */
                                                                                                                                  +
                                                                                                                                  5663
                                                                                                                                  +
                                                                                                                                  5664 if (sock->m_state == Peer_socket::State::S_CLOSED) // No need to lock: only W can write to this.
                                                                                                                                  +
                                                                                                                                  5665 {
                                                                                                                                  +
                                                                                                                                  5666 // Yep, already closed. sock->m_disconnect_cause is already set to closure reason. Done.
                                                                                                                                  +
                                                                                                                                  5667 *err_code = sock->m_disconnect_cause;
                                                                                                                                  +
                                                                                                                                  5668 return;
                                                                                                                                  +
                                                                                                                                  5669 }
                                                                                                                                  +
                                                                                                                                  5670 // else
                                                                                                                                  +
                                                                                                                                  5671
                                                                                                                                  +
                                                                                                                                  5672 /* Cool, we're not quite closed yet. We could be connecting... or connected... or even in the
                                                                                                                                  +
                                                                                                                                  5673 * middle of graceful close (@todo that's not yet implemented). Any of those situations allow
                                                                                                                                  +
                                                                                                                                  5674 * close_abruptly(), just as (indeed because of the fact that) any of those situations allow
                                                                                                                                  +
                                                                                                                                  5675 * close_connection_immediately() (..., error::...).
                                                                                                                                  +
                                                                                                                                  5676 *
                                                                                                                                  +
                                                                                                                                  5677 * Therefore simply do the following. Pre-conditions hold: sock is in m_socks and is S_OPEN
                                                                                                                                  +
                                                                                                                                  5678 * (because not S_CLOSED); 3rd arg contains failure reason. */
                                                                                                                                  + +
                                                                                                                                  5680 /* ^-- defer_delta_check == false: for similar reason as when calling send_worker() from
                                                                                                                                  +
                                                                                                                                  5681 * send_worker_check_state(). */
                                                                                                                                  5682
                                                                                                                                  - -
                                                                                                                                  5684 const Error_code& err_code, bool defer_delta_check)
                                                                                                                                  -
                                                                                                                                  5685{
                                                                                                                                  -
                                                                                                                                  5686 using boost::lexical_cast;
                                                                                                                                  -
                                                                                                                                  5687 using std::string;
                                                                                                                                  +
                                                                                                                                  5683 // That set sock->m_disconnect_cause. Closure successful. Done.
                                                                                                                                  +
                                                                                                                                  5684 err_code->clear(); // Success.
                                                                                                                                  +
                                                                                                                                  5685 }); // asio_exec_ctx_post()
                                                                                                                                  +
                                                                                                                                  5686 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  +
                                                                                                                                  5687} // Node::close_abruptly()
                                                                                                                                  5688
                                                                                                                                  -
                                                                                                                                  5689 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5690
                                                                                                                                  -
                                                                                                                                  5691 // @todo OK if a graceful close (S_OPEN+S_DISCONNECTING) is already in progress? Below provides for it, but ensure.
                                                                                                                                  -
                                                                                                                                  5692 assert(sock->m_state == Peer_socket::State::S_OPEN);
                                                                                                                                  -
                                                                                                                                  5693
                                                                                                                                  -
                                                                                                                                  5694 if (err_code)
                                                                                                                                  -
                                                                                                                                  5695 {
                                                                                                                                  -
                                                                                                                                  5696 FLOW_ERROR_LOG_ERROR(err_code);
                                                                                                                                  -
                                                                                                                                  5697 FLOW_LOG_INFO("Closing and destroying [" << sock << "] abruptly.");
                                                                                                                                  -
                                                                                                                                  5698 }
                                                                                                                                  -
                                                                                                                                  5699 else
                                                                                                                                  -
                                                                                                                                  5700 {
                                                                                                                                  -
                                                                                                                                  5701 // m_disconnect_cause has already been set and logged.
                                                                                                                                  -
                                                                                                                                  5702 FLOW_LOG_INFO("Closing and destroying [" << sock << "] after graceful close.");
                                                                                                                                  -
                                                                                                                                  5703 }
                                                                                                                                  -
                                                                                                                                  5704 // Log final state report.
                                                                                                                                  -
                                                                                                                                  5705 sock_log_detail(sock);
                                                                                                                                  -
                                                                                                                                  5706
                                                                                                                                  -
                                                                                                                                  5707 /* Thread safety: we're in thread W, so no need to lock things by default (as most resources can
                                                                                                                                  -
                                                                                                                                  5708 * also only be accessed from thread W). Exceptions are certain data members in Peer_socket
                                                                                                                                  -
                                                                                                                                  5709 * sock and Server_socket serv that may have originated it (if it was a passive open). I will
                                                                                                                                  -
                                                                                                                                  5710 * comment on the locking situation for those data members as they come up in the code. */
                                                                                                                                  -
                                                                                                                                  5711
                                                                                                                                  -
                                                                                                                                  5712 // First, set various state in *sock (including emptying Send and Receive buffers and setting m_node = 0).
                                                                                                                                  -
                                                                                                                                  5713
                                                                                                                                  -
                                                                                                                                  5714 /* Save the final set of stats for Peer_socket::info(), as the source data will probably get
                                                                                                                                  -
                                                                                                                                  5715 * purged just below in sock_disconnect_*(). */
                                                                                                                                  -
                                                                                                                                  5716 sock_load_info_struct(sock, &sock->m_info_on_close);
                                                                                                                                  -
                                                                                                                                  5717 // We may have to massage it a little more, because some info is set below, by when it's too late.
                                                                                                                                  -
                                                                                                                                  5718
                                                                                                                                  -
                                                                                                                                  5719 if (err_code)
                                                                                                                                  -
                                                                                                                                  5720 {
                                                                                                                                  -
                                                                                                                                  5721 // sock->m_disconnect_cause has not yet been set; so sock_load_info_struct() did not copy it properly yet. Do so.
                                                                                                                                  -
                                                                                                                                  5722 sock->m_info_on_close.m_disconnect_cause = err_code;
                                                                                                                                  -
                                                                                                                                  5723 // Similarly:
                                                                                                                                  -
                                                                                                                                  5724 sock->m_info_on_close.m_int_state_str = lexical_cast<string>(Peer_socket::Int_state::S_CLOSED);
                                                                                                                                  -
                                                                                                                                  5725
                                                                                                                                  -
                                                                                                                                  5726 /* This is an abrupt close. This can be called in any situation once sock is in m_socks. It's
                                                                                                                                  -
                                                                                                                                  5727 * our responsibility to move directly to transport layer state S_CLOSED and user state
                                                                                                                                  -
                                                                                                                                  5728 * S_CLOSED. */
                                                                                                                                  -
                                                                                                                                  5729 sock_set_int_state(sock, Peer_socket::Int_state::S_CLOSED); // Thread W access only; no need to lock.
                                                                                                                                  -
                                                                                                                                  5730 // Sets S_CLOSED public state (and related data, including m_disconnect_cause). Locked inside.
                                                                                                                                  -
                                                                                                                                  5731 sock_disconnect_detected(sock, err_code, true);
                                                                                                                                  -
                                                                                                                                  5732 }
                                                                                                                                  -
                                                                                                                                  5733 else
                                                                                                                                  -
                                                                                                                                  5734 {
                                                                                                                                  -
                                                                                                                                  5735 /* We are in a graceful close and have reached the final stage of it (connection entirely
                                                                                                                                  -
                                                                                                                                  5736 * closed without having to abruptly close; buffers emptied gracefully by user and/or Node).
                                                                                                                                  -
                                                                                                                                  5737 * Therefore m_int_state is already S_CLOSED (method pre-condition), so
                                                                                                                                  -
                                                                                                                                  5738 * we just complete the user-visible state change. */
                                                                                                                                  -
                                                                                                                                  5739
                                                                                                                                  -
                                                                                                                                  5740 assert(sock->m_int_state == Peer_socket::Int_state::S_CLOSED); // Thread W access only; no need to lock.
                                                                                                                                  -
                                                                                                                                  5741 sock_disconnect_completed(sock); // Sets S_CLOSED public state (and related data). Locked inside.
                                                                                                                                  -
                                                                                                                                  5742 }
                                                                                                                                  -
                                                                                                                                  5743
                                                                                                                                  -
                                                                                                                                  5744 // Next, remove sock from our main socket list.
                                                                                                                                  + +
                                                                                                                                  5690 const Error_code& err_code, bool defer_delta_check)
                                                                                                                                  +
                                                                                                                                  5691{
                                                                                                                                  +
                                                                                                                                  5692 using boost::lexical_cast;
                                                                                                                                  +
                                                                                                                                  5693 using std::string;
                                                                                                                                  +
                                                                                                                                  5694
                                                                                                                                  +
                                                                                                                                  5695 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5696
                                                                                                                                  +
                                                                                                                                  5697 // @todo OK if a graceful close (S_OPEN+S_DISCONNECTING) is already in progress? Below provides for it, but ensure.
                                                                                                                                  +
                                                                                                                                  5698 assert(sock->m_state == Peer_socket::State::S_OPEN);
                                                                                                                                  +
                                                                                                                                  5699
                                                                                                                                  +
                                                                                                                                  5700 if (err_code)
                                                                                                                                  +
                                                                                                                                  5701 {
                                                                                                                                  +
                                                                                                                                  5702 FLOW_ERROR_LOG_ERROR(err_code);
                                                                                                                                  +
                                                                                                                                  5703 FLOW_LOG_INFO("Closing and destroying [" << sock << "] abruptly.");
                                                                                                                                  +
                                                                                                                                  5704 }
                                                                                                                                  +
                                                                                                                                  5705 else
                                                                                                                                  +
                                                                                                                                  5706 {
                                                                                                                                  +
                                                                                                                                  5707 // m_disconnect_cause has already been set and logged.
                                                                                                                                  +
                                                                                                                                  5708 FLOW_LOG_INFO("Closing and destroying [" << sock << "] after graceful close.");
                                                                                                                                  +
                                                                                                                                  5709 }
                                                                                                                                  +
                                                                                                                                  5710 // Log final state report.
                                                                                                                                  +
                                                                                                                                  5711 sock_log_detail(sock);
                                                                                                                                  +
                                                                                                                                  5712
                                                                                                                                  +
                                                                                                                                  5713 /* Thread safety: we're in thread W, so no need to lock things by default (as most resources can
                                                                                                                                  +
                                                                                                                                  5714 * also only be accessed from thread W). Exceptions are certain data members in Peer_socket
                                                                                                                                  +
                                                                                                                                  5715 * sock and Server_socket serv that may have originated it (if it was a passive open). I will
                                                                                                                                  +
                                                                                                                                  5716 * comment on the locking situation for those data members as they come up in the code. */
                                                                                                                                  +
                                                                                                                                  5717
                                                                                                                                  +
                                                                                                                                  5718 // First, set various state in *sock (including emptying Send and Receive buffers and setting m_node = 0).
                                                                                                                                  +
                                                                                                                                  5719
                                                                                                                                  +
                                                                                                                                  5720 /* Save the final set of stats for Peer_socket::info(), as the source data will probably get
                                                                                                                                  +
                                                                                                                                  5721 * purged just below in sock_disconnect_*(). */
                                                                                                                                  +
                                                                                                                                  5722 sock_load_info_struct(sock, &sock->m_info_on_close);
                                                                                                                                  +
                                                                                                                                  5723 // We may have to massage it a little more, because some info is set below, by when it's too late.
                                                                                                                                  +
                                                                                                                                  5724
                                                                                                                                  +
                                                                                                                                  5725 if (err_code)
                                                                                                                                  +
                                                                                                                                  5726 {
                                                                                                                                  +
                                                                                                                                  5727 // sock->m_disconnect_cause has not yet been set; so sock_load_info_struct() did not copy it properly yet. Do so.
                                                                                                                                  +
                                                                                                                                  5728 sock->m_info_on_close.m_disconnect_cause = err_code;
                                                                                                                                  +
                                                                                                                                  5729 // Similarly:
                                                                                                                                  +
                                                                                                                                  5730 sock->m_info_on_close.m_int_state_str = lexical_cast<string>(Peer_socket::Int_state::S_CLOSED);
                                                                                                                                  +
                                                                                                                                  5731
                                                                                                                                  +
                                                                                                                                  5732 /* This is an abrupt close. This can be called in any situation once sock is in m_socks. It's
                                                                                                                                  +
                                                                                                                                  5733 * our responsibility to move directly to transport layer state S_CLOSED and user state
                                                                                                                                  +
                                                                                                                                  5734 * S_CLOSED. */
                                                                                                                                  +
                                                                                                                                  5735 sock_set_int_state(sock, Peer_socket::Int_state::S_CLOSED); // Thread W access only; no need to lock.
                                                                                                                                  +
                                                                                                                                  5736 // Sets S_CLOSED public state (and related data, including m_disconnect_cause). Locked inside.
                                                                                                                                  +
                                                                                                                                  5737 sock_disconnect_detected(sock, err_code, true);
                                                                                                                                  +
                                                                                                                                  5738 }
                                                                                                                                  +
                                                                                                                                  5739 else
                                                                                                                                  +
                                                                                                                                  5740 {
                                                                                                                                  +
                                                                                                                                  5741 /* We are in a graceful close and have reached the final stage of it (connection entirely
                                                                                                                                  +
                                                                                                                                  5742 * closed without having to abruptly close; buffers emptied gracefully by user and/or Node).
                                                                                                                                  +
                                                                                                                                  5743 * Therefore m_int_state is already S_CLOSED (method pre-condition), so
                                                                                                                                  +
                                                                                                                                  5744 * we just complete the user-visible state change. */
                                                                                                                                  5745
                                                                                                                                  -
                                                                                                                                  5746#ifndef NDEBUG
                                                                                                                                  -
                                                                                                                                  5747 const auto erased = 1 ==
                                                                                                                                  -
                                                                                                                                  5748#endif
                                                                                                                                  -
                                                                                                                                  5749 m_socks.erase(socket_id);
                                                                                                                                  -
                                                                                                                                  5750 assert(erased); // S_OPEN => it's in m_socks. Otherwise there's a serious bug somewhere.
                                                                                                                                  +
                                                                                                                                  5746 assert(sock->m_int_state == Peer_socket::Int_state::S_CLOSED); // Thread W access only; no need to lock.
                                                                                                                                  +
                                                                                                                                  5747 sock_disconnect_completed(sock); // Sets S_CLOSED public state (and related data). Locked inside.
                                                                                                                                  +
                                                                                                                                  5748 }
                                                                                                                                  +
                                                                                                                                  5749
                                                                                                                                  +
                                                                                                                                  5750 // Next, remove sock from our main socket list.
                                                                                                                                  5751
                                                                                                                                  -
                                                                                                                                  5752 // Next, if this potentially is an unaccepted connection, delete it from the corresponding server socket.
                                                                                                                                  -
                                                                                                                                  5753 if (!sock->m_active_connect)
                                                                                                                                  -
                                                                                                                                  5754 {
                                                                                                                                  -
                                                                                                                                  5755 /* What is that Server_socket though? Well, it's in sock->m_originating_serv... but that data
                                                                                                                                  -
                                                                                                                                  5756 * member can be accessed from a non-W thread, so we'd have to lock it. But the mutex that
                                                                                                                                  -
                                                                                                                                  5757 * protects it in in *m_originating_serv itself! So it's a chicked/egg problem. However, we
                                                                                                                                  -
                                                                                                                                  5758 * can find that Server_socket (if it applies to sock) another way: through the port. Its port
                                                                                                                                  -
                                                                                                                                  5759 * must be the same as local_port. If such a Server_socket exists, cool; and if sock is
                                                                                                                                  -
                                                                                                                                  5760 * tracked inside it, cool. Otherwise we needn't do anything. */
                                                                                                                                  -
                                                                                                                                  5761 Port_to_server_map::const_iterator port_to_server_it = m_servs.find(sock->m_local_port);
                                                                                                                                  -
                                                                                                                                  5762 if (port_to_server_it != m_servs.end()) // Server at same port number exists. Not necessarily our guy though.
                                                                                                                                  -
                                                                                                                                  5763 {
                                                                                                                                  -
                                                                                                                                  5764 // If it is our guy, delete us from him.
                                                                                                                                  -
                                                                                                                                  5765 Server_socket::Ptr serv = port_to_server_it->second;
                                                                                                                                  -
                                                                                                                                  5766 serv_peer_socket_closed(serv, sock); // Thread-safe (in particular with respect to simultaneous serv->accept()).
                                                                                                                                  -
                                                                                                                                  5767 }
                                                                                                                                  -
                                                                                                                                  5768 }
                                                                                                                                  -
                                                                                                                                  5769
                                                                                                                                  -
                                                                                                                                  5770 // sock now should not be (directly or indirectly) referenced in any Node data structures.
                                                                                                                                  -
                                                                                                                                  5771
                                                                                                                                  -
                                                                                                                                  5772 // Cancel any timers.
                                                                                                                                  -
                                                                                                                                  5773 cancel_timers(sock);
                                                                                                                                  -
                                                                                                                                  5774
                                                                                                                                  -
                                                                                                                                  5775 /* Return the port -- but only if it is an active open. If it's a passive open the port is
                                                                                                                                  -
                                                                                                                                  5776 * still reserved for the server socket. */
                                                                                                                                  -
                                                                                                                                  5777 if (sock->m_active_connect)
                                                                                                                                  -
                                                                                                                                  5778 {
                                                                                                                                  -
                                                                                                                                  5779 Error_code return_err_code;
                                                                                                                                  -
                                                                                                                                  5780 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  -
                                                                                                                                  5781 assert(!return_err_code);
                                                                                                                                  -
                                                                                                                                  5782 }
                                                                                                                                  -
                                                                                                                                  5783
                                                                                                                                  -
                                                                                                                                  5784 /* sock has changed to CLOSED state. Performing sock->receive() or sock->write() would therefore
                                                                                                                                  -
                                                                                                                                  5785 * certainly return an error. Returning an error from those methods (as opposed to 0 but no
                                                                                                                                  -
                                                                                                                                  5786 * error) is considered Readable and Writable, respectively (as we want to alert the user to the
                                                                                                                                  -
                                                                                                                                  5787 * error, so her wait [if any] wakes up and notices the error). Therefore we should soon inform
                                                                                                                                  -
                                                                                                                                  5788 * anyone waiting on any Event_sets for sock to become Readable or Writable.
                                                                                                                                  -
                                                                                                                                  5789 *
                                                                                                                                  -
                                                                                                                                  5790 * Caveat: Similar to that in Node::handle_syn_ack_ack_to_syn_rcvd() at similar point in the
                                                                                                                                  -
                                                                                                                                  5791 * code. */
                                                                                                                                  -
                                                                                                                                  5792
                                                                                                                                  -
                                                                                                                                  5793 // Accumulate the event into the Node store (note: not any Event_set yet).
                                                                                                                                  -
                                                                                                                                  5794 const bool inserted_rd = m_sock_events[Event_set::Event_type::S_PEER_SOCKET_READABLE].insert(sock).second;
                                                                                                                                  -
                                                                                                                                  5795 const bool inserted_wr = m_sock_events[Event_set::Event_type::S_PEER_SOCKET_WRITABLE].insert(sock).second;
                                                                                                                                  -
                                                                                                                                  5796 if (inserted_rd || inserted_wr) // Must always perform both insert()s, hence the use of the 2 variables.
                                                                                                                                  -
                                                                                                                                  5797 {
                                                                                                                                  -
                                                                                                                                  5798 // Possibly inform the user for any applicable Event_sets right now.
                                                                                                                                  -
                                                                                                                                  5799 event_set_all_check_delta(defer_delta_check);
                                                                                                                                  -
                                                                                                                                  5800 }
                                                                                                                                  -
                                                                                                                                  5801} // Node::close_connection_immediately()
                                                                                                                                  -
                                                                                                                                  5802
                                                                                                                                  - -
                                                                                                                                  5804 const Error_code& err_code, bool defer_delta_check)
                                                                                                                                  -
                                                                                                                                  5805{
                                                                                                                                  -
                                                                                                                                  5806 // We are in thread W.
                                                                                                                                  - -
                                                                                                                                  5808 close_connection_immediately(socket_id, sock, err_code, defer_delta_check);
                                                                                                                                  -
                                                                                                                                  5809}
                                                                                                                                  -
                                                                                                                                  5810
                                                                                                                                  - -
                                                                                                                                  5812{
                                                                                                                                  -
                                                                                                                                  5813 using util::Blob;
                                                                                                                                  -
                                                                                                                                  5814
                                                                                                                                  -
                                                                                                                                  5815 auto syn = Low_lvl_packet::create_uninit_packet<Syn_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5816 // Initial Sequence Number.
                                                                                                                                  -
                                                                                                                                  5817 syn->m_init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  -
                                                                                                                                  5818 /* Send serialized version of arbitrary user data, which user can deserialize on the other side
                                                                                                                                  -
                                                                                                                                  5819 * after accepting connection.
                                                                                                                                  -
                                                                                                                                  5820 * Add const to express we require a copy, not move. */
                                                                                                                                  -
                                                                                                                                  5821 syn->m_serialized_metadata = static_cast<const Blob&>(sock->m_serialized_metadata);
                                                                                                                                  -
                                                                                                                                  5822
                                                                                                                                  -
                                                                                                                                  5823 return syn;
                                                                                                                                  -
                                                                                                                                  5824}
                                                                                                                                  -
                                                                                                                                  5825
                                                                                                                                  - -
                                                                                                                                  5827{
                                                                                                                                  -
                                                                                                                                  5828 auto syn_ack = Low_lvl_packet::create_uninit_packet<Syn_ack_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5829 // Initial Sequence Number (the start of our own series).
                                                                                                                                  -
                                                                                                                                  5830 syn_ack->m_init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  -
                                                                                                                                  5831 // Random security token.
                                                                                                                                  -
                                                                                                                                  5832 syn_ack->m_packed.m_security_token = sock->m_security_token;
                                                                                                                                  -
                                                                                                                                  5833 // Advertise initial rcv_wnd.
                                                                                                                                  -
                                                                                                                                  5834 syn_ack->m_packed.m_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  5835
                                                                                                                                  -
                                                                                                                                  5836 return syn_ack;
                                                                                                                                  -
                                                                                                                                  5837}
                                                                                                                                  -
                                                                                                                                  5838
                                                                                                                                  - -
                                                                                                                                  5840 boost::shared_ptr<const Syn_ack_packet>& syn_ack)
                                                                                                                                  -
                                                                                                                                  5841{
                                                                                                                                  -
                                                                                                                                  5842 // Make a packet.
                                                                                                                                  -
                                                                                                                                  5843 auto syn_ack_ack = Low_lvl_packet::create_uninit_packet<Syn_ack_ack_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5844 // No sequence number (not the initial SYN; not data).
                                                                                                                                  -
                                                                                                                                  5845 // Security token: give it back to them (they will verify).
                                                                                                                                  -
                                                                                                                                  5846 syn_ack_ack->m_packed.m_security_token = syn_ack->m_packed.m_security_token;
                                                                                                                                  -
                                                                                                                                  5847 // Initial receive window is probably the entire, ~empty Receive buffer. Save the advertised rcv_wnd as promised.
                                                                                                                                  -
                                                                                                                                  5848 syn_ack_ack->m_packed.m_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  5849
                                                                                                                                  -
                                                                                                                                  5850 // Fill out common fields and asynchronously send packet.
                                                                                                                                  - -
                                                                                                                                  5852 Low_lvl_packet::ptr_cast(syn_ack_ack),
                                                                                                                                  -
                                                                                                                                  5853 true); // Warns on error.
                                                                                                                                  -
                                                                                                                                  5854 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  -
                                                                                                                                  5855}
                                                                                                                                  -
                                                                                                                                  5856
                                                                                                                                  -
                                                                                                                                  5857void Node::async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code& sys_err_code)
                                                                                                                                  -
                                                                                                                                  5858{
                                                                                                                                  -
                                                                                                                                  5859 using boost::chrono::milliseconds;
                                                                                                                                  -
                                                                                                                                  5860 using boost::chrono::duration_cast;
                                                                                                                                  -
                                                                                                                                  5861 using std::make_pair;
                                                                                                                                  -
                                                                                                                                  5862 using std::vector;
                                                                                                                                  -
                                                                                                                                  5863 using std::numeric_limits;
                                                                                                                                  -
                                                                                                                                  5864
                                                                                                                                  -
                                                                                                                                  5865 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  5866
                                                                                                                                  -
                                                                                                                                  5867 // Handle the timer-related corner cases (if we were invoked by m_rcv_delayed_ack_timer triggering).
                                                                                                                                  -
                                                                                                                                  5868
                                                                                                                                  -
                                                                                                                                  5869 // For brevity and speed:
                                                                                                                                  -
                                                                                                                                  5870 vector<Peer_socket::Individual_ack::Ptr>& pending_acks = sock->m_rcv_pending_acks;
                                                                                                                                  -
                                                                                                                                  5871
                                                                                                                                  -
                                                                                                                                  5872 if (sys_err_code == boost::asio::error::operation_aborted)
                                                                                                                                  -
                                                                                                                                  5873 {
                                                                                                                                  -
                                                                                                                                  5874 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] canceled; "
                                                                                                                                  -
                                                                                                                                  5875 "pending acknowledgment count [" << pending_acks.size() << "].");
                                                                                                                                  -
                                                                                                                                  5876 return;
                                                                                                                                  -
                                                                                                                                  5877 }
                                                                                                                                  -
                                                                                                                                  5878 // else
                                                                                                                                  -
                                                                                                                                  5879
                                                                                                                                  -
                                                                                                                                  5880 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] triggered, or ACK forced; "
                                                                                                                                  -
                                                                                                                                  5881 "pending acknowledgment count [" << pending_acks.size() << "].");
                                                                                                                                  -
                                                                                                                                  5882
                                                                                                                                  -
                                                                                                                                  5883 if (sys_err_code)
                                                                                                                                  -
                                                                                                                                  5884 {
                                                                                                                                  -
                                                                                                                                  5885 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log non-portable error.
                                                                                                                                  -
                                                                                                                                  5886 // Nothing else to do here. We don't know what this means. So just treat it as if timer was triggered.
                                                                                                                                  -
                                                                                                                                  5887 }
                                                                                                                                  +
                                                                                                                                  5752#ifndef NDEBUG
                                                                                                                                  +
                                                                                                                                  5753 const auto erased = 1 ==
                                                                                                                                  +
                                                                                                                                  5754#endif
                                                                                                                                  +
                                                                                                                                  5755 m_socks.erase(socket_id);
                                                                                                                                  +
                                                                                                                                  5756 assert(erased); // S_OPEN => it's in m_socks. Otherwise there's a serious bug somewhere.
                                                                                                                                  +
                                                                                                                                  5757
                                                                                                                                  +
                                                                                                                                  5758 // Next, if this potentially is an unaccepted connection, delete it from the corresponding server socket.
                                                                                                                                  +
                                                                                                                                  5759 if (!sock->m_active_connect)
                                                                                                                                  +
                                                                                                                                  5760 {
                                                                                                                                  +
                                                                                                                                  5761 /* What is that Server_socket though? Well, it's in sock->m_originating_serv... but that data
                                                                                                                                  +
                                                                                                                                  5762 * member can be accessed from a non-W thread, so we'd have to lock it. But the mutex that
                                                                                                                                  +
                                                                                                                                  5763 * protects it in in *m_originating_serv itself! So it's a chicked/egg problem. However, we
                                                                                                                                  +
                                                                                                                                  5764 * can find that Server_socket (if it applies to sock) another way: through the port. Its port
                                                                                                                                  +
                                                                                                                                  5765 * must be the same as local_port. If such a Server_socket exists, cool; and if sock is
                                                                                                                                  +
                                                                                                                                  5766 * tracked inside it, cool. Otherwise we needn't do anything. */
                                                                                                                                  +
                                                                                                                                  5767 Port_to_server_map::const_iterator port_to_server_it = m_servs.find(sock->m_local_port);
                                                                                                                                  +
                                                                                                                                  5768 if (port_to_server_it != m_servs.end()) // Server at same port number exists. Not necessarily our guy though.
                                                                                                                                  +
                                                                                                                                  5769 {
                                                                                                                                  +
                                                                                                                                  5770 // If it is our guy, delete us from him.
                                                                                                                                  +
                                                                                                                                  5771 Server_socket::Ptr serv = port_to_server_it->second;
                                                                                                                                  +
                                                                                                                                  5772 serv_peer_socket_closed(serv, sock); // Thread-safe (in particular with respect to simultaneous serv->accept()).
                                                                                                                                  +
                                                                                                                                  5773 }
                                                                                                                                  +
                                                                                                                                  5774 }
                                                                                                                                  +
                                                                                                                                  5775
                                                                                                                                  +
                                                                                                                                  5776 // sock now should not be (directly or indirectly) referenced in any Node data structures.
                                                                                                                                  +
                                                                                                                                  5777
                                                                                                                                  +
                                                                                                                                  5778 // Cancel any timers.
                                                                                                                                  +
                                                                                                                                  5779 cancel_timers(sock);
                                                                                                                                  +
                                                                                                                                  5780
                                                                                                                                  +
                                                                                                                                  5781 /* Return the port -- but only if it is an active open. If it's a passive open the port is
                                                                                                                                  +
                                                                                                                                  5782 * still reserved for the server socket. */
                                                                                                                                  +
                                                                                                                                  5783 if (sock->m_active_connect)
                                                                                                                                  +
                                                                                                                                  5784 {
                                                                                                                                  +
                                                                                                                                  5785 Error_code return_err_code;
                                                                                                                                  +
                                                                                                                                  5786 m_ports.return_port(sock->m_local_port, &return_err_code);
                                                                                                                                  +
                                                                                                                                  5787 assert(!return_err_code);
                                                                                                                                  +
                                                                                                                                  5788 }
                                                                                                                                  +
                                                                                                                                  5789
                                                                                                                                  +
                                                                                                                                  5790 /* sock has changed to CLOSED state. Performing sock->receive() or sock->write() would therefore
                                                                                                                                  +
                                                                                                                                  5791 * certainly return an error. Returning an error from those methods (as opposed to 0 but no
                                                                                                                                  +
                                                                                                                                  5792 * error) is considered Readable and Writable, respectively (as we want to alert the user to the
                                                                                                                                  +
                                                                                                                                  5793 * error, so her wait [if any] wakes up and notices the error). Therefore we should soon inform
                                                                                                                                  +
                                                                                                                                  5794 * anyone waiting on any Event_sets for sock to become Readable or Writable.
                                                                                                                                  +
                                                                                                                                  5795 *
                                                                                                                                  +
                                                                                                                                  5796 * Caveat: Similar to that in Node::handle_syn_ack_ack_to_syn_rcvd() at similar point in the
                                                                                                                                  +
                                                                                                                                  5797 * code. */
                                                                                                                                  +
                                                                                                                                  5798
                                                                                                                                  +
                                                                                                                                  5799 // Accumulate the event into the Node store (note: not any Event_set yet).
                                                                                                                                  +
                                                                                                                                  5800 const bool inserted_rd = m_sock_events[Event_set::Event_type::S_PEER_SOCKET_READABLE].insert(sock).second;
                                                                                                                                  +
                                                                                                                                  5801 const bool inserted_wr = m_sock_events[Event_set::Event_type::S_PEER_SOCKET_WRITABLE].insert(sock).second;
                                                                                                                                  +
                                                                                                                                  5802 if (inserted_rd || inserted_wr) // Must always perform both insert()s, hence the use of the 2 variables.
                                                                                                                                  +
                                                                                                                                  5803 {
                                                                                                                                  +
                                                                                                                                  5804 // Possibly inform the user for any applicable Event_sets right now.
                                                                                                                                  +
                                                                                                                                  5805 event_set_all_check_delta(defer_delta_check);
                                                                                                                                  +
                                                                                                                                  5806 }
                                                                                                                                  +
                                                                                                                                  5807} // Node::close_connection_immediately()
                                                                                                                                  +
                                                                                                                                  5808
                                                                                                                                  + +
                                                                                                                                  5810 const Error_code& err_code, bool defer_delta_check)
                                                                                                                                  +
                                                                                                                                  5811{
                                                                                                                                  +
                                                                                                                                  5812 // We are in thread W.
                                                                                                                                  + +
                                                                                                                                  5814 close_connection_immediately(socket_id, sock, err_code, defer_delta_check);
                                                                                                                                  +
                                                                                                                                  5815}
                                                                                                                                  +
                                                                                                                                  5816
                                                                                                                                  + +
                                                                                                                                  5818{
                                                                                                                                  +
                                                                                                                                  5819 using util::Blob;
                                                                                                                                  +
                                                                                                                                  5820
                                                                                                                                  +
                                                                                                                                  5821 auto syn = Low_lvl_packet::create_uninit_packet<Syn_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5822 // Initial Sequence Number.
                                                                                                                                  +
                                                                                                                                  5823 syn->m_init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  +
                                                                                                                                  5824 /* Send serialized version of arbitrary user data, which user can deserialize on the other side
                                                                                                                                  +
                                                                                                                                  5825 * after accepting connection.
                                                                                                                                  +
                                                                                                                                  5826 * Add const to express we require a copy, not move. */
                                                                                                                                  +
                                                                                                                                  5827 syn->m_serialized_metadata = static_cast<const Blob&>(sock->m_serialized_metadata);
                                                                                                                                  +
                                                                                                                                  5828
                                                                                                                                  +
                                                                                                                                  5829 return syn;
                                                                                                                                  +
                                                                                                                                  5830}
                                                                                                                                  +
                                                                                                                                  5831
                                                                                                                                  + +
                                                                                                                                  5833{
                                                                                                                                  +
                                                                                                                                  5834 auto syn_ack = Low_lvl_packet::create_uninit_packet<Syn_ack_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5835 // Initial Sequence Number (the start of our own series).
                                                                                                                                  +
                                                                                                                                  5836 syn_ack->m_init_seq_num = sock->m_snd_init_seq_num;
                                                                                                                                  +
                                                                                                                                  5837 // Random security token.
                                                                                                                                  +
                                                                                                                                  5838 syn_ack->m_packed.m_security_token = sock->m_security_token;
                                                                                                                                  +
                                                                                                                                  5839 // Advertise initial rcv_wnd.
                                                                                                                                  +
                                                                                                                                  5840 syn_ack->m_packed.m_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  5841
                                                                                                                                  +
                                                                                                                                  5842 return syn_ack;
                                                                                                                                  +
                                                                                                                                  5843}
                                                                                                                                  +
                                                                                                                                  5844
                                                                                                                                  + +
                                                                                                                                  5846 boost::shared_ptr<const Syn_ack_packet>& syn_ack)
                                                                                                                                  +
                                                                                                                                  5847{
                                                                                                                                  +
                                                                                                                                  5848 // Make a packet.
                                                                                                                                  +
                                                                                                                                  5849 auto syn_ack_ack = Low_lvl_packet::create_uninit_packet<Syn_ack_ack_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5850 // No sequence number (not the initial SYN; not data).
                                                                                                                                  +
                                                                                                                                  5851 // Security token: give it back to them (they will verify).
                                                                                                                                  +
                                                                                                                                  5852 syn_ack_ack->m_packed.m_security_token = syn_ack->m_packed.m_security_token;
                                                                                                                                  +
                                                                                                                                  5853 // Initial receive window is probably the entire, ~empty Receive buffer. Save the advertised rcv_wnd as promised.
                                                                                                                                  +
                                                                                                                                  5854 syn_ack_ack->m_packed.m_rcv_wnd = sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  +
                                                                                                                                  5855
                                                                                                                                  +
                                                                                                                                  5856 // Fill out common fields and asynchronously send packet.
                                                                                                                                  + +
                                                                                                                                  5858 Low_lvl_packet::ptr_cast(syn_ack_ack),
                                                                                                                                  +
                                                                                                                                  5859 true); // Warns on error.
                                                                                                                                  +
                                                                                                                                  5860 // ^-- defer_delta_check == true: for similar reason as in handle_syn_ack_ack_to_syn_rcvd().
                                                                                                                                  +
                                                                                                                                  5861}
                                                                                                                                  +
                                                                                                                                  5862
                                                                                                                                  +
                                                                                                                                  5863void Node::async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code& sys_err_code)
                                                                                                                                  +
                                                                                                                                  5864{
                                                                                                                                  +
                                                                                                                                  5865 using boost::chrono::milliseconds;
                                                                                                                                  +
                                                                                                                                  5866 using boost::chrono::duration_cast;
                                                                                                                                  +
                                                                                                                                  5867 using std::make_pair;
                                                                                                                                  +
                                                                                                                                  5868 using std::vector;
                                                                                                                                  +
                                                                                                                                  5869 using std::numeric_limits;
                                                                                                                                  +
                                                                                                                                  5870
                                                                                                                                  +
                                                                                                                                  5871 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  5872
                                                                                                                                  +
                                                                                                                                  5873 // Handle the timer-related corner cases (if we were invoked by m_rcv_delayed_ack_timer triggering).
                                                                                                                                  +
                                                                                                                                  5874
                                                                                                                                  +
                                                                                                                                  5875 // For brevity and speed:
                                                                                                                                  +
                                                                                                                                  5876 vector<Peer_socket::Individual_ack::Ptr>& pending_acks = sock->m_rcv_pending_acks;
                                                                                                                                  +
                                                                                                                                  5877
                                                                                                                                  +
                                                                                                                                  5878 if (sys_err_code == boost::asio::error::operation_aborted)
                                                                                                                                  +
                                                                                                                                  5879 {
                                                                                                                                  +
                                                                                                                                  5880 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] canceled; "
                                                                                                                                  +
                                                                                                                                  5881 "pending acknowledgment count [" << pending_acks.size() << "].");
                                                                                                                                  +
                                                                                                                                  5882 return;
                                                                                                                                  +
                                                                                                                                  5883 }
                                                                                                                                  +
                                                                                                                                  5884 // else
                                                                                                                                  +
                                                                                                                                  5885
                                                                                                                                  +
                                                                                                                                  5886 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] triggered, or ACK forced; "
                                                                                                                                  +
                                                                                                                                  5887 "pending acknowledgment count [" << pending_acks.size() << "].");
                                                                                                                                  5888
                                                                                                                                  -
                                                                                                                                  5889 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  5889 if (sys_err_code)
                                                                                                                                  5890 {
                                                                                                                                  -
                                                                                                                                  5891 /* This is unlikely but legitimate. (Can happen if, by the time the handler that advanced state
                                                                                                                                  -
                                                                                                                                  5892 * from ESTABLISHED to another state started, this timer also was triggered and thus queued the
                                                                                                                                  -
                                                                                                                                  5893 * current handler inside m_task_engine.) */
                                                                                                                                  -
                                                                                                                                  5894 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] triggered, "
                                                                                                                                  -
                                                                                                                                  5895 "but socket already in inapplicable state [" << sock->m_int_state << "]. Ignoring.");
                                                                                                                                  -
                                                                                                                                  5896 return;
                                                                                                                                  -
                                                                                                                                  5897 }
                                                                                                                                  -
                                                                                                                                  5898 // else
                                                                                                                                  -
                                                                                                                                  5899
                                                                                                                                  -
                                                                                                                                  5900 if (pending_acks.empty())
                                                                                                                                  -
                                                                                                                                  5901 {
                                                                                                                                  -
                                                                                                                                  5902 /* This is probably a bug if we're here. However, assert() or connection closure seems a bit
                                                                                                                                  -
                                                                                                                                  5903 * drastic... carry on. */
                                                                                                                                  -
                                                                                                                                  5904 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered, "
                                                                                                                                  -
                                                                                                                                  5905 "but socket has no pending acknowledgments. This is likely an internal bug. Ignoring.");
                                                                                                                                  -
                                                                                                                                  5906 return;
                                                                                                                                  -
                                                                                                                                  5907 }
                                                                                                                                  -
                                                                                                                                  5908 // else
                                                                                                                                  -
                                                                                                                                  5909
                                                                                                                                  -
                                                                                                                                  5910 /* OK, let's do it. Basically just shove all the acknowledgments into an ACK packet. Namely, for
                                                                                                                                  -
                                                                                                                                  5911 * each one, shove the starting sequence number and the amount of time since we first received it
                                                                                                                                  -
                                                                                                                                  5912 * (so the other side can subtract that to compute RTT, if it wants).
                                                                                                                                  -
                                                                                                                                  5913 *
                                                                                                                                  -
                                                                                                                                  5914 * However we may run out of space and need more ACKs. To keep track of how much space we've
                                                                                                                                  -
                                                                                                                                  5915 * used, compute an estimate for serializing those two pieces of data and keep adding that for
                                                                                                                                  -
                                                                                                                                  5916 * each acknowledgment handled. The budget is given by max-block-size; a DATA packet is allowed
                                                                                                                                  -
                                                                                                                                  5917 * that much payload on top of the normal header stuff, so that should be good enough for us too.
                                                                                                                                  -
                                                                                                                                  5918 * There's probably some constant overhead on top of that, but it's close enough.
                                                                                                                                  +
                                                                                                                                  5891 FLOW_ERROR_SYS_ERROR_LOG_WARNING(); // Log non-portable error.
                                                                                                                                  +
                                                                                                                                  5892 // Nothing else to do here. We don't know what this means. So just treat it as if timer was triggered.
                                                                                                                                  +
                                                                                                                                  5893 }
                                                                                                                                  +
                                                                                                                                  5894
                                                                                                                                  +
                                                                                                                                  5895 if (sock->m_int_state != Peer_socket::Int_state::S_ESTABLISHED)
                                                                                                                                  +
                                                                                                                                  5896 {
                                                                                                                                  +
                                                                                                                                  5897 /* This is unlikely but legitimate. (Can happen if, by the time the handler that advanced state
                                                                                                                                  +
                                                                                                                                  5898 * from ESTABLISHED to another state started, this timer also was triggered and thus queued the
                                                                                                                                  +
                                                                                                                                  5899 * current handler inside m_task_engine.) */
                                                                                                                                  +
                                                                                                                                  5900 FLOW_LOG_TRACE("Delayed [ACK] timer [" << sock << "] triggered, "
                                                                                                                                  +
                                                                                                                                  5901 "but socket already in inapplicable state [" << sock->m_int_state << "]. Ignoring.");
                                                                                                                                  +
                                                                                                                                  5902 return;
                                                                                                                                  +
                                                                                                                                  5903 }
                                                                                                                                  +
                                                                                                                                  5904 // else
                                                                                                                                  +
                                                                                                                                  5905
                                                                                                                                  +
                                                                                                                                  5906 if (pending_acks.empty())
                                                                                                                                  +
                                                                                                                                  5907 {
                                                                                                                                  +
                                                                                                                                  5908 /* This is probably a bug if we're here. However, assert() or connection closure seems a bit
                                                                                                                                  +
                                                                                                                                  5909 * drastic... carry on. */
                                                                                                                                  +
                                                                                                                                  5910 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered, "
                                                                                                                                  +
                                                                                                                                  5911 "but socket has no pending acknowledgments. This is likely an internal bug. Ignoring.");
                                                                                                                                  +
                                                                                                                                  5912 return;
                                                                                                                                  +
                                                                                                                                  5913 }
                                                                                                                                  +
                                                                                                                                  5914 // else
                                                                                                                                  +
                                                                                                                                  5915
                                                                                                                                  +
                                                                                                                                  5916 /* OK, let's do it. Basically just shove all the acknowledgments into an ACK packet. Namely, for
                                                                                                                                  +
                                                                                                                                  5917 * each one, shove the starting sequence number and the amount of time since we first received it
                                                                                                                                  +
                                                                                                                                  5918 * (so the other side can subtract that to compute RTT, if it wants).
                                                                                                                                  5919 *
                                                                                                                                  -
                                                                                                                                  5920 * ACK is also used as an opportunistic way to send rcv_wnd to the other side, which informs
                                                                                                                                  -
                                                                                                                                  5921 * them of how much more data we can take at this time. Naively we should just have rcv_wnd =
                                                                                                                                  -
                                                                                                                                  5922 * the max buffer size minus the buffer space currently taken, and that is the most accurate
                                                                                                                                  -
                                                                                                                                  5923 * thing. However RFC 793 ("Window Management Suggestions") and probably other literature
                                                                                                                                  -
                                                                                                                                  5924 * suggest to (when the available space is increasing) advertise the window in larger steps (so
                                                                                                                                  -
                                                                                                                                  5925 * withhold the higher rcv_wnd value until it increases even further up to some threshold). For
                                                                                                                                  -
                                                                                                                                  5926 * now I forego such fanciness. See also the rcv_wnd-related comment in
                                                                                                                                  -
                                                                                                                                  5927 * Node::receive_wnd_increased() for further reasoning on rcv_wnd (namely surrounding the fact
                                                                                                                                  -
                                                                                                                                  5928 * that sometimes we must send ACKs with no packets acknowledged to ensure a connection does not
                                                                                                                                  -
                                                                                                                                  5929 * stall due to a zero rcv_wnd). */
                                                                                                                                  -
                                                                                                                                  5930
                                                                                                                                  -
                                                                                                                                  5931 // Grab available Receive buffer space. Save it for later comparison.
                                                                                                                                  -
                                                                                                                                  5932 const size_t& rcv_wnd = sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  5933
                                                                                                                                  -
                                                                                                                                  5934 auto ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5935 ack->m_rcv_wnd = rcv_wnd; // Advertise receive window. @todo Code reuse?
                                                                                                                                  +
                                                                                                                                  5920 * However we may run out of space and need more ACKs. To keep track of how much space we've
                                                                                                                                  +
                                                                                                                                  5921 * used, compute an estimate for serializing those two pieces of data and keep adding that for
                                                                                                                                  +
                                                                                                                                  5922 * each acknowledgment handled. The budget is given by max-block-size; a DATA packet is allowed
                                                                                                                                  +
                                                                                                                                  5923 * that much payload on top of the normal header stuff, so that should be good enough for us too.
                                                                                                                                  +
                                                                                                                                  5924 * There's probably some constant overhead on top of that, but it's close enough.
                                                                                                                                  +
                                                                                                                                  5925 *
                                                                                                                                  +
                                                                                                                                  5926 * ACK is also used as an opportunistic way to send rcv_wnd to the other side, which informs
                                                                                                                                  +
                                                                                                                                  5927 * them of how much more data we can take at this time. Naively we should just have rcv_wnd =
                                                                                                                                  +
                                                                                                                                  5928 * the max buffer size minus the buffer space currently taken, and that is the most accurate
                                                                                                                                  +
                                                                                                                                  5929 * thing. However RFC 793 ("Window Management Suggestions") and probably other literature
                                                                                                                                  +
                                                                                                                                  5930 * suggest to (when the available space is increasing) advertise the window in larger steps (so
                                                                                                                                  +
                                                                                                                                  5931 * withhold the higher rcv_wnd value until it increases even further up to some threshold). For
                                                                                                                                  +
                                                                                                                                  5932 * now I forego such fanciness. See also the rcv_wnd-related comment in
                                                                                                                                  +
                                                                                                                                  5933 * Node::receive_wnd_increased() for further reasoning on rcv_wnd (namely surrounding the fact
                                                                                                                                  +
                                                                                                                                  5934 * that sometimes we must send ACKs with no packets acknowledged to ensure a connection does not
                                                                                                                                  +
                                                                                                                                  5935 * stall due to a zero rcv_wnd). */
                                                                                                                                  5936
                                                                                                                                  -
                                                                                                                                  5937 const size_t max_block_size = sock->max_block_size();
                                                                                                                                  -
                                                                                                                                  5938 size_t size_est_inc
                                                                                                                                  - -
                                                                                                                                  5940 if (sock->rexmit_on())
                                                                                                                                  -
                                                                                                                                  5941 {
                                                                                                                                  -
                                                                                                                                  5942 size_est_inc += sizeof(Low_lvl_packet::rexmit_id_t);
                                                                                                                                  -
                                                                                                                                  5943 }
                                                                                                                                  -
                                                                                                                                  5944 assert(size_est_inc <= max_block_size); // At least one has to fit.
                                                                                                                                  -
                                                                                                                                  5945
                                                                                                                                  -
                                                                                                                                  5946 const Fine_time_pt time_now = Fine_clock::now();
                                                                                                                                  -
                                                                                                                                  5947 size_t size_est_so_far = sizeof(Low_lvl_packet::rcv_wnd_t); // How many raw bytes we have, approximately, used.
                                                                                                                                  -
                                                                                                                                  5948 for (Peer_socket::Individual_ack::Const_ptr ind_ack : pending_acks)
                                                                                                                                  -
                                                                                                                                  5949 {
                                                                                                                                  -
                                                                                                                                  5950 if (size_est_so_far + size_est_inc > max_block_size)
                                                                                                                                  -
                                                                                                                                  5951 {
                                                                                                                                  -
                                                                                                                                  5952 // Too big. Send off what we have.
                                                                                                                                  - - -
                                                                                                                                  5955 defer_delta_check))
                                                                                                                                  -
                                                                                                                                  5956 {
                                                                                                                                  -
                                                                                                                                  5957 return;
                                                                                                                                  -
                                                                                                                                  5958 }
                                                                                                                                  -
                                                                                                                                  5959 // else
                                                                                                                                  -
                                                                                                                                  5960
                                                                                                                                  -
                                                                                                                                  5961 // Register one ACK packet we will send ASAP.
                                                                                                                                  -
                                                                                                                                  5962 sock->m_rcv_stats.sent_low_lvl_ack_packet(false);
                                                                                                                                  -
                                                                                                                                  5963
                                                                                                                                  -
                                                                                                                                  5964 // As async_sock_low_lvl_packet_send_paced() says, we cannot reuse ack's pointed-to-object. Make new one.
                                                                                                                                  -
                                                                                                                                  5965 ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  -
                                                                                                                                  5966 ack->m_rcv_wnd = rcv_wnd; // Advertise receive window. @todo Code reuse?
                                                                                                                                  -
                                                                                                                                  5967
                                                                                                                                  -
                                                                                                                                  5968 size_est_so_far = sizeof(Low_lvl_packet::rcv_wnd_t);
                                                                                                                                  -
                                                                                                                                  5969 }
                                                                                                                                  -
                                                                                                                                  5970
                                                                                                                                  -
                                                                                                                                  5971 // Add the acknowledgment to the current ACK.
                                                                                                                                  -
                                                                                                                                  5972
                                                                                                                                  -
                                                                                                                                  5973 // First sequence number in packet.
                                                                                                                                  -
                                                                                                                                  5974 const Sequence_number& seq_num = ind_ack->m_seq_num;
                                                                                                                                  -
                                                                                                                                  5975
                                                                                                                                  -
                                                                                                                                  5976 // ACK delay for this individual acknowledgment. Compute it; then validate it.
                                                                                                                                  -
                                                                                                                                  5977
                                                                                                                                  -
                                                                                                                                  5978 /* @todo In low_lvl_io, we perform packet pacing but currently choose to assign a value of
                                                                                                                                  -
                                                                                                                                  5979 * 0 bytes to an ACK. That is, while we do preserve the order of DATA and ACK packets -- if
                                                                                                                                  -
                                                                                                                                  5980 * both happen to be in the outgoing stream -- we do not delay the sending of the ACK once it is
                                                                                                                                  -
                                                                                                                                  5981 * the next packet to be sent out. However, even so, an ACK's sending may be delayed by the
                                                                                                                                  -
                                                                                                                                  5982 * pacing applied to DATA packets intermixed with it. Therefore the ACK delay measurement we
                                                                                                                                  -
                                                                                                                                  5983 * take here may be incorrect (too low) in that case. This can cause overestimated RTTs on the
                                                                                                                                  -
                                                                                                                                  5984 * sender's side. The to-do is to correct the ACK delay value in a given ACK by adding the
                                                                                                                                  -
                                                                                                                                  5985 * pacing delay (if any) of the ACK to the individual ACK delays within it. Conceptually this
                                                                                                                                  -
                                                                                                                                  5986 * is similar to the sent_when value being set when choosing to send a DATA packet and then
                                                                                                                                  -
                                                                                                                                  5987 * corrected in the pacing module later.
                                                                                                                                  -
                                                                                                                                  5988 *
                                                                                                                                  -
                                                                                                                                  5989 * This to-do is not important until we in practice start mixing sending and receiving at the
                                                                                                                                  -
                                                                                                                                  5990 * application layer... but still -- it's worth knowing that there is a design bug here. */
                                                                                                                                  -
                                                                                                                                  5991
                                                                                                                                  -
                                                                                                                                  5992 // Shouldn't be negative.
                                                                                                                                  -
                                                                                                                                  5993 Fine_duration delay = time_now - ind_ack->m_received_when;
                                                                                                                                  -
                                                                                                                                  5994 if (delay.count() < 0)
                                                                                                                                  -
                                                                                                                                  5995 {
                                                                                                                                  -
                                                                                                                                  5996 /* This is pretty crazy and should not happen according to the documented properties of
                                                                                                                                  -
                                                                                                                                  5997 * Fine_clock. No need to crash or disconnect though, so do our best.... */
                                                                                                                                  -
                                                                                                                                  5998 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered; "
                                                                                                                                  -
                                                                                                                                  5999 "delay for packet [" << seq_num << ", ...) is "
                                                                                                                                  -
                                                                                                                                  6000 "negative: [" << delay << "]; using zero.");
                                                                                                                                  -
                                                                                                                                  6001 delay = Fine_duration::zero();
                                                                                                                                  -
                                                                                                                                  6002 }
                                                                                                                                  -
                                                                                                                                  6003
                                                                                                                                  -
                                                                                                                                  6004 /* Convert whatever resolution Fine_clock uses to milliseconds because we want to keep that
                                                                                                                                  -
                                                                                                                                  6005 * field of the ACK sized according to how the low-level packet handling code prefers it for
                                                                                                                                  -
                                                                                                                                  6006 * efficiency. Overflow is possible. Use duration_cast (truncation) instead of rounding,
                                                                                                                                  -
                                                                                                                                  6007 * because in very low-latency situations the extra microseconds rounding up can cause a
                                                                                                                                  -
                                                                                                                                  6008 * negative RTT calculation on the other side (when this ACK is received). The ACK handling
                                                                                                                                  -
                                                                                                                                  6009 * code will just clamp the value at zero on the other side, but let's try to avoid it anyway
                                                                                                                                  -
                                                                                                                                  6010 * on this side.
                                                                                                                                  -
                                                                                                                                  6011 *
                                                                                                                                  -
                                                                                                                                  6012 * @todo This comment appears to be outdated, as Ack_delay_time_unit is just Fine_duration.
                                                                                                                                  -
                                                                                                                                  6013 * Look into this. */
                                                                                                                                  -
                                                                                                                                  6014 Ack_packet::Ack_delay_time_unit pkt_delay = duration_cast<Ack_packet::Ack_delay_time_unit>(delay);
                                                                                                                                  -
                                                                                                                                  6015 const Ack_packet::ack_delay_t MAX_DELAY_VALUE = numeric_limits<Ack_packet::ack_delay_t>::max();
                                                                                                                                  -
                                                                                                                                  6016 if (uint64_t(pkt_delay.count()) > uint64_t(MAX_DELAY_VALUE))
                                                                                                                                  -
                                                                                                                                  6017 {
                                                                                                                                  -
                                                                                                                                  6018 /* This is pretty crazy though not 100% impossible if the CPU is really loaded, or some other
                                                                                                                                  -
                                                                                                                                  6019 * shenanigans. So do our best.... */
                                                                                                                                  -
                                                                                                                                  6020 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered; "
                                                                                                                                  -
                                                                                                                                  6021 "delay for packet [" << seq_num << ", ...) is [" << pkt_delay << "]; overflow; "
                                                                                                                                  -
                                                                                                                                  6022 "using max value [" << MAX_DELAY_VALUE << "] units.");
                                                                                                                                  -
                                                                                                                                  6023 // @todo Maybe there's a more sane ceiling value than the absolute maximum?
                                                                                                                                  -
                                                                                                                                  6024 pkt_delay = Ack_packet::Ack_delay_time_unit(MAX_DELAY_VALUE);
                                                                                                                                  -
                                                                                                                                  6025 }
                                                                                                                                  -
                                                                                                                                  6026
                                                                                                                                  -
                                                                                                                                  6027 // Finally write the individual acknowledgment.
                                                                                                                                  -
                                                                                                                                  6028 if (sock->rexmit_on())
                                                                                                                                  -
                                                                                                                                  6029 {
                                                                                                                                  -
                                                                                                                                  6030 ack->m_rcv_acked_packets_rexmit_on_out.push_back
                                                                                                                                  - -
                                                                                                                                  6032 ind_ack->m_rexmit_id,
                                                                                                                                  -
                                                                                                                                  6033 Ack_packet::ack_delay_t(pkt_delay.count())));
                                                                                                                                  -
                                                                                                                                  6034 }
                                                                                                                                  -
                                                                                                                                  6035 else
                                                                                                                                  -
                                                                                                                                  6036 {
                                                                                                                                  -
                                                                                                                                  6037 ack->m_rcv_acked_packets_rexmit_off_out.push_back
                                                                                                                                  - -
                                                                                                                                  6039 Ack_packet::ack_delay_t(pkt_delay.count())));
                                                                                                                                  +
                                                                                                                                  5937 // Grab available Receive buffer space. Save it for later comparison.
                                                                                                                                  +
                                                                                                                                  5938 const size_t& rcv_wnd = sock->m_rcv_last_sent_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  +
                                                                                                                                  5939
                                                                                                                                  +
                                                                                                                                  5940 auto ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5941 ack->m_rcv_wnd = rcv_wnd; // Advertise receive window. @todo Code reuse?
                                                                                                                                  +
                                                                                                                                  5942
                                                                                                                                  +
                                                                                                                                  5943 const size_t max_block_size = sock->max_block_size();
                                                                                                                                  +
                                                                                                                                  5944 size_t size_est_inc
                                                                                                                                  + +
                                                                                                                                  5946 if (sock->rexmit_on())
                                                                                                                                  +
                                                                                                                                  5947 {
                                                                                                                                  +
                                                                                                                                  5948 size_est_inc += sizeof(Low_lvl_packet::rexmit_id_t);
                                                                                                                                  +
                                                                                                                                  5949 }
                                                                                                                                  +
                                                                                                                                  5950 assert(size_est_inc <= max_block_size); // At least one has to fit.
                                                                                                                                  +
                                                                                                                                  5951
                                                                                                                                  +
                                                                                                                                  5952 const Fine_time_pt time_now = Fine_clock::now();
                                                                                                                                  +
                                                                                                                                  5953 size_t size_est_so_far = sizeof(Low_lvl_packet::rcv_wnd_t); // How many raw bytes we have, approximately, used.
                                                                                                                                  +
                                                                                                                                  5954 for (Peer_socket::Individual_ack::Const_ptr ind_ack : pending_acks)
                                                                                                                                  +
                                                                                                                                  5955 {
                                                                                                                                  +
                                                                                                                                  5956 if (size_est_so_far + size_est_inc > max_block_size)
                                                                                                                                  +
                                                                                                                                  5957 {
                                                                                                                                  +
                                                                                                                                  5958 // Too big. Send off what we have.
                                                                                                                                  + + +
                                                                                                                                  5961 defer_delta_check))
                                                                                                                                  +
                                                                                                                                  5962 {
                                                                                                                                  +
                                                                                                                                  5963 return;
                                                                                                                                  +
                                                                                                                                  5964 }
                                                                                                                                  +
                                                                                                                                  5965 // else
                                                                                                                                  +
                                                                                                                                  5966
                                                                                                                                  +
                                                                                                                                  5967 // Register one ACK packet we will send ASAP.
                                                                                                                                  +
                                                                                                                                  5968 sock->m_rcv_stats.sent_low_lvl_ack_packet(false);
                                                                                                                                  +
                                                                                                                                  5969
                                                                                                                                  +
                                                                                                                                  5970 // As async_sock_low_lvl_packet_send_paced() says, we cannot reuse ack's pointed-to-object. Make new one.
                                                                                                                                  +
                                                                                                                                  5971 ack = Low_lvl_packet::create_uninit_packet<Ack_packet>(get_logger());
                                                                                                                                  +
                                                                                                                                  5972 ack->m_rcv_wnd = rcv_wnd; // Advertise receive window. @todo Code reuse?
                                                                                                                                  +
                                                                                                                                  5973
                                                                                                                                  +
                                                                                                                                  5974 size_est_so_far = sizeof(Low_lvl_packet::rcv_wnd_t);
                                                                                                                                  +
                                                                                                                                  5975 }
                                                                                                                                  +
                                                                                                                                  5976
                                                                                                                                  +
                                                                                                                                  5977 // Add the acknowledgment to the current ACK.
                                                                                                                                  +
                                                                                                                                  5978
                                                                                                                                  +
                                                                                                                                  5979 // First sequence number in packet.
                                                                                                                                  +
                                                                                                                                  5980 const Sequence_number& seq_num = ind_ack->m_seq_num;
                                                                                                                                  +
                                                                                                                                  5981
                                                                                                                                  +
                                                                                                                                  5982 // ACK delay for this individual acknowledgment. Compute it; then validate it.
                                                                                                                                  +
                                                                                                                                  5983
                                                                                                                                  +
                                                                                                                                  5984 /* @todo In low_lvl_io, we perform packet pacing but currently choose to assign a value of
                                                                                                                                  +
                                                                                                                                  5985 * 0 bytes to an ACK. That is, while we do preserve the order of DATA and ACK packets -- if
                                                                                                                                  +
                                                                                                                                  5986 * both happen to be in the outgoing stream -- we do not delay the sending of the ACK once it is
                                                                                                                                  +
                                                                                                                                  5987 * the next packet to be sent out. However, even so, an ACK's sending may be delayed by the
                                                                                                                                  +
                                                                                                                                  5988 * pacing applied to DATA packets intermixed with it. Therefore the ACK delay measurement we
                                                                                                                                  +
                                                                                                                                  5989 * take here may be incorrect (too low) in that case. This can cause overestimated RTTs on the
                                                                                                                                  +
                                                                                                                                  5990 * sender's side. The to-do is to correct the ACK delay value in a given ACK by adding the
                                                                                                                                  +
                                                                                                                                  5991 * pacing delay (if any) of the ACK to the individual ACK delays within it. Conceptually this
                                                                                                                                  +
                                                                                                                                  5992 * is similar to the sent_when value being set when choosing to send a DATA packet and then
                                                                                                                                  +
                                                                                                                                  5993 * corrected in the pacing module later.
                                                                                                                                  +
                                                                                                                                  5994 *
                                                                                                                                  +
                                                                                                                                  5995 * This to-do is not important until we in practice start mixing sending and receiving at the
                                                                                                                                  +
                                                                                                                                  5996 * application layer... but still -- it's worth knowing that there is a design bug here. */
                                                                                                                                  +
                                                                                                                                  5997
                                                                                                                                  +
                                                                                                                                  5998 // Shouldn't be negative.
                                                                                                                                  +
                                                                                                                                  5999 Fine_duration delay = time_now - ind_ack->m_received_when;
                                                                                                                                  +
                                                                                                                                  6000 if (delay.count() < 0)
                                                                                                                                  +
                                                                                                                                  6001 {
                                                                                                                                  +
                                                                                                                                  6002 /* This is pretty crazy and should not happen according to the documented properties of
                                                                                                                                  +
                                                                                                                                  6003 * Fine_clock. No need to crash or disconnect though, so do our best.... */
                                                                                                                                  +
                                                                                                                                  6004 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered; "
                                                                                                                                  +
                                                                                                                                  6005 "delay for packet [" << seq_num << ", ...) is "
                                                                                                                                  +
                                                                                                                                  6006 "negative: [" << delay << "]; using zero.");
                                                                                                                                  +
                                                                                                                                  6007 delay = Fine_duration::zero();
                                                                                                                                  +
                                                                                                                                  6008 }
                                                                                                                                  +
                                                                                                                                  6009
                                                                                                                                  +
                                                                                                                                  6010 /* Convert whatever resolution Fine_clock uses to milliseconds because we want to keep that
                                                                                                                                  +
                                                                                                                                  6011 * field of the ACK sized according to how the low-level packet handling code prefers it for
                                                                                                                                  +
                                                                                                                                  6012 * efficiency. Overflow is possible. Use duration_cast (truncation) instead of rounding,
                                                                                                                                  +
                                                                                                                                  6013 * because in very low-latency situations the extra microseconds rounding up can cause a
                                                                                                                                  +
                                                                                                                                  6014 * negative RTT calculation on the other side (when this ACK is received). The ACK handling
                                                                                                                                  +
                                                                                                                                  6015 * code will just clamp the value at zero on the other side, but let's try to avoid it anyway
                                                                                                                                  +
                                                                                                                                  6016 * on this side.
                                                                                                                                  +
                                                                                                                                  6017 *
                                                                                                                                  +
                                                                                                                                  6018 * @todo This comment appears to be outdated, as Ack_delay_time_unit is just Fine_duration.
                                                                                                                                  +
                                                                                                                                  6019 * Look into this. */
                                                                                                                                  +
                                                                                                                                  6020 Ack_packet::Ack_delay_time_unit pkt_delay = duration_cast<Ack_packet::Ack_delay_time_unit>(delay);
                                                                                                                                  +
                                                                                                                                  6021 const Ack_packet::ack_delay_t MAX_DELAY_VALUE = numeric_limits<Ack_packet::ack_delay_t>::max();
                                                                                                                                  +
                                                                                                                                  6022 if (uint64_t(pkt_delay.count()) > uint64_t(MAX_DELAY_VALUE))
                                                                                                                                  +
                                                                                                                                  6023 {
                                                                                                                                  +
                                                                                                                                  6024 /* This is pretty crazy though not 100% impossible if the CPU is really loaded, or some other
                                                                                                                                  +
                                                                                                                                  6025 * shenanigans. So do our best.... */
                                                                                                                                  +
                                                                                                                                  6026 FLOW_LOG_WARNING("Delayed [ACK] timer [" << sock << "] triggered; "
                                                                                                                                  +
                                                                                                                                  6027 "delay for packet [" << seq_num << ", ...) is [" << pkt_delay << "]; overflow; "
                                                                                                                                  +
                                                                                                                                  6028 "using max value [" << MAX_DELAY_VALUE << "] units.");
                                                                                                                                  +
                                                                                                                                  6029 // @todo Maybe there's a more sane ceiling value than the absolute maximum?
                                                                                                                                  +
                                                                                                                                  6030 pkt_delay = Ack_packet::Ack_delay_time_unit(MAX_DELAY_VALUE);
                                                                                                                                  +
                                                                                                                                  6031 }
                                                                                                                                  +
                                                                                                                                  6032
                                                                                                                                  +
                                                                                                                                  6033 // Finally write the individual acknowledgment.
                                                                                                                                  +
                                                                                                                                  6034 if (sock->rexmit_on())
                                                                                                                                  +
                                                                                                                                  6035 {
                                                                                                                                  +
                                                                                                                                  6036 ack->m_rcv_acked_packets_rexmit_on_out.push_back
                                                                                                                                  + +
                                                                                                                                  6038 ind_ack->m_rexmit_id,
                                                                                                                                  +
                                                                                                                                  6039 Ack_packet::ack_delay_t(pkt_delay.count())));
                                                                                                                                  6040 }
                                                                                                                                  -
                                                                                                                                  6041 size_est_so_far += size_est_inc;
                                                                                                                                  -
                                                                                                                                  6042
                                                                                                                                  -
                                                                                                                                  6043 // Register one packet of unknown size that we've packaged into an ACK and will send ASAP.
                                                                                                                                  -
                                                                                                                                  6044 sock->m_rcv_stats.sent_individual_ack();
                                                                                                                                  -
                                                                                                                                  6045 } // for (ind_ack : pending_acks)
                                                                                                                                  -
                                                                                                                                  6046
                                                                                                                                  -
                                                                                                                                  6047 // Don't forget the last non-full ACK, if any.
                                                                                                                                  -
                                                                                                                                  6048 if ((size_est_so_far != 0)
                                                                                                                                  - - -
                                                                                                                                  6051 defer_delta_check)))
                                                                                                                                  -
                                                                                                                                  6052 {
                                                                                                                                  -
                                                                                                                                  6053 return;
                                                                                                                                  -
                                                                                                                                  6054 }
                                                                                                                                  -
                                                                                                                                  6055
                                                                                                                                  -
                                                                                                                                  6056 // Register one ACK packet we will send ASAP.
                                                                                                                                  -
                                                                                                                                  6057 sock->m_rcv_stats.sent_low_lvl_ack_packet(false);
                                                                                                                                  -
                                                                                                                                  6058
                                                                                                                                  -
                                                                                                                                  6059 // All serialized to be sent; the timer can start again when a packet must be acknowledged.
                                                                                                                                  -
                                                                                                                                  6060 pending_acks.clear();
                                                                                                                                  +
                                                                                                                                  6041 else
                                                                                                                                  +
                                                                                                                                  6042 {
                                                                                                                                  +
                                                                                                                                  6043 ack->m_rcv_acked_packets_rexmit_off_out.push_back
                                                                                                                                  + +
                                                                                                                                  6045 Ack_packet::ack_delay_t(pkt_delay.count())));
                                                                                                                                  +
                                                                                                                                  6046 }
                                                                                                                                  +
                                                                                                                                  6047 size_est_so_far += size_est_inc;
                                                                                                                                  +
                                                                                                                                  6048
                                                                                                                                  +
                                                                                                                                  6049 // Register one packet of unknown size that we've packaged into an ACK and will send ASAP.
                                                                                                                                  +
                                                                                                                                  6050 sock->m_rcv_stats.sent_individual_ack();
                                                                                                                                  +
                                                                                                                                  6051 } // for (ind_ack : pending_acks)
                                                                                                                                  +
                                                                                                                                  6052
                                                                                                                                  +
                                                                                                                                  6053 // Don't forget the last non-full ACK, if any.
                                                                                                                                  +
                                                                                                                                  6054 if ((size_est_so_far != 0)
                                                                                                                                  + + +
                                                                                                                                  6057 defer_delta_check)))
                                                                                                                                  +
                                                                                                                                  6058 {
                                                                                                                                  +
                                                                                                                                  6059 return;
                                                                                                                                  +
                                                                                                                                  6060 }
                                                                                                                                  6061
                                                                                                                                  -
                                                                                                                                  6062 // Register that now there are 0 pending individual acks.
                                                                                                                                  -
                                                                                                                                  6063 sock->m_rcv_stats.current_pending_to_ack_packets(0);
                                                                                                                                  +
                                                                                                                                  6062 // Register one ACK packet we will send ASAP.
                                                                                                                                  +
                                                                                                                                  6063 sock->m_rcv_stats.sent_low_lvl_ack_packet(false);
                                                                                                                                  6064
                                                                                                                                  -
                                                                                                                                  6065 // Note that all the ACKs are sent off outside this handler and only once UDP is ready.
                                                                                                                                  -
                                                                                                                                  6066} // Node::async_low_lvl_ack_send()
                                                                                                                                  +
                                                                                                                                  6065 // All serialized to be sent; the timer can start again when a packet must be acknowledged.
                                                                                                                                  +
                                                                                                                                  6066 pending_acks.clear();
                                                                                                                                  6067
                                                                                                                                  - -
                                                                                                                                  6069{
                                                                                                                                  -
                                                                                                                                  6070 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  6071 return Socket_id{ sock->remote_endpoint(), sock->local_port() };
                                                                                                                                  -
                                                                                                                                  6072}
                                                                                                                                  +
                                                                                                                                  6068 // Register that now there are 0 pending individual acks.
                                                                                                                                  +
                                                                                                                                  6069 sock->m_rcv_stats.current_pending_to_ack_packets(0);
                                                                                                                                  +
                                                                                                                                  6070
                                                                                                                                  +
                                                                                                                                  6071 // Note that all the ACKs are sent off outside this handler and only once UDP is ready.
                                                                                                                                  +
                                                                                                                                  6072} // Node::async_low_lvl_ack_send()
                                                                                                                                  6073
                                                                                                                                  - -
                                                                                                                                  6075{
                                                                                                                                  -
                                                                                                                                  6076 // There is stuff to send if there is anything to retransmit or at least new user data.
                                                                                                                                  -
                                                                                                                                  6077 return !(sock->m_snd_rexmit_q.empty() && sock->m_snd_buf.empty());
                                                                                                                                  + +
                                                                                                                                  6075{
                                                                                                                                  +
                                                                                                                                  6076 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  6077 return Socket_id{ sock->remote_endpoint(), sock->local_port() };
                                                                                                                                  6078}
                                                                                                                                  6079
                                                                                                                                  - +
                                                                                                                                  6081{
                                                                                                                                  -
                                                                                                                                  6082 // See doc comment for rationale for keeping this in a function.
                                                                                                                                  -
                                                                                                                                  6083
                                                                                                                                  -
                                                                                                                                  6084 /* Since 1 block can be at most max-block-size, if that much space is free, then definitely one
                                                                                                                                  -
                                                                                                                                  6085 * can enqueue onto m_snd_buf. Note that if less than max-block-size space is free, it would
                                                                                                                                  -
                                                                                                                                  6086 * still be possible to enqueue a smaller block; yet we still return false. We are intentionally
                                                                                                                                  -
                                                                                                                                  6087 * conservative, because we are guaranteeing ANY one enqueueing will work. More importantly, this
                                                                                                                                  -
                                                                                                                                  6088 * guarantees our Socket_buffer scheme (see class doc header) to guarantee constant-time
                                                                                                                                  -
                                                                                                                                  6089 * dequeueing will work.
                                                                                                                                  -
                                                                                                                                  6090 *
                                                                                                                                  -
                                                                                                                                  6091 * We're not overly conservative, either; i.e., no one is likely to complain this policy is too
                                                                                                                                  -
                                                                                                                                  6092 * stingy. */
                                                                                                                                  -
                                                                                                                                  6093 return sock->m_snd_buf.data_size() + sock->max_block_size()
                                                                                                                                  -
                                                                                                                                  6094 <= sock->opt(sock->m_opts.m_st_snd_buf_max_size);
                                                                                                                                  -
                                                                                                                                  6095}
                                                                                                                                  -
                                                                                                                                  6096
                                                                                                                                  - -
                                                                                                                                  6098{
                                                                                                                                  -
                                                                                                                                  6099 // See doc comment for rationale for keeping this in a function.
                                                                                                                                  -
                                                                                                                                  6100 return !sock->m_rcv_buf.empty();
                                                                                                                                  +
                                                                                                                                  6082 // There is stuff to send if there is anything to retransmit or at least new user data.
                                                                                                                                  +
                                                                                                                                  6083 return !(sock->m_snd_rexmit_q.empty() && sock->m_snd_buf.empty());
                                                                                                                                  +
                                                                                                                                  6084}
                                                                                                                                  +
                                                                                                                                  6085
                                                                                                                                  + +
                                                                                                                                  6087{
                                                                                                                                  +
                                                                                                                                  6088 // See doc comment for rationale for keeping this in a function.
                                                                                                                                  +
                                                                                                                                  6089
                                                                                                                                  +
                                                                                                                                  6090 /* Since 1 block can be at most max-block-size, if that much space is free, then definitely one
                                                                                                                                  +
                                                                                                                                  6091 * can enqueue onto m_snd_buf. Note that if less than max-block-size space is free, it would
                                                                                                                                  +
                                                                                                                                  6092 * still be possible to enqueue a smaller block; yet we still return false. We are intentionally
                                                                                                                                  +
                                                                                                                                  6093 * conservative, because we are guaranteeing ANY one enqueueing will work. More importantly, this
                                                                                                                                  +
                                                                                                                                  6094 * guarantees our Socket_buffer scheme (see class doc header) to guarantee constant-time
                                                                                                                                  +
                                                                                                                                  6095 * dequeueing will work.
                                                                                                                                  +
                                                                                                                                  6096 *
                                                                                                                                  +
                                                                                                                                  6097 * We're not overly conservative, either; i.e., no one is likely to complain this policy is too
                                                                                                                                  +
                                                                                                                                  6098 * stingy. */
                                                                                                                                  +
                                                                                                                                  6099 return sock->m_snd_buf.data_size() + sock->max_block_size()
                                                                                                                                  +
                                                                                                                                  6100 <= sock->opt(sock->m_opts.m_st_snd_buf_max_size);
                                                                                                                                  6101}
                                                                                                                                  6102
                                                                                                                                  - -
                                                                                                                                  6104{
                                                                                                                                  -
                                                                                                                                  6105 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  6106
                                                                                                                                  -
                                                                                                                                  6107 FLOW_LOG_TRACE('[' << sock << "] changing state from [" <<
                                                                                                                                  -
                                                                                                                                  6108 sock->m_int_state << "] to [" << new_state << "].");
                                                                                                                                  -
                                                                                                                                  6109 sock->m_int_state = new_state;
                                                                                                                                  -
                                                                                                                                  6110}
                                                                                                                                  -
                                                                                                                                  6111
                                                                                                                                  - -
                                                                                                                                  6113{
                                                                                                                                  -
                                                                                                                                  6114 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  6115
                                                                                                                                  -
                                                                                                                                  6116 // @todo Add TRACE logging.
                                                                                                                                  + +
                                                                                                                                  6104{
                                                                                                                                  +
                                                                                                                                  6105 // See doc comment for rationale for keeping this in a function.
                                                                                                                                  +
                                                                                                                                  6106 return !sock->m_rcv_buf.empty();
                                                                                                                                  +
                                                                                                                                  6107}
                                                                                                                                  +
                                                                                                                                  6108
                                                                                                                                  + +
                                                                                                                                  6110{
                                                                                                                                  +
                                                                                                                                  6111 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  6112
                                                                                                                                  +
                                                                                                                                  6113 FLOW_LOG_TRACE('[' << sock << "] changing state from [" <<
                                                                                                                                  +
                                                                                                                                  6114 sock->m_int_state << "] to [" << new_state << "].");
                                                                                                                                  +
                                                                                                                                  6115 sock->m_int_state = new_state;
                                                                                                                                  +
                                                                                                                                  6116}
                                                                                                                                  6117
                                                                                                                                  -
                                                                                                                                  6118 sock->m_state = state;
                                                                                                                                  -
                                                                                                                                  6119 if (state == Peer_socket::State::S_OPEN)
                                                                                                                                  -
                                                                                                                                  6120 {
                                                                                                                                  -
                                                                                                                                  6121 sock->m_open_sub_state = open_sub_state;
                                                                                                                                  -
                                                                                                                                  6122 }
                                                                                                                                  -
                                                                                                                                  6123 else // (state == Peer_socket::State::S_CLOSED)
                                                                                                                                  -
                                                                                                                                  6124 {
                                                                                                                                  -
                                                                                                                                  6125 /* Important convention: S_CLOSED means socket is permanently incapable of sending or
                                                                                                                                  -
                                                                                                                                  6126 * receiving more data. At this point the originating Node removes the socket from its internal
                                                                                                                                  -
                                                                                                                                  6127 * structures. Therefore, the Node itself may even go away -- while this Peer_socket still
                                                                                                                                  -
                                                                                                                                  6128 * exists. Since we use shared_ptr when giving our socket objects, that's fine -- but we want to
                                                                                                                                  -
                                                                                                                                  6129 * avoid returning an invalid Node* in node(). So, when S_CLOSED, sock->m_node = 0. */
                                                                                                                                  -
                                                                                                                                  6130 sock->m_node = 0;
                                                                                                                                  -
                                                                                                                                  6131 }
                                                                                                                                  -
                                                                                                                                  6132}
                                                                                                                                  -
                                                                                                                                  6133
                                                                                                                                  -
                                                                                                                                  6134void Node::sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code& disconnect_cause, bool close)
                                                                                                                                  -
                                                                                                                                  6135{
                                                                                                                                  -
                                                                                                                                  6136 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  6137
                                                                                                                                  -
                                                                                                                                  6138 sock->m_disconnect_cause = disconnect_cause;
                                                                                                                                  + +
                                                                                                                                  6119{
                                                                                                                                  +
                                                                                                                                  6120 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  6121
                                                                                                                                  +
                                                                                                                                  6122 // @todo Add TRACE logging.
                                                                                                                                  +
                                                                                                                                  6123
                                                                                                                                  +
                                                                                                                                  6124 sock->m_state = state;
                                                                                                                                  +
                                                                                                                                  6125 if (state == Peer_socket::State::S_OPEN)
                                                                                                                                  +
                                                                                                                                  6126 {
                                                                                                                                  +
                                                                                                                                  6127 sock->m_open_sub_state = open_sub_state;
                                                                                                                                  +
                                                                                                                                  6128 }
                                                                                                                                  +
                                                                                                                                  6129 else // (state == Peer_socket::State::S_CLOSED)
                                                                                                                                  +
                                                                                                                                  6130 {
                                                                                                                                  +
                                                                                                                                  6131 /* Important convention: S_CLOSED means socket is permanently incapable of sending or
                                                                                                                                  +
                                                                                                                                  6132 * receiving more data. At this point the originating Node removes the socket from its internal
                                                                                                                                  +
                                                                                                                                  6133 * structures. Therefore, the Node itself may even go away -- while this Peer_socket still
                                                                                                                                  +
                                                                                                                                  6134 * exists. Since we use shared_ptr when giving our socket objects, that's fine -- but we want to
                                                                                                                                  +
                                                                                                                                  6135 * avoid returning an invalid Node* in node(). So, when S_CLOSED, sock->m_node = 0. */
                                                                                                                                  +
                                                                                                                                  6136 sock->m_node = 0;
                                                                                                                                  +
                                                                                                                                  6137 }
                                                                                                                                  +
                                                                                                                                  6138}
                                                                                                                                  6139
                                                                                                                                  -
                                                                                                                                  6140 if (close)
                                                                                                                                  -
                                                                                                                                  6141 {
                                                                                                                                  -
                                                                                                                                  6142 // DONE.
                                                                                                                                  -
                                                                                                                                  6143 sock_set_state(sock, Peer_socket::State::S_CLOSED); // Reentrant mutex => OK.
                                                                                                                                  -
                                                                                                                                  6144 sock_free_memory(sock);
                                                                                                                                  -
                                                                                                                                  6145 }
                                                                                                                                  -
                                                                                                                                  6146 else
                                                                                                                                  +
                                                                                                                                  6140void Node::sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code& disconnect_cause, bool close)
                                                                                                                                  +
                                                                                                                                  6141{
                                                                                                                                  +
                                                                                                                                  6142 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  6143
                                                                                                                                  +
                                                                                                                                  6144 sock->m_disconnect_cause = disconnect_cause;
                                                                                                                                  +
                                                                                                                                  6145
                                                                                                                                  +
                                                                                                                                  6146 if (close)
                                                                                                                                  6147 {
                                                                                                                                  -
                                                                                                                                  6148 // This socket is screwed, but let user get any remaining buffer data out.
                                                                                                                                  -
                                                                                                                                  6149
                                                                                                                                  -
                                                                                                                                  6150 // Reentrant mutex => OK:
                                                                                                                                  - -
                                                                                                                                  6152 }
                                                                                                                                  -
                                                                                                                                  6153}
                                                                                                                                  -
                                                                                                                                  6154
                                                                                                                                  - -
                                                                                                                                  6156{
                                                                                                                                  -
                                                                                                                                  6157 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  6158
                                                                                                                                  -
                                                                                                                                  6159 // Sanity-check pre-conditions. (Basically ensure disconnect_detected(err_code, false) was previously called.)
                                                                                                                                  -
                                                                                                                                  6160 assert(sock->m_disconnect_cause);
                                                                                                                                  -
                                                                                                                                  6161 assert((sock->m_state == Peer_socket::State::S_OPEN)
                                                                                                                                  -
                                                                                                                                  6162 && (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  -
                                                                                                                                  6163
                                                                                                                                  -
                                                                                                                                  6164 sock_set_state(sock, Peer_socket::State::S_CLOSED); // Reentrant mutex => OK.
                                                                                                                                  -
                                                                                                                                  6165 sock_free_memory(sock);
                                                                                                                                  -
                                                                                                                                  6166}
                                                                                                                                  -
                                                                                                                                  6167
                                                                                                                                  - -
                                                                                                                                  6169{
                                                                                                                                  -
                                                                                                                                  6170 sock->m_rcv_buf.clear();
                                                                                                                                  -
                                                                                                                                  6171 sock->m_snd_buf.clear();
                                                                                                                                  -
                                                                                                                                  6172 sock->m_rcv_packets_with_gaps.clear();
                                                                                                                                  -
                                                                                                                                  6173 sock->m_rcv_reassembly_q_data_size = 0;
                                                                                                                                  -
                                                                                                                                  6174 sock->m_snd_flying_pkts_by_sent_when.clear();
                                                                                                                                  -
                                                                                                                                  6175 sock->m_snd_flying_pkts_by_seq_num.clear();
                                                                                                                                  -
                                                                                                                                  6176 sock->m_snd_rexmit_q.clear();
                                                                                                                                  -
                                                                                                                                  6177 sock->m_serialized_metadata.make_zero(); // clear() does not deallocate, but this does.
                                                                                                                                  -
                                                                                                                                  6178 sock->m_rcv_syn_rcvd_data_q.clear();
                                                                                                                                  -
                                                                                                                                  6179 sock->m_rcv_pending_acks.clear();
                                                                                                                                  -
                                                                                                                                  6180 sock->m_rcv_acked_packets.clear();
                                                                                                                                  -
                                                                                                                                  6181 sock->m_snd_pacing_data.m_packet_q.clear();
                                                                                                                                  -
                                                                                                                                  6182
                                                                                                                                  -
                                                                                                                                  6183 /* Destroy memory stored in m_snd_cong_ctl which may be non-O(1). This is a little questionable;
                                                                                                                                  -
                                                                                                                                  6184 * maybe should leave it to destructor? However since we store it as a pointer and are to free
                                                                                                                                  -
                                                                                                                                  6185 * any "significant" memory, and this may be significant, we may as well just delete it. */
                                                                                                                                  -
                                                                                                                                  6186 sock->m_snd_cong_ctl.reset();
                                                                                                                                  -
                                                                                                                                  6187 // Same deal.
                                                                                                                                  -
                                                                                                                                  6188 sock->m_snd_bandwidth_estimator.reset();
                                                                                                                                  -
                                                                                                                                  6189}
                                                                                                                                  -
                                                                                                                                  6190
                                                                                                                                  - -
                                                                                                                                  6192{
                                                                                                                                  -
                                                                                                                                  6193 // We are in thread U != W.
                                                                                                                                  -
                                                                                                                                  6194
                                                                                                                                  -
                                                                                                                                  6195 if (!running())
                                                                                                                                  -
                                                                                                                                  6196 {
                                                                                                                                  - -
                                                                                                                                  6198 return false;
                                                                                                                                  -
                                                                                                                                  6199 }
                                                                                                                                  -
                                                                                                                                  6200 // else
                                                                                                                                  -
                                                                                                                                  6201
                                                                                                                                  -
                                                                                                                                  6202 /* We just want to replace m_opts with a copy of opts. First validate opts (including with
                                                                                                                                  -
                                                                                                                                  6203 * respect to m_opts, and also check for invalid values and such), then copy it over. */
                                                                                                                                  -
                                                                                                                                  6204
                                                                                                                                  -
                                                                                                                                  6205 // Log new options values. A bit computationally expensive so just use TRACE for now. @todo Reconsider?
                                                                                                                                  -
                                                                                                                                  6206 FLOW_LOG_TRACE("For [" << sock << "]:\n\n" << opts);
                                                                                                                                  +
                                                                                                                                  6148 // DONE.
                                                                                                                                  +
                                                                                                                                  6149 sock_set_state(sock, Peer_socket::State::S_CLOSED); // Reentrant mutex => OK.
                                                                                                                                  +
                                                                                                                                  6150 sock_free_memory(sock);
                                                                                                                                  +
                                                                                                                                  6151 }
                                                                                                                                  +
                                                                                                                                  6152 else
                                                                                                                                  +
                                                                                                                                  6153 {
                                                                                                                                  +
                                                                                                                                  6154 // This socket is screwed, but let user get any remaining buffer data out.
                                                                                                                                  +
                                                                                                                                  6155
                                                                                                                                  +
                                                                                                                                  6156 // Reentrant mutex => OK:
                                                                                                                                  + +
                                                                                                                                  6158 }
                                                                                                                                  +
                                                                                                                                  6159}
                                                                                                                                  +
                                                                                                                                  6160
                                                                                                                                  + +
                                                                                                                                  6162{
                                                                                                                                  +
                                                                                                                                  6163 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  6164
                                                                                                                                  +
                                                                                                                                  6165 // Sanity-check pre-conditions. (Basically ensure disconnect_detected(err_code, false) was previously called.)
                                                                                                                                  +
                                                                                                                                  6166 assert(sock->m_disconnect_cause);
                                                                                                                                  +
                                                                                                                                  6167 assert((sock->m_state == Peer_socket::State::S_OPEN)
                                                                                                                                  +
                                                                                                                                  6168 && (sock->m_open_sub_state == Peer_socket::Open_sub_state::S_DISCONNECTING));
                                                                                                                                  +
                                                                                                                                  6169
                                                                                                                                  +
                                                                                                                                  6170 sock_set_state(sock, Peer_socket::State::S_CLOSED); // Reentrant mutex => OK.
                                                                                                                                  +
                                                                                                                                  6171 sock_free_memory(sock);
                                                                                                                                  +
                                                                                                                                  6172}
                                                                                                                                  +
                                                                                                                                  6173
                                                                                                                                  + +
                                                                                                                                  6175{
                                                                                                                                  +
                                                                                                                                  6176 sock->m_rcv_buf.clear();
                                                                                                                                  +
                                                                                                                                  6177 sock->m_snd_buf.clear();
                                                                                                                                  +
                                                                                                                                  6178 sock->m_rcv_packets_with_gaps.clear();
                                                                                                                                  +
                                                                                                                                  6179 sock->m_rcv_reassembly_q_data_size = 0;
                                                                                                                                  +
                                                                                                                                  6180 sock->m_snd_flying_pkts_by_sent_when.clear();
                                                                                                                                  +
                                                                                                                                  6181 sock->m_snd_flying_pkts_by_seq_num.clear();
                                                                                                                                  +
                                                                                                                                  6182 sock->m_snd_rexmit_q.clear();
                                                                                                                                  +
                                                                                                                                  6183 sock->m_serialized_metadata.make_zero(); // clear() does not deallocate, but this does.
                                                                                                                                  +
                                                                                                                                  6184 sock->m_rcv_syn_rcvd_data_q.clear();
                                                                                                                                  +
                                                                                                                                  6185 sock->m_rcv_pending_acks.clear();
                                                                                                                                  +
                                                                                                                                  6186 sock->m_rcv_acked_packets.clear();
                                                                                                                                  +
                                                                                                                                  6187 sock->m_snd_pacing_data.m_packet_q.clear();
                                                                                                                                  +
                                                                                                                                  6188
                                                                                                                                  +
                                                                                                                                  6189 /* Destroy memory stored in m_snd_cong_ctl which may be non-O(1). This is a little questionable;
                                                                                                                                  +
                                                                                                                                  6190 * maybe should leave it to destructor? However since we store it as a pointer and are to free
                                                                                                                                  +
                                                                                                                                  6191 * any "significant" memory, and this may be significant, we may as well just delete it. */
                                                                                                                                  +
                                                                                                                                  6192 sock->m_snd_cong_ctl.reset();
                                                                                                                                  +
                                                                                                                                  6193 // Same deal.
                                                                                                                                  +
                                                                                                                                  6194 sock->m_snd_bandwidth_estimator.reset();
                                                                                                                                  +
                                                                                                                                  6195}
                                                                                                                                  +
                                                                                                                                  6196
                                                                                                                                  + +
                                                                                                                                  6198{
                                                                                                                                  +
                                                                                                                                  6199 // We are in thread U != W.
                                                                                                                                  +
                                                                                                                                  6200
                                                                                                                                  +
                                                                                                                                  6201 if (!running())
                                                                                                                                  +
                                                                                                                                  6202 {
                                                                                                                                  + +
                                                                                                                                  6204 return false;
                                                                                                                                  +
                                                                                                                                  6205 }
                                                                                                                                  +
                                                                                                                                  6206 // else
                                                                                                                                  6207
                                                                                                                                  -
                                                                                                                                  6208 // Will be writing sock->m_opts if all goes well, so must acquire exclusive ownership of m_opts.
                                                                                                                                  -
                                                                                                                                  6209 Peer_socket::Options_lock lock(sock->m_opts_mutex);
                                                                                                                                  +
                                                                                                                                  6208 /* We just want to replace m_opts with a copy of opts. First validate opts (including with
                                                                                                                                  +
                                                                                                                                  6209 * respect to m_opts, and also check for invalid values and such), then copy it over. */
                                                                                                                                  6210
                                                                                                                                  -
                                                                                                                                  6211 /* Validate the new option set (including ensuring they're not changing static options' values).
                                                                                                                                  -
                                                                                                                                  6212 * Note that an explicit pre-condition of this method is that m_opts_mutex is locked if needed,
                                                                                                                                  -
                                                                                                                                  6213 * hence the above locking statement is not below this call. */
                                                                                                                                  -
                                                                                                                                  6214 if (!sock_validate_options(opts, &sock->m_opts, err_code))
                                                                                                                                  -
                                                                                                                                  6215 {
                                                                                                                                  -
                                                                                                                                  6216 return false;
                                                                                                                                  -
                                                                                                                                  6217 }
                                                                                                                                  -
                                                                                                                                  6218 // else
                                                                                                                                  -
                                                                                                                                  6219
                                                                                                                                  -
                                                                                                                                  6220 // Boo-ya.
                                                                                                                                  -
                                                                                                                                  6221 sock->m_opts = opts;
                                                                                                                                  -
                                                                                                                                  6222 return true;
                                                                                                                                  -
                                                                                                                                  6223} // Node::sock_set_options()
                                                                                                                                  -
                                                                                                                                  6224
                                                                                                                                  -
                                                                                                                                  6225/// @cond
                                                                                                                                  -
                                                                                                                                  6226/* -^- Doxygen, please ignore the following. (Don't want docs generated for temp macro; this is more maintainable
                                                                                                                                  -
                                                                                                                                  6227 * than specifying the macro name to omit it, in Doxygen-config EXCLUDE_SYMBOLS.) */
                                                                                                                                  -
                                                                                                                                  6228
                                                                                                                                  -
                                                                                                                                  6229/* Normaly I try to avoid macro cleverness, but in this case to get a nice printout we need the
                                                                                                                                  -
                                                                                                                                  6230 * # technique, and also this eliminates quite a bit of repetition. So let's.... */
                                                                                                                                  -
                                                                                                                                  6231#define VALIDATE_STATIC_OPTION(ARG_opt) \
                                                                                                                                  -
                                                                                                                                  6232 validate_static_option(opts.ARG_opt, prev_opts->ARG_opt, #ARG_opt, err_code)
                                                                                                                                  -
                                                                                                                                  6233#define VALIDATE_CHECK(ARG_check) \
                                                                                                                                  -
                                                                                                                                  6234 validate_option_check(ARG_check, #ARG_check, err_code)
                                                                                                                                  -
                                                                                                                                  6235
                                                                                                                                  -
                                                                                                                                  6236// -v- Doxygen, please stop ignoring.
                                                                                                                                  -
                                                                                                                                  6237/// @endcond
                                                                                                                                  -
                                                                                                                                  6238
                                                                                                                                  - -
                                                                                                                                  6240 const Peer_socket_options* prev_opts,
                                                                                                                                  -
                                                                                                                                  6241 Error_code* err_code) const
                                                                                                                                  -
                                                                                                                                  6242{
                                                                                                                                  -
                                                                                                                                  6243 /* We are to validate the given set of per-socket option values. If prev_opts, then the context
                                                                                                                                  -
                                                                                                                                  6244 * is that an already-existing socket (with already-set options) is being called with
                                                                                                                                  -
                                                                                                                                  6245 * set_options(), i.e. user is modifying options for an existing socket. In that case we must
                                                                                                                                  -
                                                                                                                                  6246 * ensure that no static (unchangeable) option's value would be changed by this.
                                                                                                                                  -
                                                                                                                                  6247 *
                                                                                                                                  -
                                                                                                                                  6248 * If not prev_opts, then the per-socket options within the global per-Node Node_options object
                                                                                                                                  -
                                                                                                                                  6249 * are being changed. Per-socket options in that context are always dynamic, since if they were
                                                                                                                                  -
                                                                                                                                  6250 * static, there'd be no point in making the per-socket in the first place. So in that case that
                                                                                                                                  -
                                                                                                                                  6251 * static option check is to be skipped.
                                                                                                                                  -
                                                                                                                                  6252 *
                                                                                                                                  -
                                                                                                                                  6253 * Finally, we must check for individual integrity of the specified values (including consistency
                                                                                                                                  -
                                                                                                                                  6254 * with other option values). */
                                                                                                                                  -
                                                                                                                                  6255
                                                                                                                                  -
                                                                                                                                  6256 using boost::chrono::seconds;
                                                                                                                                  -
                                                                                                                                  6257 using std::numeric_limits;
                                                                                                                                  -
                                                                                                                                  6258
                                                                                                                                  -
                                                                                                                                  6259 // We are in thread U != W or in thread W.
                                                                                                                                  -
                                                                                                                                  6260
                                                                                                                                  -
                                                                                                                                  6261 if (prev_opts)
                                                                                                                                  -
                                                                                                                                  6262 {
                                                                                                                                  -
                                                                                                                                  6263 /* As explained above, they're trying to change an existing socket's option values. Ensure
                                                                                                                                  -
                                                                                                                                  6264 * all the static options' values are the same in opts and prev_opts. */
                                                                                                                                  -
                                                                                                                                  6265
                                                                                                                                  -
                                                                                                                                  6266 // Explicitly documented pre-condition is that *prev_opts is already locked if necessary. So don't lock.
                                                                                                                                  -
                                                                                                                                  6267
                                                                                                                                  -
                                                                                                                                  6268 const bool static_ok
                                                                                                                                  -
                                                                                                                                  6269 = VALIDATE_STATIC_OPTION(m_st_max_block_size) &&
                                                                                                                                  -
                                                                                                                                  6270 VALIDATE_STATIC_OPTION(m_st_connect_retransmit_period) &&
                                                                                                                                  -
                                                                                                                                  6271 VALIDATE_STATIC_OPTION(m_st_connect_retransmit_timeout) &&
                                                                                                                                  -
                                                                                                                                  6272 VALIDATE_STATIC_OPTION(m_st_snd_buf_max_size) &&
                                                                                                                                  -
                                                                                                                                  6273 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size) &&
                                                                                                                                  -
                                                                                                                                  6274 VALIDATE_STATIC_OPTION(m_st_rcv_flow_control_on) &&
                                                                                                                                  -
                                                                                                                                  6275 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size_slack_percent) &&
                                                                                                                                  -
                                                                                                                                  6276 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size_to_advertise_percent) &&
                                                                                                                                  -
                                                                                                                                  6277 VALIDATE_STATIC_OPTION(m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent) &&
                                                                                                                                  -
                                                                                                                                  6278 VALIDATE_STATIC_OPTION(m_st_delayed_ack_timer_period) &&
                                                                                                                                  -
                                                                                                                                  6279 VALIDATE_STATIC_OPTION(m_st_max_full_blocks_before_ack_send) &&
                                                                                                                                  -
                                                                                                                                  6280 VALIDATE_STATIC_OPTION(m_st_rexmit_on) &&
                                                                                                                                  -
                                                                                                                                  6281 VALIDATE_STATIC_OPTION(m_st_max_rexmissions_per_packet) &&
                                                                                                                                  -
                                                                                                                                  6282 VALIDATE_STATIC_OPTION(m_st_init_drop_timeout) &&
                                                                                                                                  -
                                                                                                                                  6283 VALIDATE_STATIC_OPTION(m_st_snd_pacing_enabled) &&
                                                                                                                                  -
                                                                                                                                  6284 VALIDATE_STATIC_OPTION(m_st_snd_bandwidth_est_sample_period_floor) &&
                                                                                                                                  -
                                                                                                                                  6285 VALIDATE_STATIC_OPTION(m_st_cong_ctl_strategy) &&
                                                                                                                                  -
                                                                                                                                  6286 VALIDATE_STATIC_OPTION(m_st_cong_ctl_init_cong_wnd_blocks) &&
                                                                                                                                  -
                                                                                                                                  6287 VALIDATE_STATIC_OPTION(m_st_cong_ctl_max_cong_wnd_blocks) &&
                                                                                                                                  -
                                                                                                                                  6288 VALIDATE_STATIC_OPTION(m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks) &&
                                                                                                                                  -
                                                                                                                                  6289 VALIDATE_STATIC_OPTION(m_st_cong_ctl_classic_wnd_decay_percent) &&
                                                                                                                                  -
                                                                                                                                  6290 VALIDATE_STATIC_OPTION(m_st_drop_packet_exactly_after_drop_timeout) &&
                                                                                                                                  -
                                                                                                                                  6291 VALIDATE_STATIC_OPTION(m_st_drop_all_on_drop_timeout) &&
                                                                                                                                  -
                                                                                                                                  6292 VALIDATE_STATIC_OPTION(m_st_out_of_order_ack_restarts_drop_timer);
                                                                                                                                  -
                                                                                                                                  6293
                                                                                                                                  -
                                                                                                                                  6294 if (!static_ok)
                                                                                                                                  -
                                                                                                                                  6295 {
                                                                                                                                  -
                                                                                                                                  6296 // validate_static_option() has set *err_code.
                                                                                                                                  -
                                                                                                                                  6297 return false;
                                                                                                                                  -
                                                                                                                                  6298 }
                                                                                                                                  -
                                                                                                                                  6299 // else
                                                                                                                                  -
                                                                                                                                  6300 } // if (prev_opts)
                                                                                                                                  -
                                                                                                                                  6301
                                                                                                                                  -
                                                                                                                                  6302 // Now sanity-check the values themselves. @todo Comment and reconsider these?
                                                                                                                                  -
                                                                                                                                  6303 const bool checks_ok
                                                                                                                                  -
                                                                                                                                  6304 = VALIDATE_CHECK(opts.m_st_max_block_size >= 512) &&
                                                                                                                                  -
                                                                                                                                  6305 VALIDATE_CHECK(opts.m_st_connect_retransmit_period.count() > 0) &&
                                                                                                                                  -
                                                                                                                                  6306 VALIDATE_CHECK(opts.m_st_connect_retransmit_timeout.count() > 0) &&
                                                                                                                                  -
                                                                                                                                  6307 VALIDATE_CHECK(opts.m_st_snd_buf_max_size >= 4 * opts.m_st_max_block_size) &&
                                                                                                                                  -
                                                                                                                                  6308 VALIDATE_CHECK(opts.m_st_rcv_buf_max_size >= 4 * opts.m_st_max_block_size) &&
                                                                                                                                  - -
                                                                                                                                  6310 VALIDATE_CHECK(opts.m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent >= 100) &&
                                                                                                                                  -
                                                                                                                                  6311 VALIDATE_CHECK(opts.m_st_delayed_ack_timer_period <= seconds(1)) &&
                                                                                                                                  -
                                                                                                                                  6312 VALIDATE_CHECK(util::in_closed_range(Fine_duration::zero(),
                                                                                                                                  - -
                                                                                                                                  6314 Fine_duration(seconds(1)))) &&
                                                                                                                                  -
                                                                                                                                  6315 VALIDATE_CHECK(opts.m_st_max_full_blocks_before_ack_send >= 1) &&
                                                                                                                                  -
                                                                                                                                  6316 VALIDATE_CHECK(opts.m_st_max_rexmissions_per_packet >= 1) &&
                                                                                                                                  -
                                                                                                                                  6317 VALIDATE_CHECK(opts.m_st_max_rexmissions_per_packet <= numeric_limits<Low_lvl_packet::rexmit_id_t>::max());
                                                                                                                                  -
                                                                                                                                  6318 VALIDATE_CHECK(opts.m_st_init_drop_timeout.count() > 0) &&
                                                                                                                                  -
                                                                                                                                  6319 VALIDATE_CHECK(opts.m_st_snd_bandwidth_est_sample_period_floor.count() > 0) &&
                                                                                                                                  - -
                                                                                                                                  6321 VALIDATE_CHECK
                                                                                                                                  - -
                                                                                                                                  6323 VALIDATE_CHECK(opts.m_st_cong_ctl_cong_avoidance_increment_blocks < 20) &&
                                                                                                                                  -
                                                                                                                                  6324 VALIDATE_CHECK(opts.m_st_cong_ctl_classic_wnd_decay_percent <= 100) &&
                                                                                                                                  -
                                                                                                                                  6325 VALIDATE_CHECK(util::in_closed_range<size_t>(1, opts.m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks, 10)) &&
                                                                                                                                  -
                                                                                                                                  6326 VALIDATE_CHECK(opts.m_dyn_drop_timeout_ceiling > 4 * opts.m_st_init_drop_timeout) &&
                                                                                                                                  -
                                                                                                                                  6327 VALIDATE_CHECK(opts.m_dyn_drop_timeout_backoff_factor >= 1) &&
                                                                                                                                  -
                                                                                                                                  6328 VALIDATE_CHECK(opts.m_dyn_rcv_wnd_recovery_timer_period.count() > 0);
                                                                                                                                  -
                                                                                                                                  6329
                                                                                                                                  -
                                                                                                                                  6330 // On error, validate_option_check() has set *err_code.
                                                                                                                                  -
                                                                                                                                  6331
                                                                                                                                  -
                                                                                                                                  6332 return checks_ok;
                                                                                                                                  -
                                                                                                                                  6333
                                                                                                                                  -
                                                                                                                                  6334#undef VALIDATE_CHECK
                                                                                                                                  -
                                                                                                                                  6335#undef VALIDATE_STATIC_OPTION
                                                                                                                                  -
                                                                                                                                  6336} // Node::sock_validate_options()
                                                                                                                                  +
                                                                                                                                  6211 // Log new options values. A bit computationally expensive so just use TRACE for now. @todo Reconsider?
                                                                                                                                  +
                                                                                                                                  6212 FLOW_LOG_TRACE("For [" << sock << "]:\n\n" << opts);
                                                                                                                                  +
                                                                                                                                  6213
                                                                                                                                  +
                                                                                                                                  6214 // Will be writing sock->m_opts if all goes well, so must acquire exclusive ownership of m_opts.
                                                                                                                                  +
                                                                                                                                  6215 Peer_socket::Options_lock lock(sock->m_opts_mutex);
                                                                                                                                  +
                                                                                                                                  6216
                                                                                                                                  +
                                                                                                                                  6217 /* Validate the new option set (including ensuring they're not changing static options' values).
                                                                                                                                  +
                                                                                                                                  6218 * Note that an explicit pre-condition of this method is that m_opts_mutex is locked if needed,
                                                                                                                                  +
                                                                                                                                  6219 * hence the above locking statement is not below this call. */
                                                                                                                                  +
                                                                                                                                  6220 if (!sock_validate_options(opts, &sock->m_opts, err_code))
                                                                                                                                  +
                                                                                                                                  6221 {
                                                                                                                                  +
                                                                                                                                  6222 return false;
                                                                                                                                  +
                                                                                                                                  6223 }
                                                                                                                                  +
                                                                                                                                  6224 // else
                                                                                                                                  +
                                                                                                                                  6225
                                                                                                                                  +
                                                                                                                                  6226 // Boo-ya.
                                                                                                                                  +
                                                                                                                                  6227 sock->m_opts = opts;
                                                                                                                                  +
                                                                                                                                  6228 return true;
                                                                                                                                  +
                                                                                                                                  6229} // Node::sock_set_options()
                                                                                                                                  +
                                                                                                                                  6230
                                                                                                                                  +
                                                                                                                                  6231/// @cond
                                                                                                                                  +
                                                                                                                                  6232/* -^- Doxygen, please ignore the following. (Don't want docs generated for temp macro; this is more maintainable
                                                                                                                                  +
                                                                                                                                  6233 * than specifying the macro name to omit it, in Doxygen-config EXCLUDE_SYMBOLS.) */
                                                                                                                                  +
                                                                                                                                  6234
                                                                                                                                  +
                                                                                                                                  6235/* Normaly I try to avoid macro cleverness, but in this case to get a nice printout we need the
                                                                                                                                  +
                                                                                                                                  6236 * # technique, and also this eliminates quite a bit of repetition. So let's.... */
                                                                                                                                  +
                                                                                                                                  6237#define VALIDATE_STATIC_OPTION(ARG_opt) \
                                                                                                                                  +
                                                                                                                                  6238 validate_static_option(opts.ARG_opt, prev_opts->ARG_opt, #ARG_opt, err_code)
                                                                                                                                  +
                                                                                                                                  6239#define VALIDATE_CHECK(ARG_check) \
                                                                                                                                  +
                                                                                                                                  6240 validate_option_check(ARG_check, #ARG_check, err_code)
                                                                                                                                  +
                                                                                                                                  6241
                                                                                                                                  +
                                                                                                                                  6242// -v- Doxygen, please stop ignoring.
                                                                                                                                  +
                                                                                                                                  6243/// @endcond
                                                                                                                                  +
                                                                                                                                  6244
                                                                                                                                  + +
                                                                                                                                  6246 const Peer_socket_options* prev_opts,
                                                                                                                                  +
                                                                                                                                  6247 Error_code* err_code) const
                                                                                                                                  +
                                                                                                                                  6248{
                                                                                                                                  +
                                                                                                                                  6249 /* We are to validate the given set of per-socket option values. If prev_opts, then the context
                                                                                                                                  +
                                                                                                                                  6250 * is that an already-existing socket (with already-set options) is being called with
                                                                                                                                  +
                                                                                                                                  6251 * set_options(), i.e. user is modifying options for an existing socket. In that case we must
                                                                                                                                  +
                                                                                                                                  6252 * ensure that no static (unchangeable) option's value would be changed by this.
                                                                                                                                  +
                                                                                                                                  6253 *
                                                                                                                                  +
                                                                                                                                  6254 * If not prev_opts, then the per-socket options within the global per-Node Node_options object
                                                                                                                                  +
                                                                                                                                  6255 * are being changed. Per-socket options in that context are always dynamic, since if they were
                                                                                                                                  +
                                                                                                                                  6256 * static, there'd be no point in making the per-socket in the first place. So in that case that
                                                                                                                                  +
                                                                                                                                  6257 * static option check is to be skipped.
                                                                                                                                  +
                                                                                                                                  6258 *
                                                                                                                                  +
                                                                                                                                  6259 * Finally, we must check for individual integrity of the specified values (including consistency
                                                                                                                                  +
                                                                                                                                  6260 * with other option values). */
                                                                                                                                  +
                                                                                                                                  6261
                                                                                                                                  +
                                                                                                                                  6262 using boost::chrono::seconds;
                                                                                                                                  +
                                                                                                                                  6263 using std::numeric_limits;
                                                                                                                                  +
                                                                                                                                  6264
                                                                                                                                  +
                                                                                                                                  6265 // We are in thread U != W or in thread W.
                                                                                                                                  +
                                                                                                                                  6266
                                                                                                                                  +
                                                                                                                                  6267 if (prev_opts)
                                                                                                                                  +
                                                                                                                                  6268 {
                                                                                                                                  +
                                                                                                                                  6269 /* As explained above, they're trying to change an existing socket's option values. Ensure
                                                                                                                                  +
                                                                                                                                  6270 * all the static options' values are the same in opts and prev_opts. */
                                                                                                                                  +
                                                                                                                                  6271
                                                                                                                                  +
                                                                                                                                  6272 // Explicitly documented pre-condition is that *prev_opts is already locked if necessary. So don't lock.
                                                                                                                                  +
                                                                                                                                  6273
                                                                                                                                  +
                                                                                                                                  6274 const bool static_ok
                                                                                                                                  +
                                                                                                                                  6275 = VALIDATE_STATIC_OPTION(m_st_max_block_size) &&
                                                                                                                                  +
                                                                                                                                  6276 VALIDATE_STATIC_OPTION(m_st_connect_retransmit_period) &&
                                                                                                                                  +
                                                                                                                                  6277 VALIDATE_STATIC_OPTION(m_st_connect_retransmit_timeout) &&
                                                                                                                                  +
                                                                                                                                  6278 VALIDATE_STATIC_OPTION(m_st_snd_buf_max_size) &&
                                                                                                                                  +
                                                                                                                                  6279 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size) &&
                                                                                                                                  +
                                                                                                                                  6280 VALIDATE_STATIC_OPTION(m_st_rcv_flow_control_on) &&
                                                                                                                                  +
                                                                                                                                  6281 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size_slack_percent) &&
                                                                                                                                  +
                                                                                                                                  6282 VALIDATE_STATIC_OPTION(m_st_rcv_buf_max_size_to_advertise_percent) &&
                                                                                                                                  +
                                                                                                                                  6283 VALIDATE_STATIC_OPTION(m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent) &&
                                                                                                                                  +
                                                                                                                                  6284 VALIDATE_STATIC_OPTION(m_st_delayed_ack_timer_period) &&
                                                                                                                                  +
                                                                                                                                  6285 VALIDATE_STATIC_OPTION(m_st_max_full_blocks_before_ack_send) &&
                                                                                                                                  +
                                                                                                                                  6286 VALIDATE_STATIC_OPTION(m_st_rexmit_on) &&
                                                                                                                                  +
                                                                                                                                  6287 VALIDATE_STATIC_OPTION(m_st_max_rexmissions_per_packet) &&
                                                                                                                                  +
                                                                                                                                  6288 VALIDATE_STATIC_OPTION(m_st_init_drop_timeout) &&
                                                                                                                                  +
                                                                                                                                  6289 VALIDATE_STATIC_OPTION(m_st_snd_pacing_enabled) &&
                                                                                                                                  +
                                                                                                                                  6290 VALIDATE_STATIC_OPTION(m_st_snd_bandwidth_est_sample_period_floor) &&
                                                                                                                                  +
                                                                                                                                  6291 VALIDATE_STATIC_OPTION(m_st_cong_ctl_strategy) &&
                                                                                                                                  +
                                                                                                                                  6292 VALIDATE_STATIC_OPTION(m_st_cong_ctl_init_cong_wnd_blocks) &&
                                                                                                                                  +
                                                                                                                                  6293 VALIDATE_STATIC_OPTION(m_st_cong_ctl_max_cong_wnd_blocks) &&
                                                                                                                                  +
                                                                                                                                  6294 VALIDATE_STATIC_OPTION(m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks) &&
                                                                                                                                  +
                                                                                                                                  6295 VALIDATE_STATIC_OPTION(m_st_cong_ctl_classic_wnd_decay_percent) &&
                                                                                                                                  +
                                                                                                                                  6296 VALIDATE_STATIC_OPTION(m_st_drop_packet_exactly_after_drop_timeout) &&
                                                                                                                                  +
                                                                                                                                  6297 VALIDATE_STATIC_OPTION(m_st_drop_all_on_drop_timeout) &&
                                                                                                                                  +
                                                                                                                                  6298 VALIDATE_STATIC_OPTION(m_st_out_of_order_ack_restarts_drop_timer);
                                                                                                                                  +
                                                                                                                                  6299
                                                                                                                                  +
                                                                                                                                  6300 if (!static_ok)
                                                                                                                                  +
                                                                                                                                  6301 {
                                                                                                                                  +
                                                                                                                                  6302 // validate_static_option() has set *err_code.
                                                                                                                                  +
                                                                                                                                  6303 return false;
                                                                                                                                  +
                                                                                                                                  6304 }
                                                                                                                                  +
                                                                                                                                  6305 // else
                                                                                                                                  +
                                                                                                                                  6306 } // if (prev_opts)
                                                                                                                                  +
                                                                                                                                  6307
                                                                                                                                  +
                                                                                                                                  6308 // Now sanity-check the values themselves. @todo Comment and reconsider these?
                                                                                                                                  +
                                                                                                                                  6309 const bool checks_ok
                                                                                                                                  +
                                                                                                                                  6310 = VALIDATE_CHECK(opts.m_st_max_block_size >= 512) &&
                                                                                                                                  +
                                                                                                                                  6311 VALIDATE_CHECK(opts.m_st_connect_retransmit_period.count() > 0) &&
                                                                                                                                  +
                                                                                                                                  6312 VALIDATE_CHECK(opts.m_st_connect_retransmit_timeout.count() > 0) &&
                                                                                                                                  +
                                                                                                                                  6313 VALIDATE_CHECK(opts.m_st_snd_buf_max_size >= 4 * opts.m_st_max_block_size) &&
                                                                                                                                  +
                                                                                                                                  6314 VALIDATE_CHECK(opts.m_st_rcv_buf_max_size >= 4 * opts.m_st_max_block_size) &&
                                                                                                                                  + +
                                                                                                                                  6316 VALIDATE_CHECK(opts.m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent >= 100) &&
                                                                                                                                  +
                                                                                                                                  6317 VALIDATE_CHECK(opts.m_st_delayed_ack_timer_period <= seconds(1)) &&
                                                                                                                                  +
                                                                                                                                  6318 VALIDATE_CHECK(util::in_closed_range(Fine_duration::zero(),
                                                                                                                                  + +
                                                                                                                                  6320 Fine_duration(seconds(1)))) &&
                                                                                                                                  +
                                                                                                                                  6321 VALIDATE_CHECK(opts.m_st_max_full_blocks_before_ack_send >= 1) &&
                                                                                                                                  +
                                                                                                                                  6322 VALIDATE_CHECK(opts.m_st_max_rexmissions_per_packet >= 1) &&
                                                                                                                                  +
                                                                                                                                  6323 VALIDATE_CHECK(opts.m_st_max_rexmissions_per_packet <= numeric_limits<Low_lvl_packet::rexmit_id_t>::max());
                                                                                                                                  +
                                                                                                                                  6324 VALIDATE_CHECK(opts.m_st_init_drop_timeout.count() > 0) &&
                                                                                                                                  +
                                                                                                                                  6325 VALIDATE_CHECK(opts.m_st_snd_bandwidth_est_sample_period_floor.count() > 0) &&
                                                                                                                                  + +
                                                                                                                                  6327 VALIDATE_CHECK
                                                                                                                                  + +
                                                                                                                                  6329 VALIDATE_CHECK(opts.m_st_cong_ctl_cong_avoidance_increment_blocks < 20) &&
                                                                                                                                  +
                                                                                                                                  6330 VALIDATE_CHECK(opts.m_st_cong_ctl_classic_wnd_decay_percent <= 100) &&
                                                                                                                                  +
                                                                                                                                  6331 VALIDATE_CHECK(util::in_closed_range<size_t>(1, opts.m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks, 10)) &&
                                                                                                                                  +
                                                                                                                                  6332 VALIDATE_CHECK(opts.m_dyn_drop_timeout_ceiling > 4 * opts.m_st_init_drop_timeout) &&
                                                                                                                                  +
                                                                                                                                  6333 VALIDATE_CHECK(opts.m_dyn_drop_timeout_backoff_factor >= 1) &&
                                                                                                                                  +
                                                                                                                                  6334 VALIDATE_CHECK(opts.m_dyn_rcv_wnd_recovery_timer_period.count() > 0);
                                                                                                                                  +
                                                                                                                                  6335
                                                                                                                                  +
                                                                                                                                  6336 // On error, validate_option_check() has set *err_code.
                                                                                                                                  6337
                                                                                                                                  - -
                                                                                                                                  6339{
                                                                                                                                  - - -
                                                                                                                                  6342 using boost::adopt_lock;
                                                                                                                                  +
                                                                                                                                  6338 return checks_ok;
                                                                                                                                  +
                                                                                                                                  6339
                                                                                                                                  +
                                                                                                                                  6340#undef VALIDATE_CHECK
                                                                                                                                  +
                                                                                                                                  6341#undef VALIDATE_STATIC_OPTION
                                                                                                                                  +
                                                                                                                                  6342} // Node::sock_validate_options()
                                                                                                                                  6343
                                                                                                                                  -
                                                                                                                                  6344 // We are in thread U != W.
                                                                                                                                  -
                                                                                                                                  6345
                                                                                                                                  -
                                                                                                                                  6346 Peer_socket_info stats;
                                                                                                                                  -
                                                                                                                                  6347 {
                                                                                                                                  -
                                                                                                                                  6348 /* WARNING!!! sock->m_mutex is locked, but WE must unlock it before returning! Can't leave that
                                                                                                                                  -
                                                                                                                                  6349 * to the caller, because we must unlock at a specific point below, right before post()ing
                                                                                                                                  -
                                                                                                                                  6350 * sock_info_worker() onto thread W. Use a Lock_guard that adopts an already-locked mutex. */
                                                                                                                                  -
                                                                                                                                  6351 Peer_socket::Lock_guard lock(sock->m_mutex, adopt_lock);
                                                                                                                                  -
                                                                                                                                  6352
                                                                                                                                  -
                                                                                                                                  6353 if (!running())
                                                                                                                                  -
                                                                                                                                  6354 {
                                                                                                                                  -
                                                                                                                                  6355 /* This is kind of a weird case, in that sock's Node having stopped running is a problem, but
                                                                                                                                  -
                                                                                                                                  6356 * in this case they just want the socket stats. The only reason we're in this method --
                                                                                                                                  -
                                                                                                                                  6357 * calling sock->info() did not simply return the stats itself -- is that there was a danger
                                                                                                                                  -
                                                                                                                                  6358 * thread W might change the stats, while we'd be copying them. Well, if !running() there is no
                                                                                                                                  -
                                                                                                                                  6359 * danger of that. So we can just: */
                                                                                                                                  -
                                                                                                                                  6360 sock_load_info_struct(sock, &stats);
                                                                                                                                  -
                                                                                                                                  6361 return stats;
                                                                                                                                  -
                                                                                                                                  6362 }
                                                                                                                                  -
                                                                                                                                  6363 // else
                                                                                                                                  -
                                                                                                                                  6364
                                                                                                                                  -
                                                                                                                                  6365 /* Okay -- Node is running and may change stats's source info at any time. Therefore, since we
                                                                                                                                  -
                                                                                                                                  6366 * do not have a mutex for all that source info, we place a task on W and set up a future as a
                                                                                                                                  -
                                                                                                                                  6367 * way for it to inform us it's done. This has a certain performance penalty, but that's better
                                                                                                                                  -
                                                                                                                                  6368 * than having to lock each time we need to modify this source data throughout W's operations.
                                                                                                                                  -
                                                                                                                                  6369 * Moreover we warned about the performance penalty in the doc header for Peer_socket::info(). */
                                                                                                                                  + +
                                                                                                                                  6345{
                                                                                                                                  + + +
                                                                                                                                  6348 using boost::adopt_lock;
                                                                                                                                  +
                                                                                                                                  6349
                                                                                                                                  +
                                                                                                                                  6350 // We are in thread U != W.
                                                                                                                                  +
                                                                                                                                  6351
                                                                                                                                  +
                                                                                                                                  6352 Peer_socket_info stats;
                                                                                                                                  +
                                                                                                                                  6353 {
                                                                                                                                  +
                                                                                                                                  6354 /* WARNING!!! sock->m_mutex is locked, but WE must unlock it before returning! Can't leave that
                                                                                                                                  +
                                                                                                                                  6355 * to the caller, because we must unlock at a specific point below, right before post()ing
                                                                                                                                  +
                                                                                                                                  6356 * sock_info_worker() onto thread W. Use a Lock_guard that adopts an already-locked mutex. */
                                                                                                                                  +
                                                                                                                                  6357 Peer_socket::Lock_guard lock(sock->m_mutex, adopt_lock);
                                                                                                                                  +
                                                                                                                                  6358
                                                                                                                                  +
                                                                                                                                  6359 if (!running())
                                                                                                                                  +
                                                                                                                                  6360 {
                                                                                                                                  +
                                                                                                                                  6361 /* This is kind of a weird case, in that sock's Node having stopped running is a problem, but
                                                                                                                                  +
                                                                                                                                  6362 * in this case they just want the socket stats. The only reason we're in this method --
                                                                                                                                  +
                                                                                                                                  6363 * calling sock->info() did not simply return the stats itself -- is that there was a danger
                                                                                                                                  +
                                                                                                                                  6364 * thread W might change the stats, while we'd be copying them. Well, if !running() there is no
                                                                                                                                  +
                                                                                                                                  6365 * danger of that. So we can just: */
                                                                                                                                  +
                                                                                                                                  6366 sock_load_info_struct(sock, &stats);
                                                                                                                                  +
                                                                                                                                  6367 return stats;
                                                                                                                                  +
                                                                                                                                  6368 }
                                                                                                                                  +
                                                                                                                                  6369 // else
                                                                                                                                  6370
                                                                                                                                  -
                                                                                                                                  6371 // We're done -- must unlock so that thread W can do what it wants to with sock.
                                                                                                                                  -
                                                                                                                                  6372 } // lock
                                                                                                                                  -
                                                                                                                                  6373
                                                                                                                                  -
                                                                                                                                  6374 // Load this onto thread W boost.asio work queue. We don't return until it's done, so [&] is OK.
                                                                                                                                  -
                                                                                                                                  6375 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION,
                                                                                                                                  -
                                                                                                                                  6376 [&]() { sock_load_info_struct(sock, &stats); });
                                                                                                                                  -
                                                                                                                                  6377 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  -
                                                                                                                                  6378
                                                                                                                                  -
                                                                                                                                  6379 return stats;
                                                                                                                                  -
                                                                                                                                  6380} // Node::sock_info()
                                                                                                                                  -
                                                                                                                                  6381
                                                                                                                                  - -
                                                                                                                                  6383{
                                                                                                                                  -
                                                                                                                                  6384 using boost::lexical_cast;
                                                                                                                                  -
                                                                                                                                  6385 using std::string;
                                                                                                                                  -
                                                                                                                                  6386
                                                                                                                                  -
                                                                                                                                  6387 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  6388
                                                                                                                                  -
                                                                                                                                  6389 stats->m_rcv = sock->m_rcv_stats.stats();
                                                                                                                                  -
                                                                                                                                  6390 stats->m_snd = sock->m_snd_stats.stats();
                                                                                                                                  -
                                                                                                                                  6391
                                                                                                                                  -
                                                                                                                                  6392 // @todo This is more suitable for the non-existent Node_info and Node::load_info_struct(). (It's not per-socket.)
                                                                                                                                  - +
                                                                                                                                  6371 /* Okay -- Node is running and may change stats's source info at any time. Therefore, since we
                                                                                                                                  +
                                                                                                                                  6372 * do not have a mutex for all that source info, we place a task on W and set up a future as a
                                                                                                                                  +
                                                                                                                                  6373 * way for it to inform us it's done. This has a certain performance penalty, but that's better
                                                                                                                                  +
                                                                                                                                  6374 * than having to lock each time we need to modify this source data throughout W's operations.
                                                                                                                                  +
                                                                                                                                  6375 * Moreover we warned about the performance penalty in the doc header for Peer_socket::info(). */
                                                                                                                                  +
                                                                                                                                  6376
                                                                                                                                  +
                                                                                                                                  6377 // We're done -- must unlock so that thread W can do what it wants to with sock.
                                                                                                                                  +
                                                                                                                                  6378 } // lock
                                                                                                                                  +
                                                                                                                                  6379
                                                                                                                                  +
                                                                                                                                  6380 // Load this onto thread W boost.asio work queue. We don't return until it's done, so [&] is OK.
                                                                                                                                  +
                                                                                                                                  6381 asio_exec_ctx_post(get_logger(), &m_task_engine, Synchronicity::S_ASYNC_AND_AWAIT_CONCURRENT_COMPLETION,
                                                                                                                                  +
                                                                                                                                  6382 [&]() { sock_load_info_struct(sock, &stats); });
                                                                                                                                  +
                                                                                                                                  6383 // If got here, the task has completed in thread W and signaled us to that effect.
                                                                                                                                  +
                                                                                                                                  6384
                                                                                                                                  +
                                                                                                                                  6385 return stats;
                                                                                                                                  +
                                                                                                                                  6386} // Node::sock_info()
                                                                                                                                  +
                                                                                                                                  6387
                                                                                                                                  + +
                                                                                                                                  6389{
                                                                                                                                  +
                                                                                                                                  6390 using boost::lexical_cast;
                                                                                                                                  +
                                                                                                                                  6391 using std::string;
                                                                                                                                  +
                                                                                                                                  6392
                                                                                                                                  +
                                                                                                                                  6393 // We are in thread W.
                                                                                                                                  6394
                                                                                                                                  -
                                                                                                                                  6395 stats->m_int_state_str = lexical_cast<string>(sock->m_int_state);
                                                                                                                                  -
                                                                                                                                  6396 stats->m_is_active_connect = sock->m_active_connect;
                                                                                                                                  -
                                                                                                                                  6397 // No need to lock: no thread but W can write to it.
                                                                                                                                  -
                                                                                                                                  6398 stats->m_disconnect_cause = sock->m_disconnect_cause;
                                                                                                                                  -
                                                                                                                                  6399
                                                                                                                                  -
                                                                                                                                  6400 {
                                                                                                                                  -
                                                                                                                                  6401 // Gotta lock, as Receive and Send buffers can be modified at any time by thread U at least.
                                                                                                                                  -
                                                                                                                                  6402 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  -
                                                                                                                                  6403 stats->m_rcv_buf_size = sock->m_rcv_buf.data_size();
                                                                                                                                  -
                                                                                                                                  6404 stats->m_snd_buf_size = sock->m_snd_buf.data_size();
                                                                                                                                  -
                                                                                                                                  6405 }
                                                                                                                                  -
                                                                                                                                  6406
                                                                                                                                  -
                                                                                                                                  6407 stats->m_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  -
                                                                                                                                  6408 stats->m_rcv_wnd_last_advertised = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  6409 stats->m_rcv_reassembly_q_data_size = sock->m_rcv_reassembly_q_data_size;
                                                                                                                                  -
                                                                                                                                  6410 stats->m_rcv_packets_with_gaps = sock->m_rcv_packets_with_gaps.size();
                                                                                                                                  - -
                                                                                                                                  6412 = sock->m_rcv_syn_rcvd_data_q.empty() ? 0 : sock->m_rcv_syn_rcvd_data_cumulative_size;
                                                                                                                                  -
                                                                                                                                  6413 stats->m_rcv_syn_rcvd_data_q_size = sock->m_rcv_syn_rcvd_data_q.size();
                                                                                                                                  -
                                                                                                                                  6414
                                                                                                                                  -
                                                                                                                                  6415 stats->m_snd_rcv_wnd = sock->m_snd_remote_rcv_wnd;
                                                                                                                                  -
                                                                                                                                  6416 stats->m_snd_cong_ctl_in_flight_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  -
                                                                                                                                  6417 stats->m_snd_cong_ctl_in_flight_count = sock->m_snd_flying_pkts_by_sent_when.size();
                                                                                                                                  -
                                                                                                                                  6418 stats->m_snd_cong_ctl_wnd_bytes = sock->m_snd_cong_ctl->congestion_window_bytes();
                                                                                                                                  -
                                                                                                                                  6419 stats->m_snd_cong_ctl_wnd_count_approx = stats->m_snd_cong_ctl_wnd_bytes / sock->max_block_size();
                                                                                                                                  -
                                                                                                                                  6420 stats->m_snd_smoothed_round_trip_time = sock->m_snd_smoothed_round_trip_time;
                                                                                                                                  -
                                                                                                                                  6421 stats->m_snd_round_trip_time_variance = sock->m_round_trip_time_variance;
                                                                                                                                  -
                                                                                                                                  6422 stats->m_snd_drop_timeout = sock->m_snd_drop_timeout;
                                                                                                                                  -
                                                                                                                                  6423 stats->m_snd_pacing_packet_q_size = sock->m_snd_pacing_data.m_packet_q.size();
                                                                                                                                  -
                                                                                                                                  6424 stats->m_snd_pacing_bytes_allowed_this_slice = sock->m_snd_pacing_data.m_bytes_allowed_this_slice;
                                                                                                                                  -
                                                                                                                                  6425 stats->m_snd_pacing_slice_start = sock->m_snd_pacing_data.m_slice_start;
                                                                                                                                  -
                                                                                                                                  6426 stats->m_snd_pacing_slice_period = sock->m_snd_pacing_data.m_slice_period;
                                                                                                                                  - -
                                                                                                                                  6428 = util::to_mbit_per_sec<Send_bandwidth_estimator::Time_unit>
                                                                                                                                  -
                                                                                                                                  6429 (sock->m_snd_bandwidth_estimator->bandwidth_bytes_per_time());
                                                                                                                                  -
                                                                                                                                  6430
                                                                                                                                  -
                                                                                                                                  6431 stats->m_sock_opts = sock->opt(sock->m_opts); // Lock and copy... probably not the fastest thing ever....
                                                                                                                                  -
                                                                                                                                  6432 stats->m_node_opts = opt(m_opts); // Ditto.
                                                                                                                                  -
                                                                                                                                  6433}
                                                                                                                                  -
                                                                                                                                  6434
                                                                                                                                  - -
                                                                                                                                  6436{
                                                                                                                                  -
                                                                                                                                  6437 // We are in thread W.
                                                                                                                                  -
                                                                                                                                  6438
                                                                                                                                  -
                                                                                                                                  6439 /* We are to log details about the given socket. Since the idea is that this would be called on
                                                                                                                                  -
                                                                                                                                  6440 * the order of at most once or twice a second, we can be as verbose as we think is useful without
                                                                                                                                  -
                                                                                                                                  6441 * (too much) concern for performance. */
                                                                                                                                  -
                                                                                                                                  6442
                                                                                                                                  -
                                                                                                                                  6443 Peer_socket_info stats;
                                                                                                                                  -
                                                                                                                                  6444 sock_load_info_struct(sock, &stats); // This involves some copying, but, again, we are not too concerned with speed.
                                                                                                                                  -
                                                                                                                                  6445
                                                                                                                                  -
                                                                                                                                  6446 FLOW_LOG_INFO("[=== Socket state for [" << sock << "]. ===\n" << stats);
                                                                                                                                  -
                                                                                                                                  6447
                                                                                                                                  -
                                                                                                                                  6448 // Log receive and send windows details. Force the logging of the most verbose possible amount of info.
                                                                                                                                  -
                                                                                                                                  6449 log_snd_window(sock, true);
                                                                                                                                  -
                                                                                                                                  6450 log_rcv_window(sock, true);
                                                                                                                                  -
                                                                                                                                  6451 // @todo Should this be inside Peer_socket_info also?
                                                                                                                                  -
                                                                                                                                  6452
                                                                                                                                  -
                                                                                                                                  6453 FLOW_LOG_INFO("=== Socket state for [" << sock << "]. ===]");
                                                                                                                                  -
                                                                                                                                  6454} // Node::sock_log_detail()
                                                                                                                                  -
                                                                                                                                  6455
                                                                                                                                  -
                                                                                                                                  6456void Node::advance_seq_num(Sequence_number* seq_num, boost::shared_ptr<const Data_packet> data) // Static.
                                                                                                                                  -
                                                                                                                                  6457{
                                                                                                                                  -
                                                                                                                                  6458 /* We just need to increment *seq_num, which points to the start of the data in `data`,
                                                                                                                                  -
                                                                                                                                  6459 * to a value that points to the data just past the end of the data in `data`. Why is this in a
                                                                                                                                  -
                                                                                                                                  6460 * separate method? Answer: We may want to change the mapping from sequence number to byte of data. In
                                                                                                                                  -
                                                                                                                                  6461 * particular the mapping can be one-to-one, as in TCP. Or it can be one sequence number to all bytes in a
                                                                                                                                  -
                                                                                                                                  6462 * particular packet, which I've seen in certain lesser known custom protocols. This allows us to
                                                                                                                                  -
                                                                                                                                  6463 * (hopefully) change the code in one place. */
                                                                                                                                  -
                                                                                                                                  6464
                                                                                                                                  -
                                                                                                                                  6465 advance_seq_num(seq_num, data->m_data.size());
                                                                                                                                  -
                                                                                                                                  6466} // Node::advance_seq_num()
                                                                                                                                  -
                                                                                                                                  6467
                                                                                                                                  -
                                                                                                                                  6468void Node::advance_seq_num(Sequence_number* seq_num, size_t data_size)
                                                                                                                                  -
                                                                                                                                  6469{
                                                                                                                                  -
                                                                                                                                  6470 /* For now go with TCP's convention (one byte to one sequence number, no gaps). While we deal
                                                                                                                                  -
                                                                                                                                  6471 * with blocks, instead of streams, this may complicate the math a bit and use more sequence
                                                                                                                                  -
                                                                                                                                  6472 * number space (faster wrapping). However, it would make it easier to adapt the algorithms
                                                                                                                                  -
                                                                                                                                  6473 * when we move to byte streams; and we currently use a sequence number so large that wrapping
                                                                                                                                  -
                                                                                                                                  6474 * is impossible. Update: we have moved to streams. */
                                                                                                                                  -
                                                                                                                                  6475 *seq_num += data_size;
                                                                                                                                  -
                                                                                                                                  6476}
                                                                                                                                  -
                                                                                                                                  6477
                                                                                                                                  -
                                                                                                                                  6478template<typename Packet_map_iter>
                                                                                                                                  -
                                                                                                                                  6479void Node::get_seq_num_range(const Packet_map_iter& packet_it,
                                                                                                                                  -
                                                                                                                                  6480 Sequence_number* seq_num_start, Sequence_number* seq_num_end) // Static.
                                                                                                                                  -
                                                                                                                                  6481{
                                                                                                                                  -
                                                                                                                                  6482 const Sequence_number& seq_num_start_cref = packet_it->first;
                                                                                                                                  -
                                                                                                                                  6483 if (seq_num_start)
                                                                                                                                  -
                                                                                                                                  6484 {
                                                                                                                                  -
                                                                                                                                  6485 *seq_num_start = seq_num_start_cref;
                                                                                                                                  -
                                                                                                                                  6486 }
                                                                                                                                  -
                                                                                                                                  6487 if (seq_num_end)
                                                                                                                                  -
                                                                                                                                  6488 {
                                                                                                                                  -
                                                                                                                                  6489 *seq_num_end = seq_num_start_cref;
                                                                                                                                  -
                                                                                                                                  6490 advance_seq_num(seq_num_end, packet_it->second->m_size);
                                                                                                                                  -
                                                                                                                                  6491 }
                                                                                                                                  -
                                                                                                                                  6492}
                                                                                                                                  -
                                                                                                                                  6493
                                                                                                                                  - -
                                                                                                                                  6495{
                                                                                                                                  -
                                                                                                                                  6496 // Since m_snd_last_order_num starts at 0, this ensures 0 is reserved, as advertised.
                                                                                                                                  -
                                                                                                                                  6497 return ++sock->m_snd_last_order_num;
                                                                                                                                  +
                                                                                                                                  6395 stats->m_rcv = sock->m_rcv_stats.stats();
                                                                                                                                  +
                                                                                                                                  6396 stats->m_snd = sock->m_snd_stats.stats();
                                                                                                                                  +
                                                                                                                                  6397
                                                                                                                                  +
                                                                                                                                  6398 // @todo This is more suitable for the non-existent Node_info and Node::load_info_struct(). (It's not per-socket.)
                                                                                                                                  + +
                                                                                                                                  6400
                                                                                                                                  +
                                                                                                                                  6401 stats->m_int_state_str = lexical_cast<string>(sock->m_int_state);
                                                                                                                                  +
                                                                                                                                  6402 stats->m_is_active_connect = sock->m_active_connect;
                                                                                                                                  +
                                                                                                                                  6403 // No need to lock: no thread but W can write to it.
                                                                                                                                  +
                                                                                                                                  6404 stats->m_disconnect_cause = sock->m_disconnect_cause;
                                                                                                                                  +
                                                                                                                                  6405
                                                                                                                                  +
                                                                                                                                  6406 {
                                                                                                                                  +
                                                                                                                                  6407 // Gotta lock, as Receive and Send buffers can be modified at any time by thread U at least.
                                                                                                                                  +
                                                                                                                                  6408 Peer_socket::Lock_guard lock(sock->m_mutex);
                                                                                                                                  +
                                                                                                                                  6409 stats->m_rcv_buf_size = sock->m_rcv_buf.data_size();
                                                                                                                                  +
                                                                                                                                  6410 stats->m_snd_buf_size = sock->m_snd_buf.data_size();
                                                                                                                                  +
                                                                                                                                  6411 }
                                                                                                                                  +
                                                                                                                                  6412
                                                                                                                                  +
                                                                                                                                  6413 stats->m_rcv_wnd = sock_rcv_wnd(sock);
                                                                                                                                  +
                                                                                                                                  6414 stats->m_rcv_wnd_last_advertised = sock->m_rcv_last_sent_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  6415 stats->m_rcv_reassembly_q_data_size = sock->m_rcv_reassembly_q_data_size;
                                                                                                                                  +
                                                                                                                                  6416 stats->m_rcv_packets_with_gaps = sock->m_rcv_packets_with_gaps.size();
                                                                                                                                  + +
                                                                                                                                  6418 = sock->m_rcv_syn_rcvd_data_q.empty() ? 0 : sock->m_rcv_syn_rcvd_data_cumulative_size;
                                                                                                                                  +
                                                                                                                                  6419 stats->m_rcv_syn_rcvd_data_q_size = sock->m_rcv_syn_rcvd_data_q.size();
                                                                                                                                  +
                                                                                                                                  6420
                                                                                                                                  +
                                                                                                                                  6421 stats->m_snd_rcv_wnd = sock->m_snd_remote_rcv_wnd;
                                                                                                                                  +
                                                                                                                                  6422 stats->m_snd_cong_ctl_in_flight_bytes = sock->m_snd_flying_bytes;
                                                                                                                                  +
                                                                                                                                  6423 stats->m_snd_cong_ctl_in_flight_count = sock->m_snd_flying_pkts_by_sent_when.size();
                                                                                                                                  +
                                                                                                                                  6424 stats->m_snd_cong_ctl_wnd_bytes = sock->m_snd_cong_ctl->congestion_window_bytes();
                                                                                                                                  +
                                                                                                                                  6425 stats->m_snd_cong_ctl_wnd_count_approx = stats->m_snd_cong_ctl_wnd_bytes / sock->max_block_size();
                                                                                                                                  +
                                                                                                                                  6426 stats->m_snd_smoothed_round_trip_time = sock->m_snd_smoothed_round_trip_time;
                                                                                                                                  +
                                                                                                                                  6427 stats->m_snd_round_trip_time_variance = sock->m_round_trip_time_variance;
                                                                                                                                  +
                                                                                                                                  6428 stats->m_snd_drop_timeout = sock->m_snd_drop_timeout;
                                                                                                                                  +
                                                                                                                                  6429 stats->m_snd_pacing_packet_q_size = sock->m_snd_pacing_data.m_packet_q.size();
                                                                                                                                  +
                                                                                                                                  6430 stats->m_snd_pacing_bytes_allowed_this_slice = sock->m_snd_pacing_data.m_bytes_allowed_this_slice;
                                                                                                                                  +
                                                                                                                                  6431 stats->m_snd_pacing_slice_start = sock->m_snd_pacing_data.m_slice_start;
                                                                                                                                  +
                                                                                                                                  6432 stats->m_snd_pacing_slice_period = sock->m_snd_pacing_data.m_slice_period;
                                                                                                                                  + +
                                                                                                                                  6434 = util::to_mbit_per_sec<Send_bandwidth_estimator::Time_unit>
                                                                                                                                  +
                                                                                                                                  6435 (sock->m_snd_bandwidth_estimator->bandwidth_bytes_per_time());
                                                                                                                                  +
                                                                                                                                  6436
                                                                                                                                  +
                                                                                                                                  6437 stats->m_sock_opts = sock->opt(sock->m_opts); // Lock and copy... probably not the fastest thing ever....
                                                                                                                                  +
                                                                                                                                  6438 stats->m_node_opts = opt(m_opts); // Ditto.
                                                                                                                                  +
                                                                                                                                  6439}
                                                                                                                                  +
                                                                                                                                  6440
                                                                                                                                  + +
                                                                                                                                  6442{
                                                                                                                                  +
                                                                                                                                  6443 // We are in thread W.
                                                                                                                                  +
                                                                                                                                  6444
                                                                                                                                  +
                                                                                                                                  6445 /* We are to log details about the given socket. Since the idea is that this would be called on
                                                                                                                                  +
                                                                                                                                  6446 * the order of at most once or twice a second, we can be as verbose as we think is useful without
                                                                                                                                  +
                                                                                                                                  6447 * (too much) concern for performance. */
                                                                                                                                  +
                                                                                                                                  6448
                                                                                                                                  +
                                                                                                                                  6449 Peer_socket_info stats;
                                                                                                                                  +
                                                                                                                                  6450 sock_load_info_struct(sock, &stats); // This involves some copying, but, again, we are not too concerned with speed.
                                                                                                                                  +
                                                                                                                                  6451
                                                                                                                                  +
                                                                                                                                  6452 FLOW_LOG_INFO("[=== Socket state for [" << sock << "]. ===\n" << stats);
                                                                                                                                  +
                                                                                                                                  6453
                                                                                                                                  +
                                                                                                                                  6454 // Log receive and send windows details. Force the logging of the most verbose possible amount of info.
                                                                                                                                  +
                                                                                                                                  6455 log_snd_window(sock, true);
                                                                                                                                  +
                                                                                                                                  6456 log_rcv_window(sock, true);
                                                                                                                                  +
                                                                                                                                  6457 // @todo Should this be inside Peer_socket_info also?
                                                                                                                                  +
                                                                                                                                  6458
                                                                                                                                  +
                                                                                                                                  6459 FLOW_LOG_INFO("=== Socket state for [" << sock << "]. ===]");
                                                                                                                                  +
                                                                                                                                  6460} // Node::sock_log_detail()
                                                                                                                                  +
                                                                                                                                  6461
                                                                                                                                  +
                                                                                                                                  6462void Node::advance_seq_num(Sequence_number* seq_num, boost::shared_ptr<const Data_packet> data) // Static.
                                                                                                                                  +
                                                                                                                                  6463{
                                                                                                                                  +
                                                                                                                                  6464 /* We just need to increment *seq_num, which points to the start of the data in `data`,
                                                                                                                                  +
                                                                                                                                  6465 * to a value that points to the data just past the end of the data in `data`. Why is this in a
                                                                                                                                  +
                                                                                                                                  6466 * separate method? Answer: We may want to change the mapping from sequence number to byte of data. In
                                                                                                                                  +
                                                                                                                                  6467 * particular the mapping can be one-to-one, as in TCP. Or it can be one sequence number to all bytes in a
                                                                                                                                  +
                                                                                                                                  6468 * particular packet, which I've seen in certain lesser known custom protocols. This allows us to
                                                                                                                                  +
                                                                                                                                  6469 * (hopefully) change the code in one place. */
                                                                                                                                  +
                                                                                                                                  6470
                                                                                                                                  +
                                                                                                                                  6471 advance_seq_num(seq_num, data->m_data.size());
                                                                                                                                  +
                                                                                                                                  6472} // Node::advance_seq_num()
                                                                                                                                  +
                                                                                                                                  6473
                                                                                                                                  +
                                                                                                                                  6474void Node::advance_seq_num(Sequence_number* seq_num, size_t data_size)
                                                                                                                                  +
                                                                                                                                  6475{
                                                                                                                                  +
                                                                                                                                  6476 /* For now go with TCP's convention (one byte to one sequence number, no gaps). While we deal
                                                                                                                                  +
                                                                                                                                  6477 * with blocks, instead of streams, this may complicate the math a bit and use more sequence
                                                                                                                                  +
                                                                                                                                  6478 * number space (faster wrapping). However, it would make it easier to adapt the algorithms
                                                                                                                                  +
                                                                                                                                  6479 * when we move to byte streams; and we currently use a sequence number so large that wrapping
                                                                                                                                  +
                                                                                                                                  6480 * is impossible. Update: we have moved to streams. */
                                                                                                                                  +
                                                                                                                                  6481 *seq_num += data_size;
                                                                                                                                  +
                                                                                                                                  6482}
                                                                                                                                  +
                                                                                                                                  6483
                                                                                                                                  +
                                                                                                                                  6484template<typename Packet_map_iter>
                                                                                                                                  +
                                                                                                                                  6485void Node::get_seq_num_range(const Packet_map_iter& packet_it,
                                                                                                                                  +
                                                                                                                                  6486 Sequence_number* seq_num_start, Sequence_number* seq_num_end) // Static.
                                                                                                                                  +
                                                                                                                                  6487{
                                                                                                                                  +
                                                                                                                                  6488 const Sequence_number& seq_num_start_cref = packet_it->first;
                                                                                                                                  +
                                                                                                                                  6489 if (seq_num_start)
                                                                                                                                  +
                                                                                                                                  6490 {
                                                                                                                                  +
                                                                                                                                  6491 *seq_num_start = seq_num_start_cref;
                                                                                                                                  +
                                                                                                                                  6492 }
                                                                                                                                  +
                                                                                                                                  6493 if (seq_num_end)
                                                                                                                                  +
                                                                                                                                  6494 {
                                                                                                                                  +
                                                                                                                                  6495 *seq_num_end = seq_num_start_cref;
                                                                                                                                  +
                                                                                                                                  6496 advance_seq_num(seq_num_end, packet_it->second->m_size);
                                                                                                                                  +
                                                                                                                                  6497 }
                                                                                                                                  6498}
                                                                                                                                  6499
                                                                                                                                  - +
                                                                                                                                  6501{
                                                                                                                                  -
                                                                                                                                  6502 // Just make a regular net_flow::Peer_socket.
                                                                                                                                  -
                                                                                                                                  6503 return sock_create_forward_plus_ctor_args<Peer_socket>(opts);
                                                                                                                                  +
                                                                                                                                  6502 // Since m_snd_last_order_num starts at 0, this ensures 0 is reserved, as advertised.
                                                                                                                                  +
                                                                                                                                  6503 return ++sock->m_snd_last_order_num;
                                                                                                                                  6504}
                                                                                                                                  6505
                                                                                                                                  -
                                                                                                                                  6506// Free implementations.
                                                                                                                                  -
                                                                                                                                  6507
                                                                                                                                  -
                                                                                                                                  6508std::ostream& operator<<(std::ostream& os, const Peer_socket* sock)
                                                                                                                                  -
                                                                                                                                  6509{
                                                                                                                                  -
                                                                                                                                  6510 return
                                                                                                                                  -
                                                                                                                                  6511 sock
                                                                                                                                  -
                                                                                                                                  6512 ? (os
                                                                                                                                  -
                                                                                                                                  6513 << "NetFlow_socket "
                                                                                                                                  -
                                                                                                                                  6514 << "[" << sock->remote_endpoint() << "]<=>[NetFlow [:" << sock->local_port() << "]] "
                                                                                                                                  -
                                                                                                                                  6515 "@" << static_cast<const void*>(sock))
                                                                                                                                  -
                                                                                                                                  6516 : (os << "NetFlow_socket@null");
                                                                                                                                  -
                                                                                                                                  6517}
                                                                                                                                  -
                                                                                                                                  6518
                                                                                                                                  -
                                                                                                                                  6519/// @cond
                                                                                                                                  -
                                                                                                                                  6520/* -^- Doxygen, please ignore the following. (Don't want docs generated for temp macro; this is more maintainable
                                                                                                                                  -
                                                                                                                                  6521 * than specifying the macro name to omit it, in Doxygen-config EXCLUDE_SYMBOLS.) */
                                                                                                                                  -
                                                                                                                                  6522
                                                                                                                                  -
                                                                                                                                  6523// That's right, I did this. Wanna fight about it?
                                                                                                                                  -
                                                                                                                                  6524#define STATE_TO_CASE_STATEMENT(ARG_state) \
                                                                                                                                  -
                                                                                                                                  6525 case Peer_socket::Int_state::S_##ARG_state: \
                                                                                                                                  -
                                                                                                                                  6526 return os << #ARG_state
                                                                                                                                  -
                                                                                                                                  6527
                                                                                                                                  -
                                                                                                                                  6528// -v- Doxygen, please stop ignoring.
                                                                                                                                  -
                                                                                                                                  6529/// @endcond
                                                                                                                                  -
                                                                                                                                  6530
                                                                                                                                  -
                                                                                                                                  6531std::ostream& operator<<(std::ostream& os, Peer_socket::Int_state state)
                                                                                                                                  -
                                                                                                                                  6532{
                                                                                                                                  -
                                                                                                                                  6533 switch (state)
                                                                                                                                  -
                                                                                                                                  6534 {
                                                                                                                                  -
                                                                                                                                  6535 STATE_TO_CASE_STATEMENT(CLOSED);
                                                                                                                                  -
                                                                                                                                  6536 STATE_TO_CASE_STATEMENT(SYN_SENT);
                                                                                                                                  -
                                                                                                                                  6537 STATE_TO_CASE_STATEMENT(SYN_RCVD);
                                                                                                                                  -
                                                                                                                                  6538 STATE_TO_CASE_STATEMENT(ESTABLISHED);
                                                                                                                                  -
                                                                                                                                  6539 }
                                                                                                                                  -
                                                                                                                                  6540 return os;
                                                                                                                                  -
                                                                                                                                  6541#undef STATE_TO_CASE_STATEMENT
                                                                                                                                  -
                                                                                                                                  6542}
                                                                                                                                  -
                                                                                                                                  6543
                                                                                                                                  -
                                                                                                                                  6544} // namespace flow::net_flow
                                                                                                                                  + +
                                                                                                                                  6507{
                                                                                                                                  +
                                                                                                                                  6508 // Just make a regular net_flow::Peer_socket.
                                                                                                                                  +
                                                                                                                                  6509 return sock_create_forward_plus_ctor_args<Peer_socket>(opts);
                                                                                                                                  +
                                                                                                                                  6510}
                                                                                                                                  +
                                                                                                                                  6511
                                                                                                                                  +
                                                                                                                                  6512// Free implementations.
                                                                                                                                  +
                                                                                                                                  6513
                                                                                                                                  +
                                                                                                                                  6514std::ostream& operator<<(std::ostream& os, const Peer_socket* sock)
                                                                                                                                  +
                                                                                                                                  6515{
                                                                                                                                  +
                                                                                                                                  6516 return
                                                                                                                                  +
                                                                                                                                  6517 sock
                                                                                                                                  +
                                                                                                                                  6518 ? (os
                                                                                                                                  +
                                                                                                                                  6519 << "NetFlow_socket "
                                                                                                                                  +
                                                                                                                                  6520 << "[" << sock->remote_endpoint() << "]<=>[NetFlow [:" << sock->local_port() << "]] "
                                                                                                                                  +
                                                                                                                                  6521 "@" << static_cast<const void*>(sock))
                                                                                                                                  +
                                                                                                                                  6522 : (os << "NetFlow_socket@null");
                                                                                                                                  +
                                                                                                                                  6523}
                                                                                                                                  +
                                                                                                                                  6524
                                                                                                                                  +
                                                                                                                                  6525/// @cond
                                                                                                                                  +
                                                                                                                                  6526/* -^- Doxygen, please ignore the following. (Don't want docs generated for temp macro; this is more maintainable
                                                                                                                                  +
                                                                                                                                  6527 * than specifying the macro name to omit it, in Doxygen-config EXCLUDE_SYMBOLS.) */
                                                                                                                                  +
                                                                                                                                  6528
                                                                                                                                  +
                                                                                                                                  6529// That's right, I did this. Wanna fight about it?
                                                                                                                                  +
                                                                                                                                  6530#define STATE_TO_CASE_STATEMENT(ARG_state) \
                                                                                                                                  +
                                                                                                                                  6531 case Peer_socket::Int_state::S_##ARG_state: \
                                                                                                                                  +
                                                                                                                                  6532 return os << #ARG_state
                                                                                                                                  +
                                                                                                                                  6533
                                                                                                                                  +
                                                                                                                                  6534// -v- Doxygen, please stop ignoring.
                                                                                                                                  +
                                                                                                                                  6535/// @endcond
                                                                                                                                  +
                                                                                                                                  6536
                                                                                                                                  +
                                                                                                                                  6537std::ostream& operator<<(std::ostream& os, Peer_socket::Int_state state)
                                                                                                                                  +
                                                                                                                                  6538{
                                                                                                                                  +
                                                                                                                                  6539 switch (state)
                                                                                                                                  +
                                                                                                                                  6540 {
                                                                                                                                  +
                                                                                                                                  6541 STATE_TO_CASE_STATEMENT(CLOSED);
                                                                                                                                  +
                                                                                                                                  6542 STATE_TO_CASE_STATEMENT(SYN_SENT);
                                                                                                                                  +
                                                                                                                                  6543 STATE_TO_CASE_STATEMENT(SYN_RCVD);
                                                                                                                                  +
                                                                                                                                  6544 STATE_TO_CASE_STATEMENT(ESTABLISHED);
                                                                                                                                  +
                                                                                                                                  6545 }
                                                                                                                                  +
                                                                                                                                  6546 return os;
                                                                                                                                  +
                                                                                                                                  6547#undef STATE_TO_CASE_STATEMENT
                                                                                                                                  +
                                                                                                                                  6548}
                                                                                                                                  +
                                                                                                                                  6549
                                                                                                                                  +
                                                                                                                                  6550} // namespace flow::net_flow
                                                                                                                                  - +
                                                                                                                                  const Component & get_log_component() const
                                                                                                                                  Returns reference to the stored Component object, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:230
                                                                                                                                  Logger * get_logger() const
                                                                                                                                  Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:225
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  @@ -6625,101 +6631,101 @@
                                                                                                                                  @ S_PEER_SOCKET_WRITABLE
                                                                                                                                  Event type specifying the condition of interest wherein a target Peer_socket sock is such that callin...
                                                                                                                                  @ S_PEER_SOCKET_READABLE
                                                                                                                                  Event type specifying the condition of interest wherein a target Peer_socket sock is such that callin...
                                                                                                                                  An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
                                                                                                                                  Definition: node.hpp:937
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_updated(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_const_iter pkt_begin, const Peer_socket::Sent_pkt_ordered_by_when_const_iter &pkt_end, bool added)
                                                                                                                                  Updates Peer_socket::m_snd_flying_bytes according to an operation (add packets, remove packets) calle...
                                                                                                                                  -
                                                                                                                                  bool categorize_individual_ack(const Socket_id &socket_id, Peer_socket::Ptr sock, Ack_packet::Individual_ack::Const_ptr ack, bool *dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter *acked_pkt_it)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that categorizes the given accumulated individual ackno...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_updated(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_const_iter pkt_begin, const Peer_socket::Sent_pkt_ordered_by_when_const_iter &pkt_end, bool added)
                                                                                                                                  Updates Peer_socket::m_snd_flying_bytes according to an operation (add packets, remove packets) calle...
                                                                                                                                  +
                                                                                                                                  bool categorize_individual_ack(const Socket_id &socket_id, Peer_socket::Ptr sock, Ack_packet::Individual_ack::Const_ptr ack, bool *dupe_or_late, Peer_socket::Sent_pkt_ordered_by_when_iter *acked_pkt_it)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that categorizes the given accumulated individual ackno...
                                                                                                                                  void handle_data_to_established(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet, bool syn_rcvd_qd_packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  -
                                                                                                                                  bool sock_is_writable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->send() with at least some arguments would return either non...
                                                                                                                                  -
                                                                                                                                  Peer_socket_info sock_info(Peer_socket::Const_ptr sock)
                                                                                                                                  Implementation of sock->info() for socket sock in all cases except when sock->state() == Peer_socket:...
                                                                                                                                  -
                                                                                                                                  void receive_wnd_updated(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W if it has dequeued data from Receive buffer and given it to the user,...
                                                                                                                                  +
                                                                                                                                  bool sock_is_writable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->send() with at least some arguments would return either non...
                                                                                                                                  +
                                                                                                                                  Peer_socket_info sock_info(Peer_socket::Const_ptr sock)
                                                                                                                                  Implementation of sock->info() for socket sock in all cases except when sock->state() == Peer_socket:...
                                                                                                                                  +
                                                                                                                                  void receive_wnd_updated(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W if it has dequeued data from Receive buffer and given it to the user,...
                                                                                                                                  void sock_track_new_data_after_gap_rexmit_off(Peer_socket::Ptr sock, boost::shared_ptr< const Data_packet > packet, size_t data_size, bool *slide, size_t *slide_size)
                                                                                                                                  Helper for handle_data_to_established() that aims to register the given DATA packet as an out-of-orde...
                                                                                                                                  bool sock_data_to_reassembly_q_unless_overflow(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Helper for handle_data_to_established() that aims to register the given DATA packet as an out-of-orde...
                                                                                                                                  static bool ensure_sock_open(Socket_ptr sock, Error_code *err_code)
                                                                                                                                  Helper method that checks whether the given Peer_socket or Server_socket is CLOSED; if so,...
                                                                                                                                  Definition: node.hpp:4141
                                                                                                                                  -
                                                                                                                                  void send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  Thread W implemention of send(): synchronously or asynchronously send the contents of sock->m_snd_buf...
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  -
                                                                                                                                  void async_rcv_wnd_recovery(Peer_socket::Ptr sock, size_t rcv_wnd)
                                                                                                                                  receive_wnd_updated() helper that continues rcv_wnd recovery: that is, sends unsolicited ACK with a r...
                                                                                                                                  -
                                                                                                                                  void log_accumulated_acks(Peer_socket::Const_ptr sock) const
                                                                                                                                  Helper of handle_accumulated_acks() that logs the about-to-be-handled accumulated individual acknowle...
                                                                                                                                  -
                                                                                                                                  void sock_free_memory(Peer_socket::Ptr sock)
                                                                                                                                  Helper that clears all non-O(1)-space data structures stored inside sock.
                                                                                                                                  -
                                                                                                                                  void sock_load_info_struct(Peer_socket::Const_ptr sock, Peer_socket_info *stats) const
                                                                                                                                  Given a Peer_socket, copies all stats info (as available via Peer_socket::info()) from various struct...
                                                                                                                                  -
                                                                                                                                  void log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages thats show the detailed state of the sending sequence number space.
                                                                                                                                  -
                                                                                                                                  void send_worker_check_state(Peer_socket::Ptr sock)
                                                                                                                                  Helper placed by send() onto W to invoke send_worker() but ensures that the socket has not entered so...
                                                                                                                                  +
                                                                                                                                  void send_worker(Peer_socket::Ptr sock, bool defer_delta_check)
                                                                                                                                  Thread W implemention of send(): synchronously or asynchronously send the contents of sock->m_snd_buf...
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any incoming acknowledgments and rcv_wnd u...
                                                                                                                                  +
                                                                                                                                  void async_rcv_wnd_recovery(Peer_socket::Ptr sock, size_t rcv_wnd)
                                                                                                                                  receive_wnd_updated() helper that continues rcv_wnd recovery: that is, sends unsolicited ACK with a r...
                                                                                                                                  +
                                                                                                                                  void log_accumulated_acks(Peer_socket::Const_ptr sock) const
                                                                                                                                  Helper of handle_accumulated_acks() that logs the about-to-be-handled accumulated individual acknowle...
                                                                                                                                  +
                                                                                                                                  void sock_free_memory(Peer_socket::Ptr sock)
                                                                                                                                  Helper that clears all non-O(1)-space data structures stored inside sock.
                                                                                                                                  +
                                                                                                                                  void sock_load_info_struct(Peer_socket::Const_ptr sock, Peer_socket_info *stats) const
                                                                                                                                  Given a Peer_socket, copies all stats info (as available via Peer_socket::info()) from various struct...
                                                                                                                                  +
                                                                                                                                  void log_snd_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages thats show the detailed state of the sending sequence number space.
                                                                                                                                  +
                                                                                                                                  void send_worker_check_state(Peer_socket::Ptr sock)
                                                                                                                                  Helper placed by send() onto W to invoke send_worker() but ensures that the socket has not entered so...
                                                                                                                                  size_t m_low_lvl_max_buf_size
                                                                                                                                  OS-reported m_low_lvl_sock UDP receive buffer maximum size, obtained right after we OS-set that setti...
                                                                                                                                  Definition: node.hpp:3771
                                                                                                                                  Non_blocking_func_ret_type sync_op(typename Socket::Ptr sock, const Function< Non_blocking_func_ret_type()> &non_blocking_func, Non_blocking_func_ret_type would_block_ret_val, Event_set::Event_type ev_type, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Implementation of core blocking transfer methods, namely Peer_socket::sync_send(),...
                                                                                                                                  Definition: node.hpp:3977
                                                                                                                                  size_t sock_max_packets_after_unrecvd_packet(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the max size for Peer_socket::m_rcv_packets_with_gaps for sock.
                                                                                                                                  -
                                                                                                                                  Peer_socket::Sent_pkt_ordered_by_when_iter categorize_pkts_as_dropped_on_acks(Peer_socket::Ptr sock, const boost::unordered_set< Peer_socket::order_num_t > &flying_now_acked_pkts)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that determines the range of In-flight packets that sho...
                                                                                                                                  +
                                                                                                                                  Peer_socket::Sent_pkt_ordered_by_when_iter categorize_pkts_as_dropped_on_acks(Peer_socket::Ptr sock, const boost::unordered_set< Peer_socket::order_num_t > &flying_now_acked_pkts)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that determines the range of In-flight packets that sho...
                                                                                                                                  void rcv_get_first_gap_info(Peer_socket::Const_ptr sock, bool *first_gap_exists, Sequence_number *seq_num_after_first_gap)
                                                                                                                                  Helper for handle_data_to_established() that gets simple info about Peer_socket::m_rcv_packets_with_g...
                                                                                                                                  -
                                                                                                                                  bool snd_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data either in Peer_socket::m_snd_rexmit_q of sock (if re...
                                                                                                                                  -
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  +
                                                                                                                                  bool snd_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data either in Peer_socket::m_snd_rexmit_q of sock (if re...
                                                                                                                                  +
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  void sock_rcv_buf_now_readable(Peer_socket::Ptr sock, bool syn_rcvd_qd_packet)
                                                                                                                                  Helper for handle_data_to_established() that assumes the given's socket Receive buffer is currently r...
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_erase_one(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_iter pkt_it)
                                                                                                                                  Erases (for example if considered Acknowledged or Dropped) a packet struct from the "scoreboard" (Pee...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_erase_one(Peer_socket::Ptr sock, Peer_socket::Sent_pkt_ordered_by_when_iter pkt_it)
                                                                                                                                  Erases (for example if considered Acknowledged or Dropped) a packet struct from the "scoreboard" (Pee...
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Obtain a copy of the value of a given option in a thread-safe manner.
                                                                                                                                  Definition: node.hpp:4180
                                                                                                                                  -
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  -
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  -
                                                                                                                                  void receive_wnd_recovery_data_received(Peer_socket::Ptr sock)
                                                                                                                                  Pertaining to the async_rcv_wnd_recovery() mechanism, this handles the event that we have received an...
                                                                                                                                  -
                                                                                                                                  static Peer_socket::order_num_t sock_get_new_snd_order_num(Peer_socket::Ptr sock)
                                                                                                                                  Returns the "order number" to use for Peer_socket::Sent_packet::Sent_when structure corresponding to ...
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr sync_connect_impl(const Remote_endpoint &to, const Fine_duration &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code, const Peer_socket_options *opts)
                                                                                                                                  Implementation core of sync_connect*() that gets rid of templated or missing arguments thereof.
                                                                                                                                  +
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  +
                                                                                                                                  void handle_accumulated_pending_acks(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that handles any additional individual outgoing acknowl...
                                                                                                                                  +
                                                                                                                                  void receive_wnd_recovery_data_received(Peer_socket::Ptr sock)
                                                                                                                                  Pertaining to the async_rcv_wnd_recovery() mechanism, this handles the event that we have received an...
                                                                                                                                  +
                                                                                                                                  static Peer_socket::order_num_t sock_get_new_snd_order_num(Peer_socket::Ptr sock)
                                                                                                                                  Returns the "order number" to use for Peer_socket::Sent_packet::Sent_when structure corresponding to ...
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr sync_connect_impl(const Remote_endpoint &to, const Fine_duration &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code, const Peer_socket_options *opts)
                                                                                                                                  Implementation core of sync_connect*() that gets rid of templated or missing arguments thereof.
                                                                                                                                  size_t max_block_size() const
                                                                                                                                  The maximum number of bytes of user data per received or sent block on connections generated from thi...
                                                                                                                                  Definition: node.cpp:1112
                                                                                                                                  -
                                                                                                                                  void snd_flying_pkts_push_one(Peer_socket::Ptr sock, const Sequence_number &seq_num, Peer_socket::Sent_packet::Ptr sent_pkt)
                                                                                                                                  Adds a new packet struct (presumably representing packet to be sent shortly) to the "scoreboard" (Pee...
                                                                                                                                  -
                                                                                                                                  Syn_packet::Ptr create_syn(Peer_socket::Const_ptr sock)
                                                                                                                                  Helper that creates a new SYN packet object to the extent that is suitable for immediately passing to...
                                                                                                                                  -
                                                                                                                                  void close_abruptly(Peer_socket::Ptr sock, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->close_abruptly() for socket sock in all cases except when sock->...
                                                                                                                                  -
                                                                                                                                  static void get_seq_num_range(const Packet_map_iter &packet_it, Sequence_number *seq_num_start, Sequence_number *seq_num_end)
                                                                                                                                  Given an iterator into a Peer_socket::Sent_pkt_by_sent_when_map or Peer_socket::Recv_pkt_map,...
                                                                                                                                  +
                                                                                                                                  void snd_flying_pkts_push_one(Peer_socket::Ptr sock, const Sequence_number &seq_num, Peer_socket::Sent_packet::Ptr sent_pkt)
                                                                                                                                  Adds a new packet struct (presumably representing packet to be sent shortly) to the "scoreboard" (Pee...
                                                                                                                                  +
                                                                                                                                  Syn_packet::Ptr create_syn(Peer_socket::Const_ptr sock)
                                                                                                                                  Helper that creates a new SYN packet object to the extent that is suitable for immediately passing to...
                                                                                                                                  +
                                                                                                                                  void close_abruptly(Peer_socket::Ptr sock, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->close_abruptly() for socket sock in all cases except when sock->...
                                                                                                                                  +
                                                                                                                                  static void get_seq_num_range(const Packet_map_iter &packet_it, Sequence_number *seq_num_start, Sequence_number *seq_num_end)
                                                                                                                                  Given an iterator into a Peer_socket::Sent_pkt_by_sent_when_map or Peer_socket::Recv_pkt_map,...
                                                                                                                                  Peer_socket::Ptr sync_connect_with_metadata(const Remote_endpoint &to, const boost::chrono::duration< Rep, Period > &max_wait, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  A combination of sync_connect() and connect_with_metadata() (blocking connect, with supplied metadata...
                                                                                                                                  Definition: node.hpp:3956
                                                                                                                                  -
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  -
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  -
                                                                                                                                  bool snd_buf_enqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there is enough free space in Peer_socket::m_snd_buf of sock to enqueue an...
                                                                                                                                  -
                                                                                                                                  bool can_send(Peer_socket::Const_ptr sock) const
                                                                                                                                  Answers the perennial question of congestion and flow control: assuming there is a DATA packet to sen...
                                                                                                                                  +
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  +
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  +
                                                                                                                                  bool snd_buf_enqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there is enough free space in Peer_socket::m_snd_buf of sock to enqueue an...
                                                                                                                                  +
                                                                                                                                  bool can_send(Peer_socket::Const_ptr sock) const
                                                                                                                                  Answers the perennial question of congestion and flow control: assuming there is a DATA packet to sen...
                                                                                                                                  void sock_slide_rcv_next_seq_num(Peer_socket::Ptr sock, size_t slide_size, bool reassembly_in_progress)
                                                                                                                                  Helper for handle_data_to_established() that aims to register a set of received DATA packet data as i...
                                                                                                                                  -
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  -
                                                                                                                                  static void advance_seq_num(Sequence_number *seq_num, boost::shared_ptr< const Data_packet > data)
                                                                                                                                  Assuming *seq_num points to the start of data.m_data, increments *seq_num to point to the datum just ...
                                                                                                                                  -
                                                                                                                                  void async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code &sys_err_code=Error_code())
                                                                                                                                  Sends a low-level ACK packet, with all accumulated in Peer_socket::m_rcv_pending_acks of sock individ...
                                                                                                                                  -
                                                                                                                                  static Sequence_number snd_past_last_flying_datum_seq_num(Peer_socket::Const_ptr sock)
                                                                                                                                  Obtain the sequence number for the datum just past the last (latest) In-flight (i....
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr connect(const Remote_endpoint &to, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Initiates an active connect to the specified remote Flow server.
                                                                                                                                  +
                                                                                                                                  void sock_log_detail(Peer_socket::Const_ptr sock) const
                                                                                                                                  Logs a verbose state report for the given socket.
                                                                                                                                  +
                                                                                                                                  static void advance_seq_num(Sequence_number *seq_num, boost::shared_ptr< const Data_packet > data)
                                                                                                                                  Assuming *seq_num points to the start of data.m_data, increments *seq_num to point to the datum just ...
                                                                                                                                  +
                                                                                                                                  void async_low_lvl_ack_send(Peer_socket::Ptr sock, bool defer_delta_check, const Error_code &sys_err_code=Error_code())
                                                                                                                                  Sends a low-level ACK packet, with all accumulated in Peer_socket::m_rcv_pending_acks of sock individ...
                                                                                                                                  +
                                                                                                                                  static Sequence_number snd_past_last_flying_datum_seq_num(Peer_socket::Const_ptr sock)
                                                                                                                                  Obtain the sequence number for the datum just past the last (latest) In-flight (i....
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr connect(const Remote_endpoint &to, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Initiates an active connect to the specified remote Flow server.
                                                                                                                                  void event_set_all_check_delta(bool defer_delta_check)
                                                                                                                                  For each WAITING Event_set within the Node: checks for any events that hold, and if any do hold,...
                                                                                                                                  Definition: event_set.cpp:1129
                                                                                                                                  void serv_peer_socket_closed(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records that a Server_socket-contained (i.e., currently un-established, or established but not yet ac...
                                                                                                                                  -
                                                                                                                                  bool rcv_buf_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data in Peer_socket::m_rcv_buf of sock to give the user s...
                                                                                                                                  +
                                                                                                                                  bool rcv_buf_deqable(Peer_socket::Const_ptr sock) const
                                                                                                                                  Return true if and only if there are enough data in Peer_socket::m_rcv_buf of sock to give the user s...
                                                                                                                                  void async_acknowledge_packet(Peer_socket::Ptr sock, const Sequence_number &seq_num, unsigned int rexmit_id, size_t data_size)
                                                                                                                                  Causes an acknowledgment of the given received packet to be included in a future Ack_packet sent to t...
                                                                                                                                  Socket_id_to_socket_map m_socks
                                                                                                                                  The peer-to-peer connections this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3792
                                                                                                                                  Peer_socket::Options_lock Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  Definition: node.hpp:1439
                                                                                                                                  -
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  +
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  void handle_syn_ack_to_syn_sent(const Socket_id &socket_id, Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN_ACK packet delivered to the given peer ...
                                                                                                                                  -
                                                                                                                                  size_t send(Peer_socket::Ptr sock, const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->send() for socket sock in all cases except when sock->state() ==...
                                                                                                                                  -
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  -
                                                                                                                                  bool sock_is_readable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->receive() with at least some arguments would return either ...
                                                                                                                                  +
                                                                                                                                  size_t send(Peer_socket::Ptr sock, const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->send() for socket sock in all cases except when sock->state() ==...
                                                                                                                                  +
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  +
                                                                                                                                  bool sock_is_readable(const boost::any &sock_as_any) const
                                                                                                                                  Returns true if and only if calling sock->receive() with at least some arguments would return either ...
                                                                                                                                  bool async_sock_low_lvl_packet_send_or_close_immediately(const Peer_socket::Ptr &sock, Low_lvl_packet::Ptr &&packet, bool defer_delta_check)
                                                                                                                                  Similar to async_sock_low_lvl_packet_send_paced() except it also calls close_connection_immediately(s...
                                                                                                                                  bool sock_data_to_rcv_buf_unless_overflow(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Helper for handle_data_to_established() that aims to pass the payload of the given DATA packet to the...
                                                                                                                                  -
                                                                                                                                  bool sock_set_options(Peer_socket::Ptr sock, const Peer_socket_options &opts, Error_code *err_code)
                                                                                                                                  Thread W implementation of sock->set_options().
                                                                                                                                  +
                                                                                                                                  bool sock_set_options(Peer_socket::Ptr sock, const Peer_socket_options &opts, Error_code *err_code)
                                                                                                                                  Thread W implementation of sock->set_options().
                                                                                                                                  bool running() const
                                                                                                                                  Returns true if and only if the Node is operating.
                                                                                                                                  Definition: node.cpp:420
                                                                                                                                  Port_to_server_map m_servs
                                                                                                                                  The server sockets this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3798
                                                                                                                                  Event_set::Ev_type_to_socks_map m_sock_events
                                                                                                                                  All sockets that have been detected to be "ready" (by the Event_set doc header definition) at any poi...
                                                                                                                                  Definition: node.hpp:3830
                                                                                                                                  static const uint8_t S_DEFAULT_CONN_METADATA
                                                                                                                                  Type and value to supply as user-supplied metadata in SYN, if user chooses to use [[a]sync_]connect()...
                                                                                                                                  Definition: node.hpp:1403
                                                                                                                                  -
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  -
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  +
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  +
                                                                                                                                  void handle_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Ack_packet > ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level ACK packet delivered to the given peer soc...
                                                                                                                                  Peer_socket::Ptr sync_connect(const Remote_endpoint &to, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  The blocking (synchronous) version of connect().
                                                                                                                                  Definition: node.hpp:3967
                                                                                                                                  void handle_syn_ack_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Syn_ack_packet > syn_ack)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, duplicate (equal to already-received SYN_ACK) low-le...
                                                                                                                                  -
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  -
                                                                                                                                  void log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages that show the detailed state of the receiving sequence number space.
                                                                                                                                  -
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  -
                                                                                                                                  void connect_worker(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, const Peer_socket_options *opts, Peer_socket::Ptr *sock)
                                                                                                                                  Thread W implementation of connect().
                                                                                                                                  -
                                                                                                                                  bool drop_pkts_on_acks(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &last_dropped_pkt_it, size_t *cong_ctl_dropped_pkts, size_t *cong_ctl_dropped_bytes, size_t *dropped_pkts, size_t *dropped_bytes, std::vector< Peer_socket::order_num_t > *pkts_marked_to_drop)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that acts on the determination made by categorize_pkts_...
                                                                                                                                  +
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  +
                                                                                                                                  void log_rcv_window(Peer_socket::Const_ptr sock, bool force_verbose_info_logging=false) const
                                                                                                                                  Logs TRACE or DATA messages that show the detailed state of the receiving sequence number space.
                                                                                                                                  +
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  +
                                                                                                                                  void connect_worker(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, const Peer_socket_options *opts, Peer_socket::Ptr *sock)
                                                                                                                                  Thread W implementation of connect().
                                                                                                                                  +
                                                                                                                                  bool drop_pkts_on_acks(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &last_dropped_pkt_it, size_t *cong_ctl_dropped_pkts, size_t *cong_ctl_dropped_bytes, size_t *dropped_pkts, size_t *dropped_bytes, std::vector< Peer_socket::order_num_t > *pkts_marked_to_drop)
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that acts on the determination made by categorize_pkts_...
                                                                                                                                  static const Peer_socket::Sent_packet::ack_count_t S_MAX_LATER_ACKS_BEFORE_CONSIDERING_DROPPED
                                                                                                                                  For a given unacknowledged sent packet P, the maximum number of times any individual packet with high...
                                                                                                                                  Definition: node.hpp:3686
                                                                                                                                  -
                                                                                                                                  bool async_low_lvl_syn_ack_ack_send_or_close_immediately(const Peer_socket::Ptr &sock, boost::shared_ptr< const Syn_ack_packet > &syn_ack)
                                                                                                                                  Helper to create, fully fill out, and asynchronously send via async_sock_low_lvl_packet_send_or_close...
                                                                                                                                  +
                                                                                                                                  bool async_low_lvl_syn_ack_ack_send_or_close_immediately(const Peer_socket::Ptr &sock, boost::shared_ptr< const Syn_ack_packet > &syn_ack)
                                                                                                                                  Helper to create, fully fill out, and asynchronously send via async_sock_low_lvl_packet_send_or_close...
                                                                                                                                  Error_code sock_categorize_data_to_established(Peer_socket::Ptr sock, boost::shared_ptr< const Data_packet > packet, bool *dupe, bool *slide, size_t *slide_size)
                                                                                                                                  Helper for handle_data_to_established() that categorizes the DATA packet received as either illegal; ...
                                                                                                                                  void async_sock_low_lvl_rst_send(Peer_socket::Ptr sock)
                                                                                                                                  Sends an RST to the other side of the given socket asynchronously when possible.
                                                                                                                                  -
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  -
                                                                                                                                  void receive_emptied_rcv_buf_while_disconnecting(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W during a graceful close, after the Receive buffer had been emptied by the ...
                                                                                                                                  -
                                                                                                                                  void sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code &disconnect_cause, bool close)
                                                                                                                                  Records that thread W shows underlying connection is broken (graceful termination,...
                                                                                                                                  -
                                                                                                                                  size_t receive(Peer_socket::Ptr sock, const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->receive() for socket sock in all cases except when sock->state()...
                                                                                                                                  -
                                                                                                                                  void handle_connection_rexmit_timer_event(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Handles the triggering of the retransmit timer wait set up by setup_connection_timers(); it will re-s...
                                                                                                                                  +
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  +
                                                                                                                                  void receive_emptied_rcv_buf_while_disconnecting(Peer_socket::Ptr sock)
                                                                                                                                  Placed by receive() onto W during a graceful close, after the Receive buffer had been emptied by the ...
                                                                                                                                  +
                                                                                                                                  void sock_disconnect_detected(Peer_socket::Ptr sock, const Error_code &disconnect_cause, bool close)
                                                                                                                                  Records that thread W shows underlying connection is broken (graceful termination,...
                                                                                                                                  +
                                                                                                                                  size_t receive(Peer_socket::Ptr sock, const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking sock->receive() for socket sock in all cases except when sock->state()...
                                                                                                                                  +
                                                                                                                                  void handle_connection_rexmit_timer_event(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Handles the triggering of the retransmit timer wait set up by setup_connection_timers(); it will re-s...
                                                                                                                                  Node_options m_opts
                                                                                                                                  This Node's global set of options.
                                                                                                                                  Definition: node.hpp:3704
                                                                                                                                  -
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  -
                                                                                                                                  void sock_disconnect_completed(Peer_socket::Ptr sock)
                                                                                                                                  While in S_OPEN+S_DISCONNECTING state (i.e., after beginning a graceful close with sock_disconnect_de...
                                                                                                                                  -
                                                                                                                                  Fine_duration compute_rtt_on_ack(Peer_socket::Sent_packet::Const_ptr flying_pkt, const Fine_time_pt &time_now, Ack_packet::Individual_ack::Const_ptr ack, const Peer_socket::Sent_packet::Sent_when **sent_when) const
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that computes the RTT implied by a given individual ack...
                                                                                                                                  -
                                                                                                                                  Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
                                                                                                                                  -
                                                                                                                                  void new_round_trip_time_sample(Peer_socket::Ptr sock, Fine_duration round_trip_time)
                                                                                                                                  Handles a just-computed new RTT (round trip time) measurement for an individual packet earlier sent: ...
                                                                                                                                  -
                                                                                                                                  bool ok_to_rexmit_or_close(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &pkt_it, bool defer_delta_check)
                                                                                                                                  Checks whether the given sent packet has been retransmitted the maximum number of allowed times; if s...
                                                                                                                                  +
                                                                                                                                  void close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  A thread W method that handles the transition of the given socket from OPEN (any sub-state) to CLOSED...
                                                                                                                                  +
                                                                                                                                  void sock_disconnect_completed(Peer_socket::Ptr sock)
                                                                                                                                  While in S_OPEN+S_DISCONNECTING state (i.e., after beginning a graceful close with sock_disconnect_de...
                                                                                                                                  +
                                                                                                                                  Fine_duration compute_rtt_on_ack(Peer_socket::Sent_packet::Const_ptr flying_pkt, const Fine_time_pt &time_now, Ack_packet::Individual_ack::Const_ptr ack, const Peer_socket::Sent_packet::Sent_when **sent_when) const
                                                                                                                                  Helper of perform_accumulated_on_recv_tasks() that computes the RTT implied by a given individual ack...
                                                                                                                                  +
                                                                                                                                  Peer_socket::Ptr connect_with_metadata(const Remote_endpoint &to, const boost::asio::const_buffer &serialized_metadata, Error_code *err_code=0, const Peer_socket_options *opts=0)
                                                                                                                                  Same as connect() but sends, as part of the connection handshake, the user-supplied metadata,...
                                                                                                                                  +
                                                                                                                                  void new_round_trip_time_sample(Peer_socket::Ptr sock, Fine_duration round_trip_time)
                                                                                                                                  Handles a just-computed new RTT (round trip time) measurement for an individual packet earlier sent: ...
                                                                                                                                  +
                                                                                                                                  bool ok_to_rexmit_or_close(Peer_socket::Ptr sock, const Peer_socket::Sent_pkt_ordered_by_when_iter &pkt_it, bool defer_delta_check)
                                                                                                                                  Checks whether the given sent packet has been retransmitted the maximum number of allowed times; if s...
                                                                                                                                  util::Task_engine m_task_engine
                                                                                                                                  The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
                                                                                                                                  Definition: node.hpp:3739
                                                                                                                                  Port_space m_ports
                                                                                                                                  Flow port space for both client and server sockets. All threads may access this.
                                                                                                                                  Definition: node.hpp:3777
                                                                                                                                  -
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  -
                                                                                                                                  void drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  Handles a Drop_timer (Peer_socket::m_snd_drop_timer) event in ESTABLISHED state by dropping the speci...
                                                                                                                                  +
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  +
                                                                                                                                  void drop_timer_action(Peer_socket::Ptr sock, bool drop_all_packets)
                                                                                                                                  Handles a Drop_timer (Peer_socket::m_snd_drop_timer) event in ESTABLISHED state by dropping the speci...
                                                                                                                                  A class that keeps a Peer_socket_receive_stats data store, includes methods to conveniently accumulat...
                                                                                                                                  void good_data_accepted_packet(size_t data)
                                                                                                                                  Indicates good_data_packet(), and these data are not dropped (so either delivered into Receive buffer...
                                                                                                                                  void good_data_dropped_reassembly_q_overflow_packet(size_t data)
                                                                                                                                  Indicates good_data_packet(), but these data are dropped due to insufficient Receive reassembly queue...
                                                                                                                                  @@ -6734,66 +6740,66 @@
                                                                                                                                  void good_data_first_qd_packet(size_t data)
                                                                                                                                  Indicates good_data_accepted_packet(), and these data are, upon receipt, queued for reassembly (not i...
                                                                                                                                  void good_data_dropped_buf_overflow_packet(size_t data)
                                                                                                                                  Indicates good_data_packet(), but these data are dropped due to insufficient Receive buffer space.
                                                                                                                                  void late_or_dupe_data_packet(size_t data)
                                                                                                                                  Indicates total_data_packet(), but the arrived data have either already been received before or (more...
                                                                                                                                  -
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  - +
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  +
                                                                                                                                  size_t get_connect_metadata(const boost::asio::mutable_buffer &buffer, Error_code *err_code=0) const
                                                                                                                                  Obtains the serialized connect metadata, as supplied by the user during the connection handshake.
                                                                                                                                  size_t max_block_size_multiple(const size_t &opt_val_ref, const unsigned int *inflate_pct_val_ptr=0) const
                                                                                                                                  Returns the smallest multiple of max_block_size() that is >= the given option value,...
                                                                                                                                  bool sync_send_reactor_pattern_impl(const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Helper similar to sync_send_impl() but for the null_buffers versions of sync_send().
                                                                                                                                  -
                                                                                                                                  std::map< Sequence_number, Sent_pkt_ordered_by_when_iter > Sent_pkt_by_seq_num_map
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  +
                                                                                                                                  std::map< Sequence_number, Sent_pkt_ordered_by_when_iter > Sent_pkt_by_seq_num_map
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  bool sync_receive_reactor_pattern_impl(const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Helper similar to sync_receive_impl() but for the null_buffers versions of sync_receive().
                                                                                                                                  -
                                                                                                                                  Remote_endpoint m_remote_endpoint
                                                                                                                                  See remote_endpoint(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  -
                                                                                                                                  size_t sync_receive(const Mutable_buffer_sequence &target, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of receive().
                                                                                                                                  -
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  If !m_active_connect, this contains the serialized metadata that the user supplied on the other side ...
                                                                                                                                  +
                                                                                                                                  Remote_endpoint m_remote_endpoint
                                                                                                                                  See remote_endpoint(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  +
                                                                                                                                  size_t sync_receive(const Mutable_buffer_sequence &target, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of receive().
                                                                                                                                  +
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  If !m_active_connect, this contains the serialized metadata that the user supplied on the other side ...
                                                                                                                                  size_t node_sync_send(const Function< size_t(size_t max_data_size)> &snd_buf_feed_func_or_empty, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  This is to sync_send() as node_send() is to send().
                                                                                                                                  - -
                                                                                                                                  Error_code m_disconnect_cause
                                                                                                                                  The Error_code causing disconnection (if one has occurred or is occurring) on this socket; otherwise ...
                                                                                                                                  + +
                                                                                                                                  Error_code m_disconnect_cause
                                                                                                                                  The Error_code causing disconnection (if one has occurred or is occurring) on this socket; otherwise ...
                                                                                                                                  Peer_socket(log::Logger *logger_ptr, util::Task_engine *task_engine, const Peer_socket_options &opts)
                                                                                                                                  Constructs object; initializes most values to well-defined (0, empty, etc.) but not necessarily meani...
                                                                                                                                  Definition: peer_socket.cpp:37
                                                                                                                                  -
                                                                                                                                  Sequence_number m_rcv_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) contained in the original Syn_packet or Syn_ack_packet we received.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_rcv_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) contained in the original Syn_packet or Syn_ack_packet we received.
                                                                                                                                  const Remote_endpoint & remote_endpoint() const
                                                                                                                                  Intended other side of the connection (regardless of success, failure, or current State).
                                                                                                                                  -
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  +
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  @ S_OPEN
                                                                                                                                  Future reads or writes may be possible. A socket in this state may be Writable or Readable.
                                                                                                                                  @ S_CLOSED
                                                                                                                                  Neither future reads nor writes are possible, AND Node has disowned the Peer_socket.
                                                                                                                                  -
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  +
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  @ S_CONNECTED
                                                                                                                                  This Peer_socket was created through a passive connect (Node::accept() and the like) or an active con...
                                                                                                                                  @ S_CONNECTING
                                                                                                                                  This Peer_socket was created through an active connect (Node::connect() and the like),...
                                                                                                                                  @ S_DISCONNECTING
                                                                                                                                  This Peer_socket was created through a passive connect (Node::accept() and the like) or an active con...
                                                                                                                                  -
                                                                                                                                  size_t sync_send(const Const_buffer_sequence &data, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of send().
                                                                                                                                  +
                                                                                                                                  size_t sync_send(const Const_buffer_sequence &data, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of send().
                                                                                                                                  ~Peer_socket() override
                                                                                                                                  Boring virtual destructor. Note that deletion is to be handled exclusively via shared_ptr,...
                                                                                                                                  Definition: peer_socket.cpp:77
                                                                                                                                  Error_code disconnect_cause() const
                                                                                                                                  The error code that perviously caused state() to become State::S_CLOSED, or success code if state is ...
                                                                                                                                  -
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  +
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  flow_port_t local_port() const
                                                                                                                                  The local Flow-protocol port chosen by the Node (if active or passive open) or user (if passive open)...
                                                                                                                                  -
                                                                                                                                  flow_port_t m_local_port
                                                                                                                                  See local_port(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  -
                                                                                                                                  friend class Send_bandwidth_estimator
                                                                                                                                  Stats modules have const access to all socket internals.
                                                                                                                                  +
                                                                                                                                  flow_port_t m_local_port
                                                                                                                                  See local_port(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  +
                                                                                                                                  friend class Send_bandwidth_estimator
                                                                                                                                  Stats modules have const access to all socket internals.
                                                                                                                                  bool set_options(const Peer_socket_options &opts, Error_code *err_code=0)
                                                                                                                                  Dynamically replaces the current options set (options()) with the given options set.
                                                                                                                                  size_t node_send(const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Non-template helper for template send() that forwards the send() logic to Node::send().
                                                                                                                                  bool rexmit_on() const
                                                                                                                                  Whether retransmission is enabled on this connection.
                                                                                                                                  size_t node_sync_receive(const Function< size_t()> &rcv_buf_consume_func_or_empty, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  This is to sync_receive() as node_receive() is to receive().
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  -
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  +
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  @ S_ESTABLISHED
                                                                                                                                  Public state is OPEN+CONNECTED; in our opinion the connection is established.
                                                                                                                                  @ S_SYN_SENT
                                                                                                                                  Public state is OPEN+CONNECTING; user requested active connect; we sent SYN and are awaiting response...
                                                                                                                                  @ S_CLOSED
                                                                                                                                  Closed (dead or new) socket.
                                                                                                                                  @ S_SYN_RCVD
                                                                                                                                  Public state is OPEN+CONNECTING; other side requested passive connect via SYN; we sent SYN_ACK and ar...
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  void close_abruptly(Error_code *err_code=0)
                                                                                                                                  Acts as if fatal error error::Code::S_USER_CLOSED_ABRUPTLY has been discovered on the connection.
                                                                                                                                  size_t max_block_size() const
                                                                                                                                  The maximum number of bytes of user data per received or sent packet on this connection.
                                                                                                                                  Node * node() const
                                                                                                                                  Node that produced this Peer_socket.
                                                                                                                                  Definition: peer_socket.cpp:95
                                                                                                                                  Peer_socket_info info() const
                                                                                                                                  Returns a structure containing the most up-to-date stats about this connection.
                                                                                                                                  -
                                                                                                                                  Recvd_pkt_map::iterator Recvd_pkt_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps iterator type.
                                                                                                                                  -
                                                                                                                                  Mutex m_mutex
                                                                                                                                  This object's mutex.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_seq_num_map::const_iterator Sent_pkt_ordered_by_seq_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num const iterator type.
                                                                                                                                  -
                                                                                                                                  Peer_socket_info m_info_on_close
                                                                                                                                  This is the final set of stats collected at the time the socket was moved to S_CLOSED m_state.
                                                                                                                                  +
                                                                                                                                  Recvd_pkt_map::iterator Recvd_pkt_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps iterator type.
                                                                                                                                  +
                                                                                                                                  Mutex m_mutex
                                                                                                                                  This object's mutex.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_seq_num_map::const_iterator Sent_pkt_ordered_by_seq_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num const iterator type.
                                                                                                                                  +
                                                                                                                                  Peer_socket_info m_info_on_close
                                                                                                                                  This is the final set of stats collected at the time the socket was moved to S_CLOSED m_state.
                                                                                                                                  bool ensure_open(Error_code *err_code) const
                                                                                                                                  Helper that is equivalent to Node::ensure_sock_open(this, err_code).
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  -
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Analogous to Node::opt() but for per-socket options.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  +
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Analogous to Node::opt() but for per-socket options.
                                                                                                                                  std::string bytes_blocks_str(size_t bytes) const
                                                                                                                                  Helper that, given a byte count, returns a string with that byte count and the number of max_block_si...
                                                                                                                                  -
                                                                                                                                  Peer_socket_options m_opts
                                                                                                                                  This socket's per-socket set of options.
                                                                                                                                  +
                                                                                                                                  Peer_socket_options m_opts
                                                                                                                                  This socket's per-socket set of options.
                                                                                                                                  Peer_socket_options options() const
                                                                                                                                  Copies this socket's option set and returns that copy.
                                                                                                                                  -
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  -
                                                                                                                                  std::map< Sequence_number, boost::shared_ptr< Received_packet > > Recvd_pkt_map
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps type; see that data member.
                                                                                                                                  -
                                                                                                                                  Recvd_pkt_map::const_iterator Recvd_pkt_const_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps const iterator type.
                                                                                                                                  -
                                                                                                                                  Open_sub_state m_open_sub_state
                                                                                                                                  See state().
                                                                                                                                  +
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  +
                                                                                                                                  std::map< Sequence_number, boost::shared_ptr< Received_packet > > Recvd_pkt_map
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps type; see that data member.
                                                                                                                                  +
                                                                                                                                  Recvd_pkt_map::const_iterator Recvd_pkt_const_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps const iterator type.
                                                                                                                                  +
                                                                                                                                  Open_sub_state m_open_sub_state
                                                                                                                                  See state().
                                                                                                                                  size_t node_receive(const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Non-template helper for template receive() that forwards the receive() logic to Node::receive().
                                                                                                                                  State state(Open_sub_state *open_sub_state=0) const
                                                                                                                                  Current State of the socket.
                                                                                                                                  Definition: peer_socket.cpp:85
                                                                                                                                  void return_port(flow_port_t port, Error_code *err_code)
                                                                                                                                  Return a previously reserved port (of any type).
                                                                                                                                  Definition: port_space.cpp:175
                                                                                                                                  @@ -6849,58 +6855,58 @@
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  const flow_port_t S_PORT_ANY
                                                                                                                                  Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
                                                                                                                                  Definition: port_space.cpp:33
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:276
                                                                                                                                  -
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:282
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  -
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:299
                                                                                                                                  -
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:233
                                                                                                                                  -
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:270
                                                                                                                                  +
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:301
                                                                                                                                  +
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:307
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  +
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:324
                                                                                                                                  +
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:258
                                                                                                                                  +
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:295
                                                                                                                                  Scheduled_task_handle schedule_task_from_now(log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
                                                                                                                                  Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asi...
                                                                                                                                  Definition: sched_task.hpp:34
                                                                                                                                  bool scheduled_task_fired(log::Logger *logger_ptr, Scheduled_task_const_handle task)
                                                                                                                                  Returns whether a previously scheduled (by schedule_task_from_now() or similar) task has already fire...
                                                                                                                                  Definition: sched_task.cpp:238
                                                                                                                                  -
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:254
                                                                                                                                  -
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:342
                                                                                                                                  +
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:279
                                                                                                                                  +
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  Fine_duration scheduled_task_fires_from_now_or_canceled(log::Logger *logger_ptr, Scheduled_task_const_handle task)
                                                                                                                                  Returns how long remains until a previously scheduled (by schedule_task_from_now() or similar) task f...
                                                                                                                                  Definition: sched_task.cpp:200
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  -
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:246
                                                                                                                                  +
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:271
                                                                                                                                  boost::shared_ptr< void > Auto_cleanup
                                                                                                                                  Helper type for setup_auto_cleanup().
                                                                                                                                  Definition: util_fwd.hpp:205
                                                                                                                                  bool scheduled_task_cancel(log::Logger *logger_ptr, Scheduled_task_handle task)
                                                                                                                                  Attempts to prevent the execution of a previously scheduled (by schedule_task_from_now() or similar) ...
                                                                                                                                  Definition: sched_task.cpp:26
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  -
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:386
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  +
                                                                                                                                  unsigned char uint8_t
                                                                                                                                  Byte. Best way to represent a byte of binary data. This is 8 bits on all modern systems.
                                                                                                                                  Definition: common.hpp:391
                                                                                                                                  -
                                                                                                                                  Specifies the outgoing (pre-serialization) acknowledgment of a single received Data_packet,...
                                                                                                                                  -
                                                                                                                                  Equivalent of Individual_ack_rexmit_off but for sockets with retransmission enabled.
                                                                                                                                  -
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  -
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  -
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  -
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  +
                                                                                                                                  Specifies the outgoing (pre-serialization) acknowledgment of a single received Data_packet,...
                                                                                                                                  +
                                                                                                                                  Equivalent of Individual_ack_rexmit_off but for sockets with retransmission enabled.
                                                                                                                                  +
                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  uint64_t ack_delay_t
                                                                                                                                  Type used to store the ACK delay for a given individual acknowledged packet.
                                                                                                                                  +
                                                                                                                                  Fine_duration Ack_delay_time_unit
                                                                                                                                  Ack_delay_time_unit(1) is the duration corresponding to the ack_delay_t value 1; and proportionally f...
                                                                                                                                  +
                                                                                                                                  uint32_t rcv_wnd_t
                                                                                                                                  Type used to store the size of m_rcv_wnd member in a couple of different packet types.
                                                                                                                                  +
                                                                                                                                  uint8_t rexmit_id_t
                                                                                                                                  Type used to store the retransmission count in DATA and ACK packets.
                                                                                                                                  The data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in th...
                                                                                                                                  Definition: node.hpp:3904
                                                                                                                                  -
                                                                                                                                  Metadata describing the data sent in the acknowledgment of an individual received packet.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been received (and,...
                                                                                                                                  -
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  +
                                                                                                                                  Metadata describing the data sent in the acknowledgment of an individual received packet.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been received (and,...
                                                                                                                                  +
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  Received_packet(log::Logger *logger_ptr, size_t size, util::Blob *src_data)
                                                                                                                                  Constructs object by storing size of data and, if so instructed, the data themselves.
                                                                                                                                  -
                                                                                                                                  util::Blob m_data
                                                                                                                                  Byte sequence equal to that of Data_packet::m_data of the packet.
                                                                                                                                  -
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  -
                                                                                                                                  const order_num_t m_order_num
                                                                                                                                  Order number of the packet.
                                                                                                                                  -
                                                                                                                                  size_t m_sent_cwnd_bytes
                                                                                                                                  The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  -
                                                                                                                                  Fine_time_pt m_sent_time
                                                                                                                                  The timestamp when the packet is sent out.
                                                                                                                                  -
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  +
                                                                                                                                  util::Blob m_data
                                                                                                                                  Byte sequence equal to that of Data_packet::m_data of the packet.
                                                                                                                                  +
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  +
                                                                                                                                  const order_num_t m_order_num
                                                                                                                                  Order number of the packet.
                                                                                                                                  +
                                                                                                                                  size_t m_sent_cwnd_bytes
                                                                                                                                  The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  +
                                                                                                                                  Fine_time_pt m_sent_time
                                                                                                                                  The timestamp when the packet is sent out.
                                                                                                                                  +
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  Sent_packet(bool rexmit_on, boost::shared_ptr< Data_packet > packet, const Sent_when &sent_when)
                                                                                                                                  Constructs object with the given values and m_acks_after_me at zero.
                                                                                                                                  -
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  -
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  -
                                                                                                                                  const boost::shared_ptr< Data_packet > m_packet
                                                                                                                                  If retransmission is on, this is the DATA packet itself that was sent; otherwise null.
                                                                                                                                  -
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  -
                                                                                                                                  ack_count_t m_acks_after_me
                                                                                                                                  The number of times any packet with m_sent_when.back().m_order_num > this->m_sent_when....
                                                                                                                                  +
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  +
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  +
                                                                                                                                  const boost::shared_ptr< Data_packet > m_packet
                                                                                                                                  If retransmission is on, this is the DATA packet itself that was sent; otherwise null.
                                                                                                                                  +
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  +
                                                                                                                                  ack_count_t m_acks_after_me
                                                                                                                                  The number of times any packet with m_sent_when.back().m_order_num > this->m_sent_when....
                                                                                                                                  A data store that keeps stats about the a Peer_socket connection.
                                                                                                                                  Definition: info.hpp:456
                                                                                                                                  Peer_socket_send_stats m_snd
                                                                                                                                  Stats for outgoing direction of traffic. As opposed to the other m_snd_* members, this typically accu...
                                                                                                                                  Definition: info.hpp:511
                                                                                                                                  Node_options m_node_opts
                                                                                                                                  Per-node options currently set on the socket's Node.
                                                                                                                                  Definition: info.hpp:651
                                                                                                                                  @@ -6959,7 +6965,7 @@ diff --git a/doc/flow_doc/generated/html_full/peer__socket_8hpp.html b/doc/flow_doc/generated/html_full/peer__socket_8hpp.html index f604faf68..73a324df0 100644 --- a/doc/flow_doc/generated/html_full/peer__socket_8hpp.html +++ b/doc/flow_doc/generated/html_full/peer__socket_8hpp.html @@ -92,6 +92,7 @@ #include <boost/shared_ptr.hpp>
                                                                                                                                  #include <boost/enable_shared_from_this.hpp>
                                                                                                                                  #include <boost/move/unique_ptr.hpp>
                                                                                                                                  +#include <type_traits>

                                                                                                                                  Go to the source code of this file.

                                                                                                                                  @@ -130,7 +131,7 @@ diff --git a/doc/flow_doc/generated/html_full/peer__socket_8hpp_source.html b/doc/flow_doc/generated/html_full/peer__socket_8hpp_source.html index 7d41901e9..fb31b432c 100644 --- a/doc/flow_doc/generated/html_full/peer__socket_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/peer__socket_8hpp_source.html @@ -108,2621 +108,2616 @@
                                                                                                                                  36#include <boost/shared_ptr.hpp>
                                                                                                                                  37#include <boost/enable_shared_from_this.hpp>
                                                                                                                                  38#include <boost/move/unique_ptr.hpp>
                                                                                                                                  -
                                                                                                                                  39
                                                                                                                                  -
                                                                                                                                  40namespace flow::net_flow
                                                                                                                                  -
                                                                                                                                  41{
                                                                                                                                  -
                                                                                                                                  42// Types.
                                                                                                                                  -
                                                                                                                                  43
                                                                                                                                  -
                                                                                                                                  44/**
                                                                                                                                  -
                                                                                                                                  45 * A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and
                                                                                                                                  -
                                                                                                                                  46 * reliability support.
                                                                                                                                  -
                                                                                                                                  47 *
                                                                                                                                  -
                                                                                                                                  48 * Reliability is enabled or disabled via a socket option, Peer_socket_options::m_st_rexmit_on,
                                                                                                                                  -
                                                                                                                                  49 * at socket creation. Use unreliable mode with care -- see send() method doc header for details.
                                                                                                                                  -
                                                                                                                                  50 *
                                                                                                                                  -
                                                                                                                                  51 * ### Life cycle of a Peer_socket ###
                                                                                                                                  -
                                                                                                                                  52 * A given Peer_socket can arise either by connecting to
                                                                                                                                  -
                                                                                                                                  53 * Server_socket on a Node (Node::connect() or Node::sync_connect()), or by listening on a
                                                                                                                                  -
                                                                                                                                  54 * Node's Server_socket and accepting such a connection (Server_socket::accept() or
                                                                                                                                  -
                                                                                                                                  55 * Server_socket::sync_accept()). In all cases, Node or Server_socket generates a new Peer_socket
                                                                                                                                  -
                                                                                                                                  56 * and returns it (factory pattern). Peer_socket is not instantiable otherwise. A Peer_socket
                                                                                                                                  -
                                                                                                                                  57 * cannot be deleted explicitly by the user and will only be returned via `boost::shared_ptr<>`; when
                                                                                                                                  -
                                                                                                                                  58 * both the Node and all user code no longer refers to it, the Peer_socket will be destroyed.
                                                                                                                                  -
                                                                                                                                  59 *
                                                                                                                                  -
                                                                                                                                  60 * Once a `net_flow` user has a Peer_socket object, that object represents a socket in one of the
                                                                                                                                  -
                                                                                                                                  61 * following basic states:
                                                                                                                                  -
                                                                                                                                  62 *
                                                                                                                                  -
                                                                                                                                  63 * - Open.
                                                                                                                                  -
                                                                                                                                  64 * - Sub-states:
                                                                                                                                  -
                                                                                                                                  65 * - Connecting. (Never Writable, never Readable.)
                                                                                                                                  -
                                                                                                                                  66 * - Connected. (May be Writable, may be Readable.)
                                                                                                                                  -
                                                                                                                                  67 * - Disconnecting. (May be Readable, never Writable.)
                                                                                                                                  -
                                                                                                                                  68 * - Closed.
                                                                                                                                  -
                                                                                                                                  69 * - Socket can neither read nor write.
                                                                                                                                  -
                                                                                                                                  70 *
                                                                                                                                  -
                                                                                                                                  71 * Open.Connecting means means Node initiated a connect to the given server, and this is in
                                                                                                                                  -
                                                                                                                                  72 * progress. Open.Connected means the connection to the other Node is fully functional.
                                                                                                                                  -
                                                                                                                                  73 * Open.Disconnecting means either our side or the other side has initiated a clean or abrupt
                                                                                                                                  -
                                                                                                                                  74 * disconnect, but it is not yet entirely finished (background handshaking is happening, you have
                                                                                                                                  -
                                                                                                                                  75 * not read all available data or sent all queued data, etc.).
                                                                                                                                  -
                                                                                                                                  76 *
                                                                                                                                  -
                                                                                                                                  77 * In either case, reading and writing may or may not be possible at a given time, depending on the
                                                                                                                                  -
                                                                                                                                  78 * state of the internal buffers and the data having arrived on the logical connection. Thus all
                                                                                                                                  -
                                                                                                                                  79 * Open sub-states can and often should be treated the same way in a typical Flow-protocol-using algorithm:
                                                                                                                                  -
                                                                                                                                  80 * simply determine when the Peer_socket is Readable, and read; and similarly for Writable and
                                                                                                                                  -
                                                                                                                                  81 * write. Thus the sub-states are distinguished for informational/diagnostic purposes only, as user
                                                                                                                                  -
                                                                                                                                  82 * reading/writing logic in these states should usually be identical.
                                                                                                                                  -
                                                                                                                                  83 *
                                                                                                                                  -
                                                                                                                                  84 * @todo Closing connection considerations. May implement closing only via timeouts at first (as
                                                                                                                                  -
                                                                                                                                  85 * opposed to explicit closing). Below text refers to `close_final()` and `close_start()`, but those
                                                                                                                                  -
                                                                                                                                  86 * are just ideas and may be replaced with timeout, or nothing. At this time, the only closing
                                                                                                                                  -
                                                                                                                                  87 * supported is abrupt close due to error or abrupt close via close_abruptly().
                                                                                                                                  -
                                                                                                                                  88 *
                                                                                                                                  -
                                                                                                                                  89 * Closed means that the Peer_socket has become disconnected, and no data can possibly be
                                                                                                                                  -
                                                                                                                                  90 * received or sent, AND that Node has no more background internal operations to perform and has
                                                                                                                                  -
                                                                                                                                  91 * disowned the Peer_socket. In other words, a Closed Peer_socket is entirely dead.
                                                                                                                                  -
                                                                                                                                  92 *
                                                                                                                                  -
                                                                                                                                  93 * Exactly the following state transitions are possible for a given Peer_socket returned by Node:
                                                                                                                                  -
                                                                                                                                  94 *
                                                                                                                                  -
                                                                                                                                  95 * - start => Closed
                                                                                                                                  -
                                                                                                                                  96 * - start => Open
                                                                                                                                  -
                                                                                                                                  97 * - Open => Closed
                                                                                                                                  -
                                                                                                                                  98 *
                                                                                                                                  -
                                                                                                                                  99 * Note, in particular, that Closed is final; socket cannot move from Closed to
                                                                                                                                  -
                                                                                                                                  100 * Open. If after an error or valid disconnection you want to reestablish a
                                                                                                                                  -
                                                                                                                                  101 * connection, obtain a new Peer_socket from Node's factories. Rationale (subject to change):
                                                                                                                                  -
                                                                                                                                  102 * this cuts down on state having to be tracked inside a Peer_socket, while the interface becomes
                                                                                                                                  -
                                                                                                                                  103 * simpler without much impact on usability. Anti-rationale: contradicts BSD socket and boost.asio
                                                                                                                                  -
                                                                                                                                  104 * established practices; potentially more resource-intensive/slower in the event of errors and
                                                                                                                                  -
                                                                                                                                  105 * disconnects. Why IMO rationale > anti-rationale: it's simpler, and the potential problems do not
                                                                                                                                  -
                                                                                                                                  106 * appear immediately serious; added statefulness can be added later if found desirable.
                                                                                                                                  -
                                                                                                                                  107 *
                                                                                                                                  -
                                                                                                                                  108 * Receving, sending, and buffers: Peer_socket, like a TCP socket, has a Receive buffer (a/k/a
                                                                                                                                  -
                                                                                                                                  109 * FIFO queue of bytes) of some maximum size and a Send buffer (a/k/a FIFO queue of bytes) of some
                                                                                                                                  -
                                                                                                                                  110 * maximum size. They are typically not directly exposed via the interface, but their existence
                                                                                                                                  -
                                                                                                                                  111 * affects documented behavior. I formally describe them here, but generally they work similarly to
                                                                                                                                  -
                                                                                                                                  112 * TCP socket Send/Receive buffers.
                                                                                                                                  -
                                                                                                                                  113 *
                                                                                                                                  -
                                                                                                                                  114 * The Receive buffer: Contains bytes asynchronously received on the connection that have not yet
                                                                                                                                  -
                                                                                                                                  115 * been removed with a `*receive()` method. Any bytes that asynchronously arrive on the connection are
                                                                                                                                  -
                                                                                                                                  116 * asynchronously stored to the buffer on the other side of the buffer in a queued fashion.
                                                                                                                                  -
                                                                                                                                  117 *
                                                                                                                                  -
                                                                                                                                  118 * The Send buffer: Contains bytes intended to be asynchronously sent on the connection that have
                                                                                                                                  -
                                                                                                                                  119 * been placed there by a `*send()` method but not yet sent on the connection. Any bytes that are
                                                                                                                                  -
                                                                                                                                  120 * asynchronously sent on the connection are asynchronously removed from the buffer on the other
                                                                                                                                  -
                                                                                                                                  121 * side of the buffer in a queued fashion.
                                                                                                                                  -
                                                                                                                                  122 *
                                                                                                                                  -
                                                                                                                                  123 * With that in mind, here are the definitions of Readable and Writable while state is Open:
                                                                                                                                  -
                                                                                                                                  124 *
                                                                                                                                  -
                                                                                                                                  125 * - Readable <=> Data available in internal Receive buffer, and user has not explicitly announced
                                                                                                                                  -
                                                                                                                                  126 * via `close_final()` they're not interested in reading further.
                                                                                                                                  -
                                                                                                                                  127 * - Writable <=> Space for data available in internal Send buffer, and the state is Open.Connected.
                                                                                                                                  -
                                                                                                                                  128 *
                                                                                                                                  -
                                                                                                                                  129 * Note that neither definition really cares about the state of the network connection (e.g., could
                                                                                                                                  -
                                                                                                                                  130 * bytes actually be sent over the network at the moment?). There is one caveat: A
                                                                                                                                  -
                                                                                                                                  131 * socket is not Writable until Open.Connecting state is transitioned away from; this prevents user
                                                                                                                                  -
                                                                                                                                  132 * from buffering up send data before the connection is ready. (Allowing that would not necessarily
                                                                                                                                  -
                                                                                                                                  133 * be wrong, but I'm taking a cue from BSD socket semantics on this, as they seem to be convenient.)
                                                                                                                                  -
                                                                                                                                  134 *
                                                                                                                                  -
                                                                                                                                  135 * In Open, the following archetypal operations are provided. (In Closed all
                                                                                                                                  -
                                                                                                                                  136 * immediately fail; in Open.Disconnecting some immediately fail if `close*()` has been called.) Let
                                                                                                                                  -
                                                                                                                                  137 * R be the current size of data in the Receive buffer, and S be the available space for data in the
                                                                                                                                  -
                                                                                                                                  138 * Send buffer.
                                                                                                                                  -
                                                                                                                                  139 *
                                                                                                                                  -
                                                                                                                                  140 * - `receive(N)`. If Readable, return to caller `min(N, R)` oldest data to have been received from
                                                                                                                                  -
                                                                                                                                  141 * the other side, and remove them from Receive buffer. Otherwise do nothing.
                                                                                                                                  -
                                                                                                                                  142 * - `send(N)`. If Writable, take from caller `min(N, S)` data to be appended to the Send
                                                                                                                                  -
                                                                                                                                  143 * buffer and, when possible, sent to the other side. Otherwise do nothing.
                                                                                                                                  -
                                                                                                                                  144 * - `sync_receive(N)`. If Readable, `receive(N)`. Otherwise sleep until Readable, then `receive(N)`.
                                                                                                                                  -
                                                                                                                                  145 * - `sync_send(N)`. If Writable, `send(N)`. Otherwise sleep until Writable, then `send(N)`.
                                                                                                                                  -
                                                                                                                                  146 *
                                                                                                                                  -
                                                                                                                                  147 * These are similar to TCP Receive and Send APIs in non-blocking mode, and TCP Receive and Send APIs in
                                                                                                                                  -
                                                                                                                                  148 * blocking mode, respectively. There may be other similarly themed methods, but all use these as
                                                                                                                                  -
                                                                                                                                  149 * semantic building blocks.
                                                                                                                                  -
                                                                                                                                  150 *
                                                                                                                                  -
                                                                                                                                  151 * To understand the order of events, one can think of a disconnect-causing event (like a graceful
                                                                                                                                  -
                                                                                                                                  152 * close initiation from the remote socket) as a piece of data itself. Thus, for example, if 5
                                                                                                                                  -
                                                                                                                                  153 * bytes are received and placed into the Receive buffer without being read by the user, and then a
                                                                                                                                  -
                                                                                                                                  154 * connection close is detected, the socket will be Readable until the 5 bytes have been
                                                                                                                                  -
                                                                                                                                  155 * receive()ed, and the next receive() (or send()) would yield the error, since that's the order
                                                                                                                                  -
                                                                                                                                  156 * things happened. Similarly, suppose you've sent 5 bytes, but they haven't been yet
                                                                                                                                  -
                                                                                                                                  157 * sent over the wire and are sitting in the Send buffer. Then you trigger a graceful connection close.
                                                                                                                                  -
                                                                                                                                  158 * First the 5 bytes will be sent if possible, and then the closing procedure will actually begin.
                                                                                                                                  -
                                                                                                                                  159 *
                                                                                                                                  -
                                                                                                                                  160 * Abrupt closes such as connection resets may force both buffers to be immediately emptied without
                                                                                                                                  -
                                                                                                                                  161 * giving to the user or writing to the other side, so that the above rule does not have to apply.
                                                                                                                                  -
                                                                                                                                  162 * Typically a connection reset means the socket is immediately unusable no matter what was in the
                                                                                                                                  -
                                                                                                                                  163 * buffers at the time, per BSD socket semantics.
                                                                                                                                  -
                                                                                                                                  164 *
                                                                                                                                  -
                                                                                                                                  165 * ### Efficiently reading/writing ###
                                                                                                                                  -
                                                                                                                                  166 * The `sync_*`() methods are efficient, in that they use no processor
                                                                                                                                  -
                                                                                                                                  167 * cycles until Readable or Writable is achieved (i.e., they sleep until that point). The
                                                                                                                                  -
                                                                                                                                  168 * non-blocking versions don't sleep/block, however. For a program using them to be efficient it
                                                                                                                                  -
                                                                                                                                  169 * should sleep until Readable or Writable and only then call receive()/send(), when data are
                                                                                                                                  -
                                                                                                                                  170 * certainly available for immediate reading or writing. Moreover, a complex program is likely to
                                                                                                                                  -
                                                                                                                                  171 * want to perform this sleep-and-conditional-wake on a set of several Peer_socket objects simultaneously
                                                                                                                                  -
                                                                                                                                  172 * (similarly to `select()`, `epoll*()`, etc.). Use class Event_set for this purpose.
                                                                                                                                  -
                                                                                                                                  173 *
                                                                                                                                  -
                                                                                                                                  174 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  175 * Same as for Node. (Briefly: all operations safe for simultaneous execution on
                                                                                                                                  -
                                                                                                                                  176 * separate or the same object.)
                                                                                                                                  -
                                                                                                                                  177 *
                                                                                                                                  -
                                                                                                                                  178 * @internal
                                                                                                                                  -
                                                                                                                                  179 *
                                                                                                                                  -
                                                                                                                                  180 * Implementation notes
                                                                                                                                  -
                                                                                                                                  181 * --------------------
                                                                                                                                  -
                                                                                                                                  182 *
                                                                                                                                  -
                                                                                                                                  183 * While to a user a Peer_socket appears as a nearly self-sufficient object (i.e., you can do things
                                                                                                                                  -
                                                                                                                                  184 * like `s->send()`, which means 'socket `s`, send some data!''), the most reasonable way to internally
                                                                                                                                  -
                                                                                                                                  185 * implement this is to have Node contain the logic behind a Peer_socket (and how it works together
                                                                                                                                  -
                                                                                                                                  186 * with other Peer_socket objects and other internal infrastructure). Thus Node is the class with all of
                                                                                                                                  -
                                                                                                                                  187 * the logic behind (for example) `s->send()`. Peer_socket then, privately, is not too much more than a
                                                                                                                                  -
                                                                                                                                  188 * collection of data (like a `struct` almost) to help Node.
                                                                                                                                  -
                                                                                                                                  189 *
                                                                                                                                  -
                                                                                                                                  190 * Therefore Peer_socket provides a clean object-oriented public interface to the user but, on the
                                                                                                                                  -
                                                                                                                                  191 * implementation side, is basically a data store (with Node as `friend`) and forwards the logic to
                                                                                                                                  -
                                                                                                                                  192 * the originating Node. One idea to make this dichotomy more cleanly expressed (e.g., without
                                                                                                                                  -
                                                                                                                                  193 * `friend`) was to make Peer_socket a pure interface and have Node produce `Peer_socket_impl`
                                                                                                                                  -
                                                                                                                                  194 * objects, where `Peer_socket_impl` implements Peer_socket and is itself private to the user (a
                                                                                                                                  -
                                                                                                                                  195 * classic factory pattern). Unfortunately defining function templates such as `send<Buffers>()`
                                                                                                                                  -
                                                                                                                                  196 * (where `Buffers` is an arbitrary `Buffers` concept model) as pure `virtual` functions is not really
                                                                                                                                  -
                                                                                                                                  197 * possible in C++. Since such a templated interface can be highly convenient (see boost.asio with
                                                                                                                                  -
                                                                                                                                  198 * its seamless support for buffers and buffer sequences of most types, including scatter-gather),
                                                                                                                                  -
                                                                                                                                  199 * the usefulness of the interface trumps implementation beauty.
                                                                                                                                  -
                                                                                                                                  200 *
                                                                                                                                  -
                                                                                                                                  201 * To prevent node.cpp from being unmanageably large (and also because it makes sense),
                                                                                                                                  -
                                                                                                                                  202 * implementations for Node methods that deal only with an individual Peer_socket reside in
                                                                                                                                  -
                                                                                                                                  203 * peer_socket.cpp (even though they are members of Node, since, again, the logic is all forwarded to Node).
                                                                                                                                  -
                                                                                                                                  204 *
                                                                                                                                  -
                                                                                                                                  205 * @todo Rename `State` and `Open_sub_state` to `Phase` and `Open_sub_phase` respectively; and
                                                                                                                                  -
                                                                                                                                  206 * `Int_state` to `State`. Explain difference between phases (application-layer, user-visible and used
                                                                                                                                  -
                                                                                                                                  207 * close to application layer) and states (transport layer, internal).
                                                                                                                                  -
                                                                                                                                  208 *
                                                                                                                                  -
                                                                                                                                  209 * @todo Look into a way to defeat the need for boiler-plate trickery -- with low but non-zero perf cost --
                                                                                                                                  -
                                                                                                                                  210 * involving `*_socket`-vs-`Node` circular references in method templates, such as the way
                                                                                                                                  -
                                                                                                                                  211 * Peer_socket::send() and Peer_socket::receive() internally make `Function<>`s before forwarding to the core
                                                                                                                                  -
                                                                                                                                  212 * in Node. Can this be done with `.inl` files? Look into how Boost internally uses `.inl` files; this could
                                                                                                                                  -
                                                                                                                                  213 * inspire a solution... or not.
                                                                                                                                  -
                                                                                                                                  214 */
                                                                                                                                  - - -
                                                                                                                                  217 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  -
                                                                                                                                  218 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket>>,
                                                                                                                                  -
                                                                                                                                  219 // Allow access to Ptr(this) from inside Peer_socket methods. Just call shared_from_this().
                                                                                                                                  -
                                                                                                                                  220 public boost::enable_shared_from_this<Peer_socket>,
                                                                                                                                  -
                                                                                                                                  221 public log::Log_context,
                                                                                                                                  -
                                                                                                                                  222 private boost::noncopyable
                                                                                                                                  -
                                                                                                                                  223{
                                                                                                                                  -
                                                                                                                                  224public:
                                                                                                                                  -
                                                                                                                                  225 // Types.
                                                                                                                                  -
                                                                                                                                  226
                                                                                                                                  -
                                                                                                                                  227 /// State of a Peer_socket.
                                                                                                                                  -
                                                                                                                                  228 enum class State
                                                                                                                                  -
                                                                                                                                  229 {
                                                                                                                                  -
                                                                                                                                  230 /// Future reads or writes may be possible. A socket in this state may be Writable or Readable.
                                                                                                                                  -
                                                                                                                                  231 S_OPEN,
                                                                                                                                  -
                                                                                                                                  232 /// Neither future reads nor writes are possible, AND Node has disowned the Peer_socket.
                                                                                                                                  -
                                                                                                                                  233 S_CLOSED
                                                                                                                                  -
                                                                                                                                  234 };
                                                                                                                                  -
                                                                                                                                  235
                                                                                                                                  -
                                                                                                                                  236 /// The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  -
                                                                                                                                  237 enum class Open_sub_state
                                                                                                                                  -
                                                                                                                                  238 {
                                                                                                                                  -
                                                                                                                                  239 /**
                                                                                                                                  -
                                                                                                                                  240 * This Peer_socket was created through an active connect (Node::connect() and the like), and
                                                                                                                                  -
                                                                                                                                  241 * the connection to the remote Node is currently being negotiated by this socket's Node.
                                                                                                                                  -
                                                                                                                                  242 * A socket in this state may be Writable but cannot be Readable. However, except for
                                                                                                                                  -
                                                                                                                                  243 * diagnostic purposes, this state should generally be treated the same as S_CONNECTED.
                                                                                                                                  -
                                                                                                                                  244 */
                                                                                                                                  -
                                                                                                                                  245 S_CONNECTING,
                                                                                                                                  -
                                                                                                                                  246
                                                                                                                                  -
                                                                                                                                  247 /**
                                                                                                                                  -
                                                                                                                                  248 * This Peer_socket was created through a passive connect (Node::accept() and the like) or an
                                                                                                                                  -
                                                                                                                                  249 * active connect (Node::connect() and the like), and the connection is (as far this socket's
                                                                                                                                  -
                                                                                                                                  250 * Node knows) set up and functioning. A socket in this state may be Writable or Readable.
                                                                                                                                  -
                                                                                                                                  251 */
                                                                                                                                  -
                                                                                                                                  252 S_CONNECTED,
                                                                                                                                  -
                                                                                                                                  253
                                                                                                                                  -
                                                                                                                                  254 /**
                                                                                                                                  -
                                                                                                                                  255 * This Peer_socket was created through a passive connect (Node::accept() and the like) or an
                                                                                                                                  -
                                                                                                                                  256 * active connect (Node::connect() and the like), but since then either an active close,
                                                                                                                                  -
                                                                                                                                  257 * passive close, or an error has begun to close the connection, but data may still possibly
                                                                                                                                  -
                                                                                                                                  258 * arrive and be Readable; also data may have been "sent" but still sitting in the Send buffer
                                                                                                                                  -
                                                                                                                                  259 * and needs to be sent over the network. A socket in this state may be Readable but cannot
                                                                                                                                  -
                                                                                                                                  260 * be Writable.
                                                                                                                                  -
                                                                                                                                  261 *
                                                                                                                                  -
                                                                                                                                  262 * This implies that a non-S_CLOSED socket may be, at a lower level, disconnected. For
                                                                                                                                  -
                                                                                                                                  263 * example, say there are 5 bytes in the Receive buffer, and the other side sends a graceful
                                                                                                                                  -
                                                                                                                                  264 * disconnect packet to this socket. This means the connection is finished, but the user can
                                                                                                                                  -
                                                                                                                                  265 * still receive() the 5 bytes (without blocking). Then state will remain
                                                                                                                                  -
                                                                                                                                  266 * S_OPEN.S_DISCONNECTING until the last of the 5 bytes is received (gone from the buffer); at
                                                                                                                                  -
                                                                                                                                  267 * this point state may change to S_CLOSED (pending any other work Node must do to be able to
                                                                                                                                  -
                                                                                                                                  268 * disown the socket).
                                                                                                                                  -
                                                                                                                                  269 */
                                                                                                                                  -
                                                                                                                                  270 S_DISCONNECTING
                                                                                                                                  -
                                                                                                                                  271 }; // enum class Open_sub_state
                                                                                                                                  -
                                                                                                                                  272
                                                                                                                                  -
                                                                                                                                  273 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  274
                                                                                                                                  -
                                                                                                                                  275 /// Boring `virtual` destructor. Note that deletion is to be handled exclusively via `shared_ptr`, never explicitly.
                                                                                                                                  -
                                                                                                                                  276 ~Peer_socket() override;
                                                                                                                                  -
                                                                                                                                  277
                                                                                                                                  -
                                                                                                                                  278 // Methods.
                                                                                                                                  -
                                                                                                                                  279
                                                                                                                                  -
                                                                                                                                  280 /**
                                                                                                                                  -
                                                                                                                                  281 * Current State of the socket.
                                                                                                                                  -
                                                                                                                                  282 *
                                                                                                                                  -
                                                                                                                                  283 * @param open_sub_state
                                                                                                                                  -
                                                                                                                                  284 * Ignored if null. Otherwise, if and only if State::S_OPEN is returned, `*open_sub_state` is set to
                                                                                                                                  -
                                                                                                                                  285 * the current sub-state of `S_OPEN`.
                                                                                                                                  -
                                                                                                                                  286 * @return Current main state of the socket.
                                                                                                                                  -
                                                                                                                                  287 */
                                                                                                                                  -
                                                                                                                                  288 State state(Open_sub_state* open_sub_state = 0) const;
                                                                                                                                  -
                                                                                                                                  289
                                                                                                                                  -
                                                                                                                                  290 /**
                                                                                                                                  -
                                                                                                                                  291 * Node that produced this Peer_socket.
                                                                                                                                  -
                                                                                                                                  292 *
                                                                                                                                  -
                                                                                                                                  293 * @return Pointer to (guaranteed valid) Node; null if state is State::S_CLOSED.
                                                                                                                                  -
                                                                                                                                  294 */
                                                                                                                                  -
                                                                                                                                  295 Node* node() const;
                                                                                                                                  -
                                                                                                                                  296
                                                                                                                                  -
                                                                                                                                  297 /**
                                                                                                                                  -
                                                                                                                                  298 * Intended other side of the connection (regardless of success, failure, or current State).
                                                                                                                                  -
                                                                                                                                  299 * For a given Peer_socket, this will always return the same value, even if state is
                                                                                                                                  -
                                                                                                                                  300 * State::S_CLOSED.
                                                                                                                                  -
                                                                                                                                  301 *
                                                                                                                                  -
                                                                                                                                  302 * @return See above.
                                                                                                                                  -
                                                                                                                                  303 */
                                                                                                                                  -
                                                                                                                                  304 const Remote_endpoint& remote_endpoint() const;
                                                                                                                                  -
                                                                                                                                  305
                                                                                                                                  -
                                                                                                                                  306 /**
                                                                                                                                  -
                                                                                                                                  307 * The local Flow-protocol port chosen by the Node (if active or passive open) or user (if passive open) for
                                                                                                                                  -
                                                                                                                                  308 * this side of the connection. For a given Peer_socket, this will always return the same value,
                                                                                                                                  -
                                                                                                                                  309 * even if state is State::S_CLOSED. However, when state is State::S_CLOSED, the port may be unused or
                                                                                                                                  -
                                                                                                                                  310 * taken by another socket.
                                                                                                                                  -
                                                                                                                                  311 *
                                                                                                                                  -
                                                                                                                                  312 * @return See above.
                                                                                                                                  -
                                                                                                                                  313 */
                                                                                                                                  -
                                                                                                                                  314 flow_port_t local_port() const;
                                                                                                                                  -
                                                                                                                                  315
                                                                                                                                  -
                                                                                                                                  316 /**
                                                                                                                                  -
                                                                                                                                  317 * Obtains the serialized connect metadata, as supplied by the user during the connection handshake.
                                                                                                                                  -
                                                                                                                                  318 * If this side initiated the connection (Node::connect() and friends), then this will equal what
                                                                                                                                  -
                                                                                                                                  319 * was passed to the connect_with_metadata() (or similar) method. More likely, if this side
                                                                                                                                  -
                                                                                                                                  320 * accepted the connection (Server_socket::accept() and friends), then this will equal what the
                                                                                                                                  -
                                                                                                                                  321 * user on the OTHER side passed to connect_with_metadata() or similar.
                                                                                                                                  -
                                                                                                                                  322 *
                                                                                                                                  -
                                                                                                                                  323 * @note It is up to the user to deserialize the metadata portably. One recommended convention is to
                                                                                                                                  -
                                                                                                                                  324 * use `boost::endian::native_to_little()` (and similar) before connecting; and
                                                                                                                                  -
                                                                                                                                  325 * on the other side use the reverse (`boost::endian::little_to_native()`) before using the value.
                                                                                                                                  -
                                                                                                                                  326 * Packet dumps will show a flipped (little-endian) representation, while with most platforms the conversion
                                                                                                                                  -
                                                                                                                                  327 * will be a no-op at compile time. Alternatively use `native_to_big()` and vice-versa.
                                                                                                                                  -
                                                                                                                                  328 * @note If a connect() variant without `_with_metadata` in the name was used, then the metadata are
                                                                                                                                  -
                                                                                                                                  329 * composed of a single byte with the zero value.
                                                                                                                                  -
                                                                                                                                  330 * @param buffer
                                                                                                                                  -
                                                                                                                                  331 * A buffer to copy the metadata into.
                                                                                                                                  -
                                                                                                                                  332 * @param err_code
                                                                                                                                  -
                                                                                                                                  333 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  334 * @return The size of the copied metadata.
                                                                                                                                  -
                                                                                                                                  335 */
                                                                                                                                  -
                                                                                                                                  336 size_t get_connect_metadata(const boost::asio::mutable_buffer& buffer,
                                                                                                                                  -
                                                                                                                                  337 Error_code* err_code = 0) const;
                                                                                                                                  -
                                                                                                                                  338
                                                                                                                                  -
                                                                                                                                  339 /**
                                                                                                                                  -
                                                                                                                                  340 * Sends (adds to the Send buffer) the given bytes of data up to a maximum internal buffer size;
                                                                                                                                  -
                                                                                                                                  341 * and asynchronously sends them to the other side. The data given is copied into `*this`, in the order
                                                                                                                                  -
                                                                                                                                  342 * given. Only as many bytes as possible without the Send buffer size exceeding a certain max are
                                                                                                                                  -
                                                                                                                                  343 * copied.
                                                                                                                                  -
                                                                                                                                  344 *
                                                                                                                                  -
                                                                                                                                  345 * The method does not block. Data are then sent asynchronously (in the background).
                                                                                                                                  -
                                                                                                                                  346 *
                                                                                                                                  -
                                                                                                                                  347 * Method does nothing except possibly logging if there are no bytes in data.
                                                                                                                                  -
                                                                                                                                  348 *
                                                                                                                                  -
                                                                                                                                  349 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  350 * These are the possible outcomes.
                                                                                                                                  -
                                                                                                                                  351 * 1. There is no space in the Send buffer (usually due to network congestion). Socket not
                                                                                                                                  -
                                                                                                                                  352 * Writable. 0 is returned; `*err_code` is set to success unless null; no data buffered.
                                                                                                                                  -
                                                                                                                                  353 * 2. The socket is not yet fully connected (`S_OPEN+S_CONNECTING` state). Socket not
                                                                                                                                  -
                                                                                                                                  354 * Writable. 0 is returned; `*err_code` is set to success unless null; no data buffered.
                                                                                                                                  -
                                                                                                                                  355 * 3. There is space in the Send buffer, and socket connection is open (`S_OPEN+S_CONNECTED`).
                                                                                                                                  -
                                                                                                                                  356 * Socket Writable. >= 1 is returned; `*err_code` is set to success; data buffered.
                                                                                                                                  -
                                                                                                                                  357 * 4. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  358 * specific error unless null; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  359 *
                                                                                                                                  -
                                                                                                                                  360 * The semantics of -3- (the success case) are as follows. N bytes will be copied into Send
                                                                                                                                  -
                                                                                                                                  361 * buffer from the start of the Const_buffer_sequence data. These N bytes may be spread across 1
                                                                                                                                  -
                                                                                                                                  362 * or more buffers in that sequence; the subdivision structure of the sequence of bytes into
                                                                                                                                  -
                                                                                                                                  363 * buffers has no effect on what will be buffered in Send buffer (e.g., "data" could be N+ 1-byte
                                                                                                                                  -
                                                                                                                                  364 * buffers, or one N+-byte buffer -- the result would be the same). N equals the smaller of: the
                                                                                                                                  -
                                                                                                                                  365 * available space in the Send buffer; and `buffer_size(data)`. We return N.
                                                                                                                                  -
                                                                                                                                  366 *
                                                                                                                                  -
                                                                                                                                  367 * ### Reliability and ordering guarantees: if the socket option rexmit-on is enabled ###
                                                                                                                                  -
                                                                                                                                  368 * Reliability and ordering are guaranteed, and there is no notion of message boundaries. There is no possibility
                                                                                                                                  -
                                                                                                                                  369 * of data duplication. In other words full stream-of-bytes functionality is provided, as in TCP.
                                                                                                                                  -
                                                                                                                                  370 *
                                                                                                                                  -
                                                                                                                                  371 * ### Reliability and ordering guarantees: if the socket option rexmit-on is NOT enabled ###
                                                                                                                                  -
                                                                                                                                  372 * NO reliability guarantees are given, UNLESS *ALL* calls to send() (and other `*send`() methods)
                                                                                                                                  -
                                                                                                                                  373 * satisfy the condition: '`buffer_size(data)` is a multiple of `sock->max_block_size()`'; AND all
                                                                                                                                  -
                                                                                                                                  374 * calls to receive() (and other `*receive()` methods) on the OTHER side satisfy the condition:
                                                                                                                                  -
                                                                                                                                  375 * '`buffer_size(target)` is a multiple of `sock->max_block_size()`.' If and only if these guidelines
                                                                                                                                  -
                                                                                                                                  376 * are followed, and there is no connection closure, the following reliability guarantee is made:
                                                                                                                                  -
                                                                                                                                  377 *
                                                                                                                                  -
                                                                                                                                  378 * Let a "block" be a contiguous chunk of bytes in a "data" buffer sequence immediately following
                                                                                                                                  -
                                                                                                                                  379 * another "block," except the first "block" in a connection, which begins with the first byte of
                                                                                                                                  -
                                                                                                                                  380 * the "data" buffer sequence passed to the first `*send()` call on that connection. Then: Each
                                                                                                                                  -
                                                                                                                                  381 * given block will either be available to `*receive()` on the other side exactly once and without
                                                                                                                                  -
                                                                                                                                  382 * corruption; or not available to `*receive()` at all. Blocks may arrive in a different order than
                                                                                                                                  -
                                                                                                                                  383 * specified here, including with respect to other `*send()` calls performed before or after this
                                                                                                                                  -
                                                                                                                                  384 * one. In other words, these are guaranteed: block boundary preservation, protection against
                                                                                                                                  -
                                                                                                                                  385 * corruption, protection again duplication. These are not guaranteed: order preservation,
                                                                                                                                  -
                                                                                                                                  386 * delivery. Informally, the latter factors are more likely to be present on higher quality
                                                                                                                                  -
                                                                                                                                  387 * network paths.
                                                                                                                                  -
                                                                                                                                  388 *
                                                                                                                                  -
                                                                                                                                  389 * @tparam Const_buffer_sequence
                                                                                                                                  -
                                                                                                                                  390 * Type that models the boost.asio `ConstBufferSequence` concept (see Boost docs).
                                                                                                                                  -
                                                                                                                                  391 * Basically, it's any container with elements convertible to `boost::asio::const_buffer`;
                                                                                                                                  -
                                                                                                                                  392 * and bidirectional iterator support. Examples: `vector<const_buffer>`, `list<const_buffer>`.
                                                                                                                                  -
                                                                                                                                  393 * Why allow `const_buffer` instead of, say, `Sequence` of bytes? Same reason as boost.asio's
                                                                                                                                  -
                                                                                                                                  394 * send functions: it allows a great amount of flexibility without sacrificing performance,
                                                                                                                                  -
                                                                                                                                  395 * since `boost::asio::buffer()` function can adapt lots of different objects (arrays,
                                                                                                                                  -
                                                                                                                                  396 * `vector`s, `string`s, and more -- composed of bytes, integers, and more).
                                                                                                                                  -
                                                                                                                                  397 * @param data
                                                                                                                                  -
                                                                                                                                  398 * Buffer sequence from which a stream of bytes to add to Send buffer will be obtained.
                                                                                                                                  -
                                                                                                                                  399 * @param err_code
                                                                                                                                  -
                                                                                                                                  400 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  401 * Error implies that neither this send() nor any subsequent `*send()` on this socket
                                                                                                                                  -
                                                                                                                                  402 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  403 * @return Number of bytes (possibly zero) added to buffer. Always 0 if `bool(*err_code) == true` when
                                                                                                                                  -
                                                                                                                                  404 * send() returns.
                                                                                                                                  -
                                                                                                                                  405 */
                                                                                                                                  -
                                                                                                                                  406 template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  407 size_t send(const Const_buffer_sequence& data, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  408
                                                                                                                                  -
                                                                                                                                  409 /**
                                                                                                                                  -
                                                                                                                                  410 * Blocking (synchronous) version of send(). Acts just like send(), except that if Socket is not
                                                                                                                                  -
                                                                                                                                  411 * immediately Writable (i.e., send() would return 0 and no error), waits until it is Writable
                                                                                                                                  -
                                                                                                                                  412 * (send() would return either >0, or 0 and an error) and returns `send(data, err_code)`. If a
                                                                                                                                  -
                                                                                                                                  413 * timeout is specified, and this timeout expires before socket is Writable, acts like send()
                                                                                                                                  -
                                                                                                                                  414 * executed on an un-Writable socket.
                                                                                                                                  -
                                                                                                                                  415 *
                                                                                                                                  -
                                                                                                                                  416 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  417 * These are the possible outcomes (assuming there are data in the argument `data`).
                                                                                                                                  -
                                                                                                                                  418 * 1. There is space in the Send buffer, and socket connection
                                                                                                                                  -
                                                                                                                                  419 * is open (`S_OPEN+S_CONNECTED`). Socket Writable. >= 1 is returned; `*err_code` is set to
                                                                                                                                  -
                                                                                                                                  420 * success unless null; data buffered.
                                                                                                                                  -
                                                                                                                                  421 * 2. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  422 * specific error unless null; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  423 * The code error::Code::S_WAIT_INTERRUPTED means the wait was interrupted
                                                                                                                                  -
                                                                                                                                  424 * (similarly to POSIX's `EINTR`).
                                                                                                                                  -
                                                                                                                                  425 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  -
                                                                                                                                  426 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  -
                                                                                                                                  427 *
                                                                                                                                  -
                                                                                                                                  428 * The semantics of -1- (the success case) equal those of send().
                                                                                                                                  -
                                                                                                                                  429 *
                                                                                                                                  -
                                                                                                                                  430 * Note that it is NOT possible to return 0 and no error.
                                                                                                                                  -
                                                                                                                                  431 *
                                                                                                                                  -
                                                                                                                                  432 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  -
                                                                                                                                  433 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  -
                                                                                                                                  434 *
                                                                                                                                  -
                                                                                                                                  435 * @see The version of sync_send() with no timeout.
                                                                                                                                  -
                                                                                                                                  436 * @tparam Rep
                                                                                                                                  -
                                                                                                                                  437 * See boost::chrono::duration documentation (and see above tip).
                                                                                                                                  -
                                                                                                                                  438 * @tparam Period
                                                                                                                                  -
                                                                                                                                  439 * See boost::chrono::duration documentation (and see above tip).
                                                                                                                                  -
                                                                                                                                  440 * @tparam Const_buffer_sequence
                                                                                                                                  -
                                                                                                                                  441 * See send().
                                                                                                                                  -
                                                                                                                                  442 * @param data
                                                                                                                                  -
                                                                                                                                  443 * See send().
                                                                                                                                  -
                                                                                                                                  444 * @param max_wait
                                                                                                                                  -
                                                                                                                                  445 * The maximum amount of time from now to wait before giving up on the wait and returning.
                                                                                                                                  -
                                                                                                                                  446 * `"duration<Rep, Period>::max()"` will eliminate the time limit and cause indefinite wait
                                                                                                                                  -
                                                                                                                                  447 * (i.e., no timeout).
                                                                                                                                  -
                                                                                                                                  448 * @param err_code
                                                                                                                                  -
                                                                                                                                  449 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  450 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  -
                                                                                                                                  451 * neither this send() nor any subsequent send() on this socket
                                                                                                                                  -
                                                                                                                                  452 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  453 * @return Number of bytes (possibly zero) added to Send buffer. Always 0 if `bool(*err_code) == true`
                                                                                                                                  -
                                                                                                                                  454 * when sync_send() returns.
                                                                                                                                  -
                                                                                                                                  455 */
                                                                                                                                  -
                                                                                                                                  456 template<typename Rep, typename Period, typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  457 size_t sync_send(const Const_buffer_sequence& data,
                                                                                                                                  -
                                                                                                                                  458 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  459
                                                                                                                                  -
                                                                                                                                  460 /**
                                                                                                                                  -
                                                                                                                                  461 * `sync_send()` operating in `null_buffers` mode, wherein -- if Writable state is reached -- the actual data
                                                                                                                                  -
                                                                                                                                  462 * are not moved out of any buffer, leaving that to the caller to do if desired. Hence, this is a way of waiting
                                                                                                                                  -
                                                                                                                                  463 * for Writable state that could be more concise in some situations than Event_set::sync_wait().
                                                                                                                                  -
                                                                                                                                  464 *
                                                                                                                                  -
                                                                                                                                  465 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  466 * These are the possible outcomes:
                                                                                                                                  -
                                                                                                                                  467 * 1. There is space in the Send buffer; and socket is fully connected
                                                                                                                                  -
                                                                                                                                  468 * (`S_OPEN+S_CONNECTED`). Socket
                                                                                                                                  -
                                                                                                                                  469 * Writable. `true` is returned; `*err_code` is set to success unless null.
                                                                                                                                  -
                                                                                                                                  470 * 2. The operation cannot proceed due to an error. `false` is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  471 * specific error unless null. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  -
                                                                                                                                  472 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  473 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  -
                                                                                                                                  474 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  -
                                                                                                                                  475 *
                                                                                                                                  -
                                                                                                                                  476 * Note that it is NOT possible to return `false` and no error.
                                                                                                                                  -
                                                                                                                                  477 *
                                                                                                                                  -
                                                                                                                                  478 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  -
                                                                                                                                  479 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  -
                                                                                                                                  480 *
                                                                                                                                  -
                                                                                                                                  481 * @tparam Rep
                                                                                                                                  -
                                                                                                                                  482 * See other sync_send().
                                                                                                                                  -
                                                                                                                                  483 * @tparam Period
                                                                                                                                  -
                                                                                                                                  484 * See other sync_send().
                                                                                                                                  -
                                                                                                                                  485 * @param max_wait
                                                                                                                                  -
                                                                                                                                  486 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  487 * @param err_code
                                                                                                                                  -
                                                                                                                                  488 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  489 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  -
                                                                                                                                  490 * neither this nor any subsequent send() on this socket
                                                                                                                                  -
                                                                                                                                  491 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  492 * @return `true` if 1+ bytes are possible to add to Send buffer; `false` if either a timeout has occurred (bytes
                                                                                                                                  -
                                                                                                                                  493 * not writable), or another error has occurred.
                                                                                                                                  -
                                                                                                                                  494 */
                                                                                                                                  -
                                                                                                                                  495 template<typename Rep, typename Period>
                                                                                                                                  -
                                                                                                                                  496 bool sync_send(const boost::asio::null_buffers&,
                                                                                                                                  -
                                                                                                                                  497 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  498
                                                                                                                                  -
                                                                                                                                  499 /**
                                                                                                                                  -
                                                                                                                                  500 * Equivalent to `sync_send(data, duration::max(), err_code)`; i.e., sync_send() with no timeout.
                                                                                                                                  -
                                                                                                                                  501 *
                                                                                                                                  -
                                                                                                                                  502 * @tparam Const_buffer_sequence
                                                                                                                                  -
                                                                                                                                  503 * See other sync_send().
                                                                                                                                  -
                                                                                                                                  504 * @param data
                                                                                                                                  -
                                                                                                                                  505 * See other sync_send().
                                                                                                                                  -
                                                                                                                                  506 * @param err_code
                                                                                                                                  -
                                                                                                                                  507 * See other sync_send().
                                                                                                                                  -
                                                                                                                                  508 * @return See other sync_send().
                                                                                                                                  -
                                                                                                                                  509 */
                                                                                                                                  -
                                                                                                                                  510 template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  511 size_t sync_send(const Const_buffer_sequence& data, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  512
                                                                                                                                  -
                                                                                                                                  513 /**
                                                                                                                                  -
                                                                                                                                  514 * Equivalent to `sync_send(null_buffers(), duration::max(), err_code)`; i.e., `sync_send(null_buffers)`
                                                                                                                                  -
                                                                                                                                  515 * with no timeout.
                                                                                                                                  -
                                                                                                                                  516 *
                                                                                                                                  -
                                                                                                                                  517 * @param err_code
                                                                                                                                  -
                                                                                                                                  518 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  519 * @param tag
                                                                                                                                  -
                                                                                                                                  520 * Tag argument.
                                                                                                                                  -
                                                                                                                                  521 * @return See other sync_receive().
                                                                                                                                  -
                                                                                                                                  522 */
                                                                                                                                  -
                                                                                                                                  523 bool sync_send(const boost::asio::null_buffers&, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  524
                                                                                                                                  -
                                                                                                                                  525 /**
                                                                                                                                  -
                                                                                                                                  526 * Receives (consumes from the Receive buffer) bytes of data, up to a given maximum
                                                                                                                                  -
                                                                                                                                  527 * cumulative number of bytes as inferred from size of provided target buffer sequence. The data
                                                                                                                                  -
                                                                                                                                  528 * are copied into the user's structure and then removed from the Receive buffer.
                                                                                                                                  -
                                                                                                                                  529 *
                                                                                                                                  -
                                                                                                                                  530 * The method does not block. In particular if there are no data already received from the other
                                                                                                                                  -
                                                                                                                                  531 * side, we return no data.
                                                                                                                                  -
                                                                                                                                  532 *
                                                                                                                                  -
                                                                                                                                  533 * If the provided buffer has size zero, the method is a NOOP other than possibly logging.
                                                                                                                                  -
                                                                                                                                  534 *
                                                                                                                                  -
                                                                                                                                  535 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  536 * These are the possible outcomes.
                                                                                                                                  -
                                                                                                                                  537 * 1. There are no data in the Receive buffer. Socket not Readable. 0 is returned;
                                                                                                                                  -
                                                                                                                                  538 * `*err_code` is set to success unless null; no data returned.
                                                                                                                                  -
                                                                                                                                  539 * 2. The socket is not yet fully connected (`S_OPEN+S_CONNECTING`). Socket not
                                                                                                                                  -
                                                                                                                                  540 * Readable. 0 is returned; `*err_code` is set to success unless null; no data returned.
                                                                                                                                  -
                                                                                                                                  541 * 3. There are data in the Receive buffer; and socket is fully connected (`S_OPEN+S_CONNECTED`)
                                                                                                                                  -
                                                                                                                                  542 * or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket Readable. >= 1 is returned;
                                                                                                                                  -
                                                                                                                                  543 * *err_code is set to success; data returned.
                                                                                                                                  -
                                                                                                                                  544 * 4. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  545 * specific error; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  546 *
                                                                                                                                  -
                                                                                                                                  547 * The semantics of -3- (the success case) are as follows. N bytes will be copied from Receive
                                                                                                                                  -
                                                                                                                                  548 * buffer beginning at the start of the `Mutable_buffer_sequence target`. These N bytes may be
                                                                                                                                  -
                                                                                                                                  549 * spread across 1 or more buffers in that sequence; the subdivision structure of the sequence of
                                                                                                                                  -
                                                                                                                                  550 * bytes into buffers has no effect on the bytes, or order thereof, that will be moved from the
                                                                                                                                  -
                                                                                                                                  551 * Receive buffer (e.g., `target` could be N+ 1-byte buffers, or one N+-byte buffer
                                                                                                                                  -
                                                                                                                                  552 * -- the popped Receive buffer would be the same, as would be the extracted bytes). N equals the
                                                                                                                                  -
                                                                                                                                  553 * smaller of: the available bytes in the Receive buffer; and `buffer_size(target)`. We return N.
                                                                                                                                  -
                                                                                                                                  554 *
                                                                                                                                  -
                                                                                                                                  555 * ### Reliability and ordering guarantees ###
                                                                                                                                  -
                                                                                                                                  556 * See the send() doc header.
                                                                                                                                  -
                                                                                                                                  557 *
                                                                                                                                  -
                                                                                                                                  558 * @tparam Mutable_buffer_sequence
                                                                                                                                  -
                                                                                                                                  559 * Type that models the boost.asio `MutableBufferSequence` concept (see Boost docs).
                                                                                                                                  -
                                                                                                                                  560 * Basically, it's any container with elements convertible to `boost::asio::mutable_buffer`;
                                                                                                                                  -
                                                                                                                                  561 * and bidirectional iterator support. Examples: `vector<mutable_buffer>`,
                                                                                                                                  -
                                                                                                                                  562 * `list<mutable_buffer>`. Why allow `mutable_buffer` instead of, say, `Sequence` of bytes?
                                                                                                                                  -
                                                                                                                                  563 * Same reason as boost.asio's receive functions: it allows a great amount of flexibility
                                                                                                                                  -
                                                                                                                                  564 * without sacrificing performance, since `boost::asio::buffer()` function can adapt lots of
                                                                                                                                  -
                                                                                                                                  565 * different objects (arrays, `vector`s, `string`s, and more of bytes, integers, and more).
                                                                                                                                  -
                                                                                                                                  566 * @param target
                                                                                                                                  -
                                                                                                                                  567 * Buffer sequence to which a stream of bytes to consume from Receive buffer will be
                                                                                                                                  -
                                                                                                                                  568 * written.
                                                                                                                                  -
                                                                                                                                  569 * @param err_code
                                                                                                                                  -
                                                                                                                                  570 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  571 * Error implies that neither this receive() nor any subsequent receive() on this socket
                                                                                                                                  -
                                                                                                                                  572 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  573 * @return The number of bytes consumed (placed into `target`). Always 0 if `bool(*err_code) == true`
                                                                                                                                  -
                                                                                                                                  574 * when receive() returns.
                                                                                                                                  -
                                                                                                                                  575 */
                                                                                                                                  -
                                                                                                                                  576 template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  577 size_t receive(const Mutable_buffer_sequence& target, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  578
                                                                                                                                  -
                                                                                                                                  579 /**
                                                                                                                                  -
                                                                                                                                  580 * Blocking (synchronous) version of receive(). Acts just like receive(), except that if socket
                                                                                                                                  -
                                                                                                                                  581 * is not immediately Readable (i.e., receive() would return 0 and no error), waits until it is
                                                                                                                                  -
                                                                                                                                  582 * Readable (receive() would return either >0, or 0 and an error) and returns
                                                                                                                                  -
                                                                                                                                  583 * `receive(target, err_code)`. If a timeout is specified, and this timeout expires before socket is
                                                                                                                                  -
                                                                                                                                  584 * Readable, it acts as if receive() produced error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  -
                                                                                                                                  585 *
                                                                                                                                  -
                                                                                                                                  586 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  587 * These are the possible outcomes:
                                                                                                                                  -
                                                                                                                                  588 * 1. There are data in the Receive buffer; and socket is fully connected
                                                                                                                                  -
                                                                                                                                  589 * (`S_OPEN+S_CONNECTED`) or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket
                                                                                                                                  -
                                                                                                                                  590 * Readable. >= 1 is returned; `*err_code` is set to success unless null; data returned.
                                                                                                                                  -
                                                                                                                                  591 * 2. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  592 * specific error unless null; no data buffered. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  -
                                                                                                                                  593 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  594 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  -
                                                                                                                                  595 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  -
                                                                                                                                  596 *
                                                                                                                                  -
                                                                                                                                  597 * The semantics of -1- (the success case) equal those of receive().
                                                                                                                                  -
                                                                                                                                  598 *
                                                                                                                                  -
                                                                                                                                  599 * Note that it is NOT possible to return 0 and no error.
                                                                                                                                  -
                                                                                                                                  600 *
                                                                                                                                  -
                                                                                                                                  601 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  -
                                                                                                                                  602 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  -
                                                                                                                                  603 *
                                                                                                                                  -
                                                                                                                                  604 * @see The version of sync_receive() with no timeout.
                                                                                                                                  -
                                                                                                                                  605 * @tparam Rep
                                                                                                                                  -
                                                                                                                                  606 * See `boost::chrono::duration` documentation (and see above tip).
                                                                                                                                  -
                                                                                                                                  607 * @tparam Period
                                                                                                                                  -
                                                                                                                                  608 * See `boost::chrono::duration` documentation (and see above tip).
                                                                                                                                  -
                                                                                                                                  609 * @tparam Mutable_buffer_sequence
                                                                                                                                  -
                                                                                                                                  610 * See receive().
                                                                                                                                  -
                                                                                                                                  611 * @param target
                                                                                                                                  -
                                                                                                                                  612 * See receive().
                                                                                                                                  -
                                                                                                                                  613 * @param max_wait
                                                                                                                                  -
                                                                                                                                  614 * The maximum amount of time from now to wait before giving up on the wait and returning.
                                                                                                                                  -
                                                                                                                                  615 * `"duration<Rep, Period>::max()"` will eliminate the time limit and cause indefinite wait
                                                                                                                                  -
                                                                                                                                  616 * (i.e., no timeout).
                                                                                                                                  -
                                                                                                                                  617 * @param err_code
                                                                                                                                  -
                                                                                                                                  618 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  619 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  -
                                                                                                                                  620 * neither this receive() nor any subsequent receive() on this socket
                                                                                                                                  -
                                                                                                                                  621 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  622 * @return Number of bytes (possibly zero) added to target. Always 0 if `bool(*err_code) == true` when
                                                                                                                                  -
                                                                                                                                  623 * sync_receive() returns.
                                                                                                                                  -
                                                                                                                                  624 */
                                                                                                                                  -
                                                                                                                                  625 template<typename Rep, typename Period, typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  626 size_t sync_receive(const Mutable_buffer_sequence& target,
                                                                                                                                  -
                                                                                                                                  627 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  628
                                                                                                                                  -
                                                                                                                                  629 /**
                                                                                                                                  -
                                                                                                                                  630 * `sync_receive()` operating in `null_buffers` mode, wherein -- if Readable state is reached -- the actual data
                                                                                                                                  -
                                                                                                                                  631 * are not moved into any buffer, leaving that to the caller to do if desired. Hence, this is a way of waiting
                                                                                                                                  -
                                                                                                                                  632 * for Readable state that could be more concise in some situations than Event_set::sync_wait().
                                                                                                                                  -
                                                                                                                                  633 *
                                                                                                                                  -
                                                                                                                                  634 * ### Error handling ###
                                                                                                                                  -
                                                                                                                                  635 * These are the possible outcomes:
                                                                                                                                  -
                                                                                                                                  636 * 1. There are data in the Receive buffer; and socket is fully connected
                                                                                                                                  -
                                                                                                                                  637 * (`S_OPEN+S_CONNECTED`) or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket
                                                                                                                                  -
                                                                                                                                  638 * Readable. `true` is returned; `*err_code` is set to success unless null.
                                                                                                                                  -
                                                                                                                                  639 * 2. The operation cannot proceed due to an error. `false` is returned; `*err_code` is set to the
                                                                                                                                  -
                                                                                                                                  640 * specific error unless null. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  -
                                                                                                                                  641 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  -
                                                                                                                                  642 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  -
                                                                                                                                  643 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  -
                                                                                                                                  644 *
                                                                                                                                  -
                                                                                                                                  645 * Note that it is NOT possible to return `false` and no error.
                                                                                                                                  -
                                                                                                                                  646 *
                                                                                                                                  -
                                                                                                                                  647 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  -
                                                                                                                                  648 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  -
                                                                                                                                  649 *
                                                                                                                                  -
                                                                                                                                  650 * @tparam Rep
                                                                                                                                  -
                                                                                                                                  651 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  652 * @tparam Period
                                                                                                                                  -
                                                                                                                                  653 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  654 * @param max_wait
                                                                                                                                  -
                                                                                                                                  655 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  656 * @param err_code
                                                                                                                                  -
                                                                                                                                  657 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  -
                                                                                                                                  658 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  -
                                                                                                                                  659 * neither this nor any subsequent receive() on this socket
                                                                                                                                  -
                                                                                                                                  660 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  -
                                                                                                                                  661 * @return `true` if there are 1+ bytes ready to read; `false` if either a timeout has occurred (no bytes ready), or
                                                                                                                                  -
                                                                                                                                  662 * another error has occurred.
                                                                                                                                  -
                                                                                                                                  663 */
                                                                                                                                  -
                                                                                                                                  664 template<typename Rep, typename Period>
                                                                                                                                  -
                                                                                                                                  665 bool sync_receive(const boost::asio::null_buffers&,
                                                                                                                                  -
                                                                                                                                  666 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  667
                                                                                                                                  -
                                                                                                                                  668 /**
                                                                                                                                  -
                                                                                                                                  669 * Equivalent to `sync_receive(target, duration::max(), err_code)`; i.e., sync_receive()
                                                                                                                                  -
                                                                                                                                  670 * with no timeout.
                                                                                                                                  -
                                                                                                                                  671 *
                                                                                                                                  -
                                                                                                                                  672 * @tparam Mutable_buffer_sequence
                                                                                                                                  -
                                                                                                                                  673 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  674 * @param target
                                                                                                                                  -
                                                                                                                                  675 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  676 * @param err_code
                                                                                                                                  -
                                                                                                                                  677 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  678 * @return See other sync_receive().
                                                                                                                                  -
                                                                                                                                  679 */
                                                                                                                                  -
                                                                                                                                  680 template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  681 size_t sync_receive(const Mutable_buffer_sequence& target, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  682
                                                                                                                                  -
                                                                                                                                  683 /**
                                                                                                                                  -
                                                                                                                                  684 * Equivalent to `sync_receive(null_buffers(), duration::max(), err_code)`; i.e., `sync_receive(null_buffers)`
                                                                                                                                  -
                                                                                                                                  685 * with no timeout.
                                                                                                                                  -
                                                                                                                                  686 *
                                                                                                                                  -
                                                                                                                                  687 * @param err_code
                                                                                                                                  -
                                                                                                                                  688 * See other sync_receive().
                                                                                                                                  -
                                                                                                                                  689 * @param tag
                                                                                                                                  -
                                                                                                                                  690 * Tag argument.
                                                                                                                                  -
                                                                                                                                  691 * @return See other sync_receive().
                                                                                                                                  -
                                                                                                                                  692 */
                                                                                                                                  -
                                                                                                                                  693 bool sync_receive(const boost::asio::null_buffers&, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  694
                                                                                                                                  -
                                                                                                                                  695 /**
                                                                                                                                  -
                                                                                                                                  696 * Acts as if fatal error error::Code::S_USER_CLOSED_ABRUPTLY has been discovered on the
                                                                                                                                  -
                                                                                                                                  697 * connection. Does not block.
                                                                                                                                  -
                                                                                                                                  698 *
                                                                                                                                  -
                                                                                                                                  699 * Post-condition: `state() == State::S_CLOSED`. Additionally, assuming no loss on the
                                                                                                                                  -
                                                                                                                                  700 * network, the other side will close the connection with error
                                                                                                                                  -
                                                                                                                                  701 * error::Code::S_CONN_RESET_BY_OTHER_SIDE.
                                                                                                                                  -
                                                                                                                                  702 *
                                                                                                                                  -
                                                                                                                                  703 * Note: Discovering a fatal error on the connection would trigger all event waits on this socket
                                                                                                                                  -
                                                                                                                                  704 * (sync_send(), sync_receive(), Event_set::sync_wait(), Event_set::async_wait()) to execute on-event
                                                                                                                                  -
                                                                                                                                  705 * behavior (return, return, return, invoke handler, respectively). Therefore this method will cause
                                                                                                                                  -
                                                                                                                                  706 * just that, if applicable.
                                                                                                                                  -
                                                                                                                                  707 *
                                                                                                                                  -
                                                                                                                                  708 * Note: As a corollary, a socket closing this way (or any other way) does NOT cause that socket's
                                                                                                                                  -
                                                                                                                                  709 * events (if any) to be removed from any Event_set objects. Clearing an Event_set of all or some
                                                                                                                                  -
                                                                                                                                  710 * sockets is the Event_set user's responsibility (the classic way being Event_set::close()).
                                                                                                                                  -
                                                                                                                                  711 *
                                                                                                                                  -
                                                                                                                                  712 * @warning The moment the other side is informed we have abruptly closed the connection, they
                                                                                                                                  -
                                                                                                                                  713 * will no longer be able to receive() any of it (even if data had been queued up in
                                                                                                                                  -
                                                                                                                                  714 * their Receive buffer).
                                                                                                                                  -
                                                                                                                                  715 *
                                                                                                                                  -
                                                                                                                                  716 * @todo Currently this close_abruptly() is the only way for the user to explicitly close one specified socket.
                                                                                                                                  -
                                                                                                                                  717 * All other ways are due to error (or other side starting graceful shutdown, once we
                                                                                                                                  -
                                                                                                                                  718 * implement that). Once we implement graceful close, via `close_start()` and `close_final()`,
                                                                                                                                  -
                                                                                                                                  719 * use of close_abruptly() should be discouraged, or it may even be deprecated (e.g.,
                                                                                                                                  -
                                                                                                                                  720 * `Node`s lack a way to initiate an abrupt close for a specific socket).
                                                                                                                                  -
                                                                                                                                  721 *
                                                                                                                                  -
                                                                                                                                  722 * @todo close_abruptly() return `bool` (`false` on failure)?
                                                                                                                                  -
                                                                                                                                  723 *
                                                                                                                                  -
                                                                                                                                  724 * @param err_code
                                                                                                                                  -
                                                                                                                                  725 * See flow::Error_code docs for error reporting semantics. Generated codes:
                                                                                                                                  -
                                                                                                                                  726 * error::Code::S_NODE_NOT_RUNNING, or -- if socket already closed (`state() == State::S_CLOSED`) --
                                                                                                                                  -
                                                                                                                                  727 * then the error that caused the closure.
                                                                                                                                  -
                                                                                                                                  728 */
                                                                                                                                  -
                                                                                                                                  729 void close_abruptly(Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  730
                                                                                                                                  -
                                                                                                                                  731 /**
                                                                                                                                  -
                                                                                                                                  732 * Dynamically replaces the current options set (options()) with the given options set.
                                                                                                                                  -
                                                                                                                                  733 * Only those members of `opts` designated as dynamic (as opposed to static) may be different
                                                                                                                                  -
                                                                                                                                  734 * between options() and `opts`. If this is violated, it is an error, and no options are changed.
                                                                                                                                  -
                                                                                                                                  735 *
                                                                                                                                  -
                                                                                                                                  736 * Typically one would acquire a copy of the existing options set via options(), modify the
                                                                                                                                  -
                                                                                                                                  737 * desired dynamic data members of that copy, and then apply that copy back by calling
                                                                                                                                  -
                                                                                                                                  738 * set_options().
                                                                                                                                  -
                                                                                                                                  739 *
                                                                                                                                  -
                                                                                                                                  740 * @param opts
                                                                                                                                  -
                                                                                                                                  741 * The new options to apply to this socket. It is copied; no reference is saved.
                                                                                                                                  -
                                                                                                                                  742 * @param err_code
                                                                                                                                  -
                                                                                                                                  743 * See flow::Error_code docs for error reporting semantics. Generated codes:
                                                                                                                                  -
                                                                                                                                  744 * error::Code::S_STATIC_OPTION_CHANGED, error::Code::S_OPTION_CHECK_FAILED,
                                                                                                                                  -
                                                                                                                                  745 * error::Code::S_NODE_NOT_RUNNING.
                                                                                                                                  -
                                                                                                                                  746 * @return `true` on success, `false` on error.
                                                                                                                                  -
                                                                                                                                  747 */
                                                                                                                                  -
                                                                                                                                  748 bool set_options(const Peer_socket_options& opts, Error_code* err_code = 0);
                                                                                                                                  -
                                                                                                                                  749
                                                                                                                                  -
                                                                                                                                  750 /**
                                                                                                                                  -
                                                                                                                                  751 * Copies this socket's option set and returns that copy. If you intend to use set_options() to
                                                                                                                                  -
                                                                                                                                  752 * modify a socket's options, we recommend you make the modifications on the copy returned by
                                                                                                                                  -
                                                                                                                                  753 * options().
                                                                                                                                  -
                                                                                                                                  754 *
                                                                                                                                  -
                                                                                                                                  755 * @todo Provide a similar options() method that loads an existing structure (for structure
                                                                                                                                  -
                                                                                                                                  756 * reuse).
                                                                                                                                  -
                                                                                                                                  757 *
                                                                                                                                  -
                                                                                                                                  758 * @return See above.
                                                                                                                                  -
                                                                                                                                  759 */
                                                                                                                                  - -
                                                                                                                                  761
                                                                                                                                  -
                                                                                                                                  762 /**
                                                                                                                                  -
                                                                                                                                  763 * Returns a structure containing the most up-to-date stats about this connection.
                                                                                                                                  -
                                                                                                                                  764 *
                                                                                                                                  -
                                                                                                                                  765 * @note At the cost of reducing locking overhead in 99.999999% of the Peer_socket's operation,
                                                                                                                                  -
                                                                                                                                  766 * this method may take a bit of time to run. It's still probably only 10 times or so slower than
                                                                                                                                  -
                                                                                                                                  767 * a simple lock, work, unlock -- there is a condition variable and stuff involved -- but this may
                                                                                                                                  -
                                                                                                                                  768 * matter if done very frequently. So you probably should not. (Hmmm... where did I get these estimates,
                                                                                                                                  -
                                                                                                                                  769 * namely "10 times or so"?)
                                                                                                                                  -
                                                                                                                                  770 *
                                                                                                                                  -
                                                                                                                                  771 * @todo Provide a similar info() method that loads an existing structure (for structure
                                                                                                                                  -
                                                                                                                                  772 * reuse).
                                                                                                                                  -
                                                                                                                                  773 *
                                                                                                                                  -
                                                                                                                                  774 * @return See above.
                                                                                                                                  -
                                                                                                                                  775 */
                                                                                                                                  -
                                                                                                                                  776 Peer_socket_info info() const;
                                                                                                                                  -
                                                                                                                                  777
                                                                                                                                  -
                                                                                                                                  778 /**
                                                                                                                                  -
                                                                                                                                  779 * The maximum number of bytes of user data per received or sent packet on this connection. See
                                                                                                                                  -
                                                                                                                                  780 * Peer_socket_options::m_st_max_block_size. Note that this method is ESSENTIAL when using the
                                                                                                                                  -
                                                                                                                                  781 * socket in unreliable mode (assuming you want to implement reliability outside of `net_flow`).
                                                                                                                                  -
                                                                                                                                  782 *
                                                                                                                                  -
                                                                                                                                  783 * @return Ditto.
                                                                                                                                  -
                                                                                                                                  784 */
                                                                                                                                  -
                                                                                                                                  785 size_t max_block_size() const;
                                                                                                                                  -
                                                                                                                                  786
                                                                                                                                  -
                                                                                                                                  787 /**
                                                                                                                                  -
                                                                                                                                  788 * The error code that perviously caused state() to become State::S_CLOSED, or success code if state
                                                                                                                                  -
                                                                                                                                  789 * is not CLOSED. For example, error::code::S_CONN_RESET_BY_OTHER_SIDE (if was connected) or
                                                                                                                                  -
                                                                                                                                  790 * error::Code::S_CONN_TIMEOUT (if was connecting)
                                                                                                                                  -
                                                                                                                                  791 *
                                                                                                                                  -
                                                                                                                                  792 * @return Ditto.
                                                                                                                                  -
                                                                                                                                  793 */
                                                                                                                                  - -
                                                                                                                                  795
                                                                                                                                  -
                                                                                                                                  796protected:
                                                                                                                                  -
                                                                                                                                  797 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  798
                                                                                                                                  -
                                                                                                                                  799 /**
                                                                                                                                  -
                                                                                                                                  800 * Constructs object; initializes most values to well-defined (0, empty, etc.) but not necessarily
                                                                                                                                  -
                                                                                                                                  801 * meaningful values.
                                                                                                                                  -
                                                                                                                                  802 *
                                                                                                                                  -
                                                                                                                                  803 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  804 * The Logger implementation to use subsequently.
                                                                                                                                  -
                                                                                                                                  805 * @param task_engine
                                                                                                                                  -
                                                                                                                                  806 * IO service for the timer(s) stored as data member(s).
                                                                                                                                  -
                                                                                                                                  807 * @param opts
                                                                                                                                  -
                                                                                                                                  808 * The options set to copy into this Peer_socket and use subsequently.
                                                                                                                                  -
                                                                                                                                  809 */
                                                                                                                                  -
                                                                                                                                  810 explicit Peer_socket(log::Logger* logger_ptr,
                                                                                                                                  -
                                                                                                                                  811 util::Task_engine* task_engine,
                                                                                                                                  -
                                                                                                                                  812 const Peer_socket_options& opts);
                                                                                                                                  -
                                                                                                                                  813
                                                                                                                                  -
                                                                                                                                  814private:
                                                                                                                                  -
                                                                                                                                  815 // Friends.
                                                                                                                                  -
                                                                                                                                  816
                                                                                                                                  -
                                                                                                                                  817 /**
                                                                                                                                  -
                                                                                                                                  818 * See rationale for `friend`ing Node in class Peer_socket documentation header.
                                                                                                                                  -
                                                                                                                                  819 * @see Node.
                                                                                                                                  -
                                                                                                                                  820 */
                                                                                                                                  -
                                                                                                                                  821 friend class Node;
                                                                                                                                  -
                                                                                                                                  822 /**
                                                                                                                                  -
                                                                                                                                  823 * See rationale for `friend`ing Server_socket in class Peer_socket documentation header.
                                                                                                                                  -
                                                                                                                                  824 * @see Server_socket.
                                                                                                                                  -
                                                                                                                                  825 */
                                                                                                                                  -
                                                                                                                                  826 friend class Server_socket;
                                                                                                                                  -
                                                                                                                                  827 /**
                                                                                                                                  -
                                                                                                                                  828 * For access to `Sent_pkt_by_sent_when_map` and Sent_packet types, at least.
                                                                                                                                  -
                                                                                                                                  829 * (Drop_timer has no actual Peer_socket instance to mess with.)
                                                                                                                                  -
                                                                                                                                  830 */
                                                                                                                                  -
                                                                                                                                  831 friend class Drop_timer;
                                                                                                                                  -
                                                                                                                                  832 /**
                                                                                                                                  -
                                                                                                                                  833 * Stats modules have const access to all socket internals.
                                                                                                                                  -
                                                                                                                                  834 * @see Send_bandwidth_estimator.
                                                                                                                                  -
                                                                                                                                  835 */
                                                                                                                                  - -
                                                                                                                                  837 /**
                                                                                                                                  -
                                                                                                                                  838 * Congestion control modules have const access to all socket internals.
                                                                                                                                  -
                                                                                                                                  839 * @see Congestion_control_classic_data.
                                                                                                                                  -
                                                                                                                                  840 */
                                                                                                                                  - -
                                                                                                                                  842 /**
                                                                                                                                  -
                                                                                                                                  843 * Congestion control modules have const access to all socket internals.
                                                                                                                                  -
                                                                                                                                  844 * @see Congestion_control_classic.
                                                                                                                                  -
                                                                                                                                  845 */
                                                                                                                                  - -
                                                                                                                                  847 /**
                                                                                                                                  -
                                                                                                                                  848 * Congestion control modules have const access to all socket internals.
                                                                                                                                  -
                                                                                                                                  849 * @see Congestion_control_classic_with_bandwidth_est.
                                                                                                                                  -
                                                                                                                                  850 */
                                                                                                                                  - -
                                                                                                                                  852
                                                                                                                                  -
                                                                                                                                  853 // Types.
                                                                                                                                  -
                                                                                                                                  854
                                                                                                                                  -
                                                                                                                                  855 /// Short-hand for `shared_ptr` to immutable Drop_timer (can't use Drop_timer::Ptr due to C++ and circular reference).
                                                                                                                                  -
                                                                                                                                  856 using Drop_timer_ptr = boost::shared_ptr<Drop_timer>;
                                                                                                                                  -
                                                                                                                                  857
                                                                                                                                  -
                                                                                                                                  858 /**
                                                                                                                                  -
                                                                                                                                  859 * Short-hand for high-performance, non-reentrant, exclusive mutex used to lock #m_opts.
                                                                                                                                  -
                                                                                                                                  860 *
                                                                                                                                  -
                                                                                                                                  861 * ### Rationale ###
                                                                                                                                  -
                                                                                                                                  862 * You might notice this seems tailor-made for shared/exclusive (a/k/a multiple-readers-single-writer) mutex.
                                                                                                                                  -
                                                                                                                                  863 * Why a 2-level mutex instead of a normal exclusive mutex? Because options can be accessed by
                                                                                                                                  -
                                                                                                                                  864 * thread W and various user threads, in the vast majority of the time to read option values. On
                                                                                                                                  -
                                                                                                                                  865 * the other hand, rarely, #m_opts may be modified via set_options(). To avoid thread contention
                                                                                                                                  -
                                                                                                                                  866 * when no one is writing (which is usual), we could use that 2-level type of mutex and apply the appropriate
                                                                                                                                  -
                                                                                                                                  867 * (shared or unique) lock depending on the situation. So why not? Answer:
                                                                                                                                  -
                                                                                                                                  868 * While a shared/exclusive mutex sounds lovely in theory -- and perhaps
                                                                                                                                  -
                                                                                                                                  869 * if its implementation were closer to the hardware it would be lovely indeed -- in practice it seems its
                                                                                                                                  -
                                                                                                                                  870 * implementation just causes performance problems rather than solving them. Apparently that's why
                                                                                                                                  -
                                                                                                                                  871 * it was rejected by C++11 standards people w/r/t inclusion in that standard. The people involved
                                                                                                                                  -
                                                                                                                                  872 * explained their decision here: http://permalink.gmane.org/gmane.comp.lib.boost.devel/211180.
                                                                                                                                  -
                                                                                                                                  873 * So until that is improved, just do this. I'm not even adding a to-do for fixing this, as that seems
                                                                                                                                  -
                                                                                                                                  874 * unlikely anytime soon. Update: C++17 added `std::shared_mutex`, and C++14 added a similar thing named
                                                                                                                                  -
                                                                                                                                  875 * something else. Seems like a good time to revisit this -- if not to materially improve #Options_mutex
                                                                                                                                  -
                                                                                                                                  876 * performance then to gain up-to-date knowledge on the topic, specifically whether `shared_mutex` is fast now.
                                                                                                                                  -
                                                                                                                                  877 * Update: Apparently as of Boost-1.80 the Boost.thread impl of `shared_mutex` is lacking in perf, and there
                                                                                                                                  -
                                                                                                                                  878 * is a ticket filed for many years for this. Perhaps gcc `std::shared_mutex` is fine. However research
                                                                                                                                  -
                                                                                                                                  879 * suggests it's less about this nitty-gritty of various impls and more the following bottom line:
                                                                                                                                  -
                                                                                                                                  880 * A simple mutex is *very* fast to lock/unlock, and perf problems occur only if one must wait for a lock.
                                                                                                                                  -
                                                                                                                                  881 * Experts say that it is possible but quite rare that there is enough lock contention to make it "worth it":
                                                                                                                                  -
                                                                                                                                  882 * a shared mutex is *much* slower to lock/unlock sans contention. Only when the read critical sections are
                                                                                                                                  -
                                                                                                                                  883 * long and very frequently accessed does it become "worth it."
                                                                                                                                  -
                                                                                                                                  884 */
                                                                                                                                  - -
                                                                                                                                  886
                                                                                                                                  -
                                                                                                                                  887 /// Short-hand for lock that acquires exclusive access to an #Options_mutex.
                                                                                                                                  - -
                                                                                                                                  889
                                                                                                                                  -
                                                                                                                                  890 /**
                                                                                                                                  -
                                                                                                                                  891 * Short-hand for reentrant mutex type. We explicitly rely on reentrant behavior, so this isn't "just in case."
                                                                                                                                  -
                                                                                                                                  892 *
                                                                                                                                  -
                                                                                                                                  893 * @todo This doc header for Peer_socket::Mutex should specify what specific behavior requires mutex reentrance, so
                                                                                                                                  -
                                                                                                                                  894 * that for example one could reevaluate whether there's a sleeker code pattern that would avoid it.
                                                                                                                                  -
                                                                                                                                  895 */
                                                                                                                                  - -
                                                                                                                                  897
                                                                                                                                  -
                                                                                                                                  898 /// Short-hand for RAII lock guard of #Mutex.
                                                                                                                                  - -
                                                                                                                                  900
                                                                                                                                  -
                                                                                                                                  901 /// Type used for #m_security_token.
                                                                                                                                  -
                                                                                                                                  902 using security_token_t = uint64_t;
                                                                                                                                  -
                                                                                                                                  903
                                                                                                                                  -
                                                                                                                                  904 /// Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  - -
                                                                                                                                  906
                                                                                                                                  -
                                                                                                                                  907 /**
                                                                                                                                  -
                                                                                                                                  908 * The state of the socket (and the connection from this end's point of view) for the internal state
                                                                                                                                  -
                                                                                                                                  909 * machine governing the operation of the socket.
                                                                                                                                  -
                                                                                                                                  910 *
                                                                                                                                  -
                                                                                                                                  911 * @todo Peer_socket::Int_state will also include various states on way to a graceful close, once we implement that.
                                                                                                                                  -
                                                                                                                                  912 */
                                                                                                                                  -
                                                                                                                                  913 enum class Int_state
                                                                                                                                  -
                                                                                                                                  914 {
                                                                                                                                  -
                                                                                                                                  915 /// Closed (dead or new) socket.
                                                                                                                                  -
                                                                                                                                  916 S_CLOSED,
                                                                                                                                  -
                                                                                                                                  917
                                                                                                                                  -
                                                                                                                                  918 /**
                                                                                                                                  -
                                                                                                                                  919 * Public state is OPEN+CONNECTING; user requested active connect; we sent SYN and are
                                                                                                                                  -
                                                                                                                                  920 * awaiting response.
                                                                                                                                  -
                                                                                                                                  921 */
                                                                                                                                  -
                                                                                                                                  922 S_SYN_SENT,
                                                                                                                                  -
                                                                                                                                  923
                                                                                                                                  -
                                                                                                                                  924 /**
                                                                                                                                  -
                                                                                                                                  925 * Public state is OPEN+CONNECTING; other side requested passive connect via SYN; we sent
                                                                                                                                  -
                                                                                                                                  926 * SYN_ACK and are awaiting response.
                                                                                                                                  -
                                                                                                                                  927 */
                                                                                                                                  -
                                                                                                                                  928 S_SYN_RCVD,
                                                                                                                                  -
                                                                                                                                  929
                                                                                                                                  -
                                                                                                                                  930 /// Public state is OPEN+CONNECTED; in our opinion the connection is established.
                                                                                                                                  -
                                                                                                                                  931 S_ESTABLISHED
                                                                                                                                  -
                                                                                                                                  932 }; // enum class Int_state
                                                                                                                                  -
                                                                                                                                  933
                                                                                                                                  -
                                                                                                                                  934 // Friend of Peer_socket: For access to private alias Int_state.
                                                                                                                                  -
                                                                                                                                  935 friend std::ostream& operator<<(std::ostream& os, Int_state state);
                                                                                                                                  -
                                                                                                                                  936
                                                                                                                                  -
                                                                                                                                  937 struct Sent_packet;
                                                                                                                                  -
                                                                                                                                  938
                                                                                                                                  -
                                                                                                                                  939 /// Short-hand for #m_snd_flying_pkts_by_sent_when type; see that data member.
                                                                                                                                  - -
                                                                                                                                  941
                                                                                                                                  -
                                                                                                                                  942 /// Short-hand for #m_snd_flying_pkts_by_sent_when `const` iterator type.
                                                                                                                                  - -
                                                                                                                                  944
                                                                                                                                  -
                                                                                                                                  945 /// Short-hand for #m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  - -
                                                                                                                                  947
                                                                                                                                  -
                                                                                                                                  948 /// Short-hand for #m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  -
                                                                                                                                  949 using Sent_pkt_by_seq_num_map = std::map<Sequence_number, Sent_pkt_ordered_by_when_iter>;
                                                                                                                                  -
                                                                                                                                  950
                                                                                                                                  -
                                                                                                                                  951 /// Short-hand for #m_snd_flying_pkts_by_seq_num `const` iterator type.
                                                                                                                                  -
                                                                                                                                  952 using Sent_pkt_ordered_by_seq_const_iter = Sent_pkt_by_seq_num_map::const_iterator;
                                                                                                                                  -
                                                                                                                                  953
                                                                                                                                  -
                                                                                                                                  954 /// Short-hand for #m_snd_flying_pkts_by_seq_num iterator type.
                                                                                                                                  -
                                                                                                                                  955 using Sent_pkt_ordered_by_seq_iter = Sent_pkt_by_seq_num_map::iterator;
                                                                                                                                  -
                                                                                                                                  956
                                                                                                                                  -
                                                                                                                                  957 struct Received_packet;
                                                                                                                                  -
                                                                                                                                  958
                                                                                                                                  -
                                                                                                                                  959 /**
                                                                                                                                  -
                                                                                                                                  960 * Short-hand for #m_rcv_packets_with_gaps type; see that data member. `struct`s are stored via
                                                                                                                                  -
                                                                                                                                  961 * shared pointers instead of as direct objects to minimize copying of potentially heavy-weight
                                                                                                                                  -
                                                                                                                                  962 * data. They are stored as shared pointers instead of as raw pointers to avoid having to
                                                                                                                                  -
                                                                                                                                  963 * worry about `delete`.
                                                                                                                                  -
                                                                                                                                  964 */
                                                                                                                                  -
                                                                                                                                  965 using Recvd_pkt_map = std::map<Sequence_number, boost::shared_ptr<Received_packet>>;
                                                                                                                                  -
                                                                                                                                  966
                                                                                                                                  -
                                                                                                                                  967 /// Short-hand for #m_rcv_packets_with_gaps `const` iterator type.
                                                                                                                                  -
                                                                                                                                  968 using Recvd_pkt_const_iter = Recvd_pkt_map::const_iterator;
                                                                                                                                  -
                                                                                                                                  969
                                                                                                                                  -
                                                                                                                                  970 /// Short-hand for #m_rcv_packets_with_gaps iterator type.
                                                                                                                                  -
                                                                                                                                  971 using Recvd_pkt_iter = Recvd_pkt_map::iterator;
                                                                                                                                  -
                                                                                                                                  972
                                                                                                                                  -
                                                                                                                                  973 struct Individual_ack;
                                                                                                                                  -
                                                                                                                                  974
                                                                                                                                  -
                                                                                                                                  975 /**
                                                                                                                                  -
                                                                                                                                  976 * Type used for #m_rcv_syn_rcvd_data_q. Using `vector` because we only need `push_back()` and
                                                                                                                                  -
                                                                                                                                  977 * iteration at the moment. Using pointer to non-`const` instead of `const` because when we actually handle the
                                                                                                                                  -
                                                                                                                                  978 * packet as received we will need to be able to modify the packet for performance (see
                                                                                                                                  -
                                                                                                                                  979 * Node::handle_data_to_established(), when it transfers data to Receive buffer).
                                                                                                                                  -
                                                                                                                                  980 */
                                                                                                                                  -
                                                                                                                                  981 using Rcv_syn_rcvd_data_q = std::vector<boost::shared_ptr<Data_packet>>;
                                                                                                                                  -
                                                                                                                                  982
                                                                                                                                  -
                                                                                                                                  983 /* Methods: as few as possible. Logic should reside in class Node as discussed (though
                                                                                                                                  -
                                                                                                                                  984 * implementation may be in peer_socket.cpp). See rationale in class Peer_socket
                                                                                                                                  -
                                                                                                                                  985 * documentation header. */
                                                                                                                                  -
                                                                                                                                  986
                                                                                                                                  -
                                                                                                                                  987 /**
                                                                                                                                  -
                                                                                                                                  988 * Non-template helper for template send() that forwards the send() logic to Node::send(). Would
                                                                                                                                  -
                                                                                                                                  989 * be pointless to try to explain more here; see code and how it's used. Anyway, this has to be
                                                                                                                                  -
                                                                                                                                  990 * in this class.
                                                                                                                                  -
                                                                                                                                  991 *
                                                                                                                                  -
                                                                                                                                  992 * @param snd_buf_feed_func
                                                                                                                                  -
                                                                                                                                  993 * Function that will perform and return `m_snd_buf->feed(...)`. See send().
                                                                                                                                  -
                                                                                                                                  994 * @param err_code
                                                                                                                                  -
                                                                                                                                  995 * See send().
                                                                                                                                  -
                                                                                                                                  996 * @return Value to be returned by calling Node::send().
                                                                                                                                  -
                                                                                                                                  997 */
                                                                                                                                  -
                                                                                                                                  998 size_t node_send(const Function<size_t (size_t max_data_size)>& snd_buf_feed_func,
                                                                                                                                  -
                                                                                                                                  999 Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1000
                                                                                                                                  -
                                                                                                                                  1001 /**
                                                                                                                                  -
                                                                                                                                  1002 * Same as sync_send() but uses a #Fine_clock-based #Fine_duration non-template type for
                                                                                                                                  -
                                                                                                                                  1003 * implementation convenience and to avoid code bloat to specify timeout.
                                                                                                                                  -
                                                                                                                                  1004 *
                                                                                                                                  -
                                                                                                                                  1005 * @tparam Const_buffer_sequence
                                                                                                                                  -
                                                                                                                                  1006 * See sync_send().
                                                                                                                                  -
                                                                                                                                  1007 * @param data
                                                                                                                                  -
                                                                                                                                  1008 * See sync_send().
                                                                                                                                  -
                                                                                                                                  1009 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1010 * See `sync_send(timeout)`. This is the absolute time point corresponding to that.
                                                                                                                                  -
                                                                                                                                  1011 * `"duration<Rep, Period>::max()"` maps to the value `Fine_time_pt()` (Epoch) for this argument.
                                                                                                                                  -
                                                                                                                                  1012 * @param err_code
                                                                                                                                  -
                                                                                                                                  1013 * See sync_send().
                                                                                                                                  -
                                                                                                                                  1014 * @return See sync_send().
                                                                                                                                  -
                                                                                                                                  1015 */
                                                                                                                                  -
                                                                                                                                  1016 template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  1017 size_t sync_send_impl(const Const_buffer_sequence& data, const Fine_time_pt& wait_until,
                                                                                                                                  -
                                                                                                                                  1018 Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1019
                                                                                                                                  -
                                                                                                                                  1020 /**
                                                                                                                                  -
                                                                                                                                  1021 * Helper similar to sync_send_impl() but for the `null_buffers` versions of `sync_send()`.
                                                                                                                                  -
                                                                                                                                  1022 *
                                                                                                                                  -
                                                                                                                                  1023 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1024 * See sync_send_impl().
                                                                                                                                  -
                                                                                                                                  1025 * @param err_code
                                                                                                                                  -
                                                                                                                                  1026 * See sync_send_impl().
                                                                                                                                  -
                                                                                                                                  1027 * @return See `sync_send(null_buffers)`. `true` if and only if Writable status successfuly reached in time.
                                                                                                                                  -
                                                                                                                                  1028 */
                                                                                                                                  -
                                                                                                                                  1029 bool sync_send_reactor_pattern_impl(const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1030
                                                                                                                                  -
                                                                                                                                  1031 /**
                                                                                                                                  -
                                                                                                                                  1032 * This is to sync_send() as node_send() is to send().
                                                                                                                                  -
                                                                                                                                  1033 *
                                                                                                                                  -
                                                                                                                                  1034 * @param snd_buf_feed_func_or_empty
                                                                                                                                  -
                                                                                                                                  1035 * See node_send(). Additionally, if this is `.empty()` then `null_buffers` a/k/a "reactor pattern" mode is
                                                                                                                                  -
                                                                                                                                  1036 * engaged.
                                                                                                                                  -
                                                                                                                                  1037 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1038 * See sync_send_impl().
                                                                                                                                  -
                                                                                                                                  1039 * @param err_code
                                                                                                                                  -
                                                                                                                                  1040 * See sync_send().
                                                                                                                                  -
                                                                                                                                  1041 * @return See sync_send().
                                                                                                                                  -
                                                                                                                                  1042 */
                                                                                                                                  -
                                                                                                                                  1043 size_t node_sync_send(const Function<size_t (size_t max_data_size)>& snd_buf_feed_func_or_empty,
                                                                                                                                  -
                                                                                                                                  1044 const Fine_time_pt& wait_until,
                                                                                                                                  -
                                                                                                                                  1045 Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1046
                                                                                                                                  -
                                                                                                                                  1047 /**
                                                                                                                                  -
                                                                                                                                  1048 * Non-template helper for template receive() that forwards the receive() logic to
                                                                                                                                  -
                                                                                                                                  1049 * Node::receive(). Would be pointless to try to explain more here; see code and how it's used.
                                                                                                                                  -
                                                                                                                                  1050 * Anyway, this has to be in this class.
                                                                                                                                  -
                                                                                                                                  1051 *
                                                                                                                                  -
                                                                                                                                  1052 * @param rcv_buf_consume_func
                                                                                                                                  -
                                                                                                                                  1053 * Function that will perform and return `m_rcv_buf->consume(...)`. See receive().
                                                                                                                                  -
                                                                                                                                  1054 * @param err_code
                                                                                                                                  -
                                                                                                                                  1055 * See receive().
                                                                                                                                  -
                                                                                                                                  1056 * @return Value to be returned by calling Node::receive().
                                                                                                                                  -
                                                                                                                                  1057 */
                                                                                                                                  -
                                                                                                                                  1058 size_t node_receive(const Function<size_t ()>& rcv_buf_consume_func,
                                                                                                                                  -
                                                                                                                                  1059 Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1060
                                                                                                                                  -
                                                                                                                                  1061 /**
                                                                                                                                  -
                                                                                                                                  1062 * Same as sync_receive() but uses a #Fine_clock-based #Fine_duration non-template type
                                                                                                                                  -
                                                                                                                                  1063 * for implementation convenience and to avoid code bloat to specify timeout.
                                                                                                                                  -
                                                                                                                                  1064 *
                                                                                                                                  -
                                                                                                                                  1065 * @tparam Block_sequence
                                                                                                                                  -
                                                                                                                                  1066 * See sync_receive().
                                                                                                                                  -
                                                                                                                                  1067 * @param target
                                                                                                                                  -
                                                                                                                                  1068 * See sync_receive().
                                                                                                                                  -
                                                                                                                                  1069 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1070 * See `sync_receive(timeout)`. This is the absolute time point corresponding to that.
                                                                                                                                  -
                                                                                                                                  1071 * `"duration<Rep, Period>::max()"` maps to the value `Fine_time_pt()` (Epoch) for this argument.
                                                                                                                                  -
                                                                                                                                  1072 * @param err_code
                                                                                                                                  -
                                                                                                                                  1073 * See sync_receive().
                                                                                                                                  -
                                                                                                                                  1074 * @return See sync_receive().
                                                                                                                                  -
                                                                                                                                  1075 */
                                                                                                                                  -
                                                                                                                                  1076 template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  1077 size_t sync_receive_impl(const Mutable_buffer_sequence& target,
                                                                                                                                  -
                                                                                                                                  1078 const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1079
                                                                                                                                  -
                                                                                                                                  1080 /**
                                                                                                                                  -
                                                                                                                                  1081 * Helper similar to sync_receive_impl() but for the `null_buffers` versions of `sync_receive()`.
                                                                                                                                  -
                                                                                                                                  1082 *
                                                                                                                                  -
                                                                                                                                  1083 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1084 * See sync_receive_impl().
                                                                                                                                  -
                                                                                                                                  1085 * @param err_code
                                                                                                                                  -
                                                                                                                                  1086 * See sync_receive_impl().
                                                                                                                                  -
                                                                                                                                  1087 * @return See `sync_receive(null_buffers)`. `true` if and only if Readable status successfuly reached in time.
                                                                                                                                  -
                                                                                                                                  1088 */
                                                                                                                                  -
                                                                                                                                  1089 bool sync_receive_reactor_pattern_impl(const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1090
                                                                                                                                  -
                                                                                                                                  1091 /**
                                                                                                                                  -
                                                                                                                                  1092 * This is to sync_receive() as node_receive() is to receive().
                                                                                                                                  -
                                                                                                                                  1093 *
                                                                                                                                  -
                                                                                                                                  1094 * @param rcv_buf_consume_func_or_empty
                                                                                                                                  -
                                                                                                                                  1095 * See node_receive(). Additionally, if this is `.empty()` then `null_buffers` a/k/a "reactor pattern" mode is
                                                                                                                                  -
                                                                                                                                  1096 * engaged.
                                                                                                                                  -
                                                                                                                                  1097 * @param wait_until
                                                                                                                                  -
                                                                                                                                  1098 * See sync_receive_impl().
                                                                                                                                  -
                                                                                                                                  1099 * @param err_code
                                                                                                                                  -
                                                                                                                                  1100 * See sync_receive().
                                                                                                                                  -
                                                                                                                                  1101 * @return See sync_receive().
                                                                                                                                  -
                                                                                                                                  1102 */
                                                                                                                                  -
                                                                                                                                  1103 size_t node_sync_receive(const Function<size_t ()>& rcv_buf_consume_func_or_empty,
                                                                                                                                  -
                                                                                                                                  1104 const Fine_time_pt& wait_until,
                                                                                                                                  -
                                                                                                                                  1105 Error_code* err_code);
                                                                                                                                  -
                                                                                                                                  1106
                                                                                                                                  -
                                                                                                                                  1107 /**
                                                                                                                                  -
                                                                                                                                  1108 * Analogous to Node::opt() but for per-socket options. See that method.
                                                                                                                                  -
                                                                                                                                  1109 *
                                                                                                                                  -
                                                                                                                                  1110 * Do NOT read option values without opt().
                                                                                                                                  -
                                                                                                                                  1111 *
                                                                                                                                  -
                                                                                                                                  1112 * @tparam Opt_type
                                                                                                                                  -
                                                                                                                                  1113 * The type of the option data member.
                                                                                                                                  -
                                                                                                                                  1114 * @param opt_val_ref
                                                                                                                                  -
                                                                                                                                  1115 * A reference (important!) to the value you want; this may be either a data member of
                                                                                                                                  -
                                                                                                                                  1116 * this->m_opts or the entire this->m_opts itself.
                                                                                                                                  -
                                                                                                                                  1117 * @return A copy of the value at the given reference.
                                                                                                                                  -
                                                                                                                                  1118 */
                                                                                                                                  -
                                                                                                                                  1119 template<typename Opt_type>
                                                                                                                                  -
                                                                                                                                  1120 Opt_type opt(const Opt_type& opt_val_ref) const;
                                                                                                                                  -
                                                                                                                                  1121
                                                                                                                                  -
                                                                                                                                  1122 /**
                                                                                                                                  -
                                                                                                                                  1123 * Returns the smallest multiple of max_block_size() that is >= the given option value, optionally
                                                                                                                                  -
                                                                                                                                  1124 * first inflated by a certain %. The intended use case is to obtain a Send of Receive buffer max
                                                                                                                                  -
                                                                                                                                  1125 * size that is about equal to the user-specified (or otherwise obtained) value, in bytes, but is
                                                                                                                                  -
                                                                                                                                  1126 * a multiple of max-block-size -- to prevent fragmenting max-block-size-sized chunks of data unnecessarily -- and
                                                                                                                                  -
                                                                                                                                  1127 * to possibly inflate that value by a certain percentage for subtle flow control reasons.
                                                                                                                                  -
                                                                                                                                  1128 *
                                                                                                                                  -
                                                                                                                                  1129 * @param opt_val_ref
                                                                                                                                  -
                                                                                                                                  1130 * A reference to a `size_t`-sized socket option, as would be passed to opt(). See opt().
                                                                                                                                  -
                                                                                                                                  1131 * This is the starting value.
                                                                                                                                  -
                                                                                                                                  1132 * @param inflate_pct_val_ptr
                                                                                                                                  -
                                                                                                                                  1133 * A pointer to an `unsigned int`-sized socket option, as would be passed to opt(). See
                                                                                                                                  -
                                                                                                                                  1134 * opt(). This is the % by which to inflate opt_val_ref before rounding up to nearest
                                                                                                                                  -
                                                                                                                                  1135 * max_block_size() multiple. If null, the % is assumed to be 0.
                                                                                                                                  -
                                                                                                                                  1136 * @return See above.
                                                                                                                                  -
                                                                                                                                  1137 */
                                                                                                                                  -
                                                                                                                                  1138 size_t max_block_size_multiple(const size_t& opt_val_ref,
                                                                                                                                  -
                                                                                                                                  1139 const unsigned int* inflate_pct_val_ptr = 0) const;
                                                                                                                                  -
                                                                                                                                  1140
                                                                                                                                  -
                                                                                                                                  1141 /**
                                                                                                                                  -
                                                                                                                                  1142 * Whether retransmission is enabled on this connection. Short-hand for appropriate opt() call.
                                                                                                                                  -
                                                                                                                                  1143 * Note this always returns the same value for a given object.
                                                                                                                                  -
                                                                                                                                  1144 *
                                                                                                                                  -
                                                                                                                                  1145 * @return Ditto.
                                                                                                                                  -
                                                                                                                                  1146 */
                                                                                                                                  -
                                                                                                                                  1147 bool rexmit_on() const;
                                                                                                                                  -
                                                                                                                                  1148
                                                                                                                                  -
                                                                                                                                  1149 /**
                                                                                                                                  -
                                                                                                                                  1150 * Helper that is equivalent to Node::ensure_sock_open(this, err_code). Used by templated
                                                                                                                                  -
                                                                                                                                  1151 * methods which must be defined in this header file, which means they cannot access Node members
                                                                                                                                  -
                                                                                                                                  1152 * directly, as Node is an incomplete type.
                                                                                                                                  -
                                                                                                                                  1153 *
                                                                                                                                  -
                                                                                                                                  1154 * @param err_code
                                                                                                                                  -
                                                                                                                                  1155 * See Node::ensure_sock_open().
                                                                                                                                  -
                                                                                                                                  1156 * @return See Node::ensure_sock_open().
                                                                                                                                  -
                                                                                                                                  1157 */
                                                                                                                                  -
                                                                                                                                  1158 bool ensure_open(Error_code* err_code) const;
                                                                                                                                  -
                                                                                                                                  1159
                                                                                                                                  -
                                                                                                                                  1160 /**
                                                                                                                                  -
                                                                                                                                  1161 * Helper that, given a byte count, returns a string with that byte count and the number of
                                                                                                                                  -
                                                                                                                                  1162 * max_block_size()-size blocks that can fit within it (rounded down).
                                                                                                                                  -
                                                                                                                                  1163 *
                                                                                                                                  -
                                                                                                                                  1164 * @param bytes
                                                                                                                                  -
                                                                                                                                  1165 * @return See above.
                                                                                                                                  -
                                                                                                                                  1166 */
                                                                                                                                  -
                                                                                                                                  1167 std::string bytes_blocks_str(size_t bytes) const;
                                                                                                                                  -
                                                                                                                                  1168
                                                                                                                                  -
                                                                                                                                  1169 // Data.
                                                                                                                                  -
                                                                                                                                  1170
                                                                                                                                  -
                                                                                                                                  1171 /**
                                                                                                                                  -
                                                                                                                                  1172 * This socket's per-socket set of options. Initialized at construction; can be subsequently
                                                                                                                                  -
                                                                                                                                  1173 * modified by set_options(), although only the dynamic members of this may be modified.
                                                                                                                                  -
                                                                                                                                  1174 *
                                                                                                                                  -
                                                                                                                                  1175 * Accessed from thread W and user thread U != W. Protected by #m_opts_mutex. When reading, do
                                                                                                                                  -
                                                                                                                                  1176 * NOT access without locking (which is encapsulated in opt()).
                                                                                                                                  -
                                                                                                                                  1177 */
                                                                                                                                  - -
                                                                                                                                  1179
                                                                                                                                  -
                                                                                                                                  1180 /// The mutex protecting #m_opts.
                                                                                                                                  - -
                                                                                                                                  1182
                                                                                                                                  -
                                                                                                                                  1183 /// `true` if we connect() to server; `false` if we are to be/are `accept()`ed. Should be set once and not modified.
                                                                                                                                  - -
                                                                                                                                  1185
                                                                                                                                  -
                                                                                                                                  1186 /**
                                                                                                                                  -
                                                                                                                                  1187 * See state(). Should be set before user gets access to `*this`. Must not be modified by non-W threads after that.
                                                                                                                                  -
                                                                                                                                  1188 *
                                                                                                                                  -
                                                                                                                                  1189 * Accessed from thread W and user threads U != W (in state() and others). Must be protected
                                                                                                                                  -
                                                                                                                                  1190 * by mutex.
                                                                                                                                  -
                                                                                                                                  1191 */
                                                                                                                                  - -
                                                                                                                                  1193
                                                                                                                                  -
                                                                                                                                  1194 /**
                                                                                                                                  -
                                                                                                                                  1195 * See state(). Should be set before user gets access to `*this`. Must not be modified by non-W
                                                                                                                                  -
                                                                                                                                  1196 * threads after that.
                                                                                                                                  -
                                                                                                                                  1197 *
                                                                                                                                  -
                                                                                                                                  1198 * Accessed from thread W and user threads U != W (in state() and others). Must be protected by
                                                                                                                                  -
                                                                                                                                  1199 * mutex.
                                                                                                                                  -
                                                                                                                                  1200 */
                                                                                                                                  - -
                                                                                                                                  1202
                                                                                                                                  -
                                                                                                                                  1203 /**
                                                                                                                                  -
                                                                                                                                  1204 * See node(). Should be set before user gets access to `*this` and not changed, except to null when
                                                                                                                                  -
                                                                                                                                  1205 * state is State::S_CLOSED. Must not be modified by non-W threads.
                                                                                                                                  -
                                                                                                                                  1206 *
                                                                                                                                  -
                                                                                                                                  1207 * Invariant: `x->node() == y` if and only if `y->m_socks` contains `x`; otherwise `!x->node()`.
                                                                                                                                  -
                                                                                                                                  1208 * The invariant must hold by the end of the execution of any thread W boost.asio handler (but
                                                                                                                                  -
                                                                                                                                  1209 * not necessarily at all points within that handler, or generally).
                                                                                                                                  -
                                                                                                                                  1210 *
                                                                                                                                  -
                                                                                                                                  1211 * Accessed from thread W and user threads U != W (in node() and others). Must be protected by
                                                                                                                                  -
                                                                                                                                  1212 * mutex.
                                                                                                                                  -
                                                                                                                                  1213 *
                                                                                                                                  -
                                                                                                                                  1214 * @todo `boost::weak_ptr<Node>` would be ideal for this, but of course then Node would have to
                                                                                                                                  -
                                                                                                                                  1215 * (only?) be available via shared_ptr<>.
                                                                                                                                  -
                                                                                                                                  1216 */
                                                                                                                                  - -
                                                                                                                                  1218
                                                                                                                                  -
                                                                                                                                  1219 /**
                                                                                                                                  -
                                                                                                                                  1220 * For sockets that come a Server_socket, this is the inverse of Server_socket::m_connecting_socks: it is
                                                                                                                                  -
                                                                                                                                  1221 * the Server_socket from which this Peer_socket will be Server_socket::accept()ed (if that succeeds); or null if
                                                                                                                                  -
                                                                                                                                  1222 * this is an actively-connecting Peer_socket or has already been `accept()`ed.
                                                                                                                                  -
                                                                                                                                  1223 *
                                                                                                                                  -
                                                                                                                                  1224 * More formally, this is null if #m_active_connect; null if not the case but already accept()ed; and otherwise:
                                                                                                                                  -
                                                                                                                                  1225 * `((y->m_connecting_socks contains x) || (y->m_unaccepted_socks contains x))` if and only if
                                                                                                                                  -
                                                                                                                                  1226 * `x->m_originating_serv == y`. That is, for a socket in state Int_state::S_SYN_RCVD, or in state
                                                                                                                                  -
                                                                                                                                  1227 * Int_state::S_ESTABLISHED, but before being accept()ed by the user, this is the server socket that spawned this
                                                                                                                                  -
                                                                                                                                  1228 * peer socket.
                                                                                                                                  -
                                                                                                                                  1229 *
                                                                                                                                  -
                                                                                                                                  1230 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1231 * This can be write-accessed simultaneously by thread W (e.g., when closing a
                                                                                                                                  -
                                                                                                                                  1232 * socket before it is accepted) and a user thread U != W (in Server_socket::accept()). It is
                                                                                                                                  -
                                                                                                                                  1233 * thus protected by a mutex -- but it's Server_socket::m_mutex, not Peer_socket::m_mutex. I
                                                                                                                                  -
                                                                                                                                  1234 * know it's weird, but it makes sense. Basically Server_socket::m_unaccepted_socks and
                                                                                                                                  -
                                                                                                                                  1235 * Server_socket::m_originating_serv -- for each element of `m_unaccepted_socks` -- are modified together
                                                                                                                                  -
                                                                                                                                  1236 * in a synchronized way.
                                                                                                                                  -
                                                                                                                                  1237 *
                                                                                                                                  -
                                                                                                                                  1238 * @see Server_socket::m_connecting_socks and Server_socket::m_unaccepted_socks for the closely
                                                                                                                                  -
                                                                                                                                  1239 * related inverse.
                                                                                                                                  -
                                                                                                                                  1240 */
                                                                                                                                  - -
                                                                                                                                  1242
                                                                                                                                  -
                                                                                                                                  1243 /**
                                                                                                                                  -
                                                                                                                                  1244 * The Receive buffer; Node feeds data at the back; user consumes data at the front. Contains
                                                                                                                                  -
                                                                                                                                  1245 * application-layer data received from the other side, to be read by user via receive() and
                                                                                                                                  -
                                                                                                                                  1246 * similar.
                                                                                                                                  -
                                                                                                                                  1247 *
                                                                                                                                  -
                                                                                                                                  1248 * A maximum cumulative byte count is maintained. If data are received that would exceed this max
                                                                                                                                  -
                                                                                                                                  1249 * (i.e., the user is not retrieving the data fast enough to keep up), these data are dropped (and
                                                                                                                                  -
                                                                                                                                  1250 * if we use ACKs would be eventually treated as dropped by the other side).
                                                                                                                                  -
                                                                                                                                  1251 *
                                                                                                                                  -
                                                                                                                                  1252 * Note that this is a high-level structure, near the application layer. This does not store any
                                                                                                                                  -
                                                                                                                                  1253 * metadata, like sequence numbers, or data not ready to be consumed by the user (such as
                                                                                                                                  -
                                                                                                                                  1254 * out-of-order packets, if we implement that). Such packets and data should be stored elsewhere.
                                                                                                                                  -
                                                                                                                                  1255 *
                                                                                                                                  -
                                                                                                                                  1256 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1257 * This can be write-accessed simultaneously by thread W (when receiving by Node)
                                                                                                                                  -
                                                                                                                                  1258 * and a user thread U != W (in receive(), etc.). It is thus protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1259 */
                                                                                                                                  - -
                                                                                                                                  1261
                                                                                                                                  -
                                                                                                                                  1262 /**
                                                                                                                                  -
                                                                                                                                  1263 * The Send buffer; user feeds data at the back; Node consumes data at the front. Contains
                                                                                                                                  -
                                                                                                                                  1264 * application-layer data to be sent to the other side as supplied by user via send() and friends.
                                                                                                                                  -
                                                                                                                                  1265 *
                                                                                                                                  -
                                                                                                                                  1266 * A maximum cumulative byte count is maintained. If data are supplied that would exceed
                                                                                                                                  -
                                                                                                                                  1267 * this max (i.e., the Node is not sending the data fast enough to keep up), send() will
                                                                                                                                  -
                                                                                                                                  1268 * inform the caller that fewer bytes than intended have been buffered. Typically this happens if
                                                                                                                                  -
                                                                                                                                  1269 * the congestion control window is full, so data are getting buffered in #m_snd_buf instead of
                                                                                                                                  -
                                                                                                                                  1270 * being immediately consumed and sent.
                                                                                                                                  -
                                                                                                                                  1271 *
                                                                                                                                  -
                                                                                                                                  1272 * Note that this is a high-level structure, near the application layer. This does not store any
                                                                                                                                  -
                                                                                                                                  1273 * metadata, like sequence numbers, or data not ready to be consumed by the user (such as
                                                                                                                                  -
                                                                                                                                  1274 * out-of-order packets, if we implement that). Such packets and data should be stored elsewhere.
                                                                                                                                  -
                                                                                                                                  1275 *
                                                                                                                                  -
                                                                                                                                  1276 * Thread safety: Analogous to #m_rcv_buf.
                                                                                                                                  -
                                                                                                                                  1277 */
                                                                                                                                  - -
                                                                                                                                  1279
                                                                                                                                  -
                                                                                                                                  1280 /**
                                                                                                                                  -
                                                                                                                                  1281 * The #Error_code causing disconnection (if one has occurred or is occurring)
                                                                                                                                  -
                                                                                                                                  1282 * on this socket; otherwise a clear (success) #Error_code. This starts as success
                                                                                                                                  -
                                                                                                                                  1283 * and may move to one non-success value and then never change after that. Graceful connection
                                                                                                                                  -
                                                                                                                                  1284 * termination is (unlike in BSD sockets, where this is indicated with receive() returning 0, not an
                                                                                                                                  -
                                                                                                                                  1285 * error) indeed counted as a non-success value for #m_disconnect_cause.
                                                                                                                                  -
                                                                                                                                  1286 *
                                                                                                                                  -
                                                                                                                                  1287 * Exception: if, during graceful close, the connection must be closed abruptly (due to error,
                                                                                                                                  -
                                                                                                                                  1288 * including error::Code::S_USER_CLOSED_ABRUPTLY), #m_disconnect_cause may change a second time (from "graceful close"
                                                                                                                                  -
                                                                                                                                  1289 * to "abrupt closure").
                                                                                                                                  -
                                                                                                                                  1290 *
                                                                                                                                  -
                                                                                                                                  1291 * As in TCP net-stacks, one cannot recover from a transmission error or termination on the socket
                                                                                                                                  -
                                                                                                                                  1292 * (fake "error" `EWOULDBLOCK`/`EAGAIN` excepted), which is why this can only go success ->
                                                                                                                                  -
                                                                                                                                  1293 * non-success and never change after that.
                                                                                                                                  -
                                                                                                                                  1294 *
                                                                                                                                  -
                                                                                                                                  1295 * How to report this to the user: attempting to `*receive()` when not Readable while
                                                                                                                                  -
                                                                                                                                  1296 * #m_disconnect_cause is not success => `*receive()` returns this #Error_code to the user; and
                                                                                                                                  -
                                                                                                                                  1297 * similarly for `*send()` and Writable.
                                                                                                                                  -
                                                                                                                                  1298 *
                                                                                                                                  -
                                                                                                                                  1299 * I emphasize that this should happen only after Receive buffer has been emptied; otherwise user
                                                                                                                                  -
                                                                                                                                  1300 * will not be able to read queued up received data after the Node internally detects connection
                                                                                                                                  -
                                                                                                                                  1301 * termination. By the same token, if the Node can still reasonably send data to the other side,
                                                                                                                                  -
                                                                                                                                  1302 * and Send buffer is not empty, and #m_disconnect_cause is not success, the Node should only halt
                                                                                                                                  -
                                                                                                                                  1303 * the packet sending once Send buffer has been emptied.
                                                                                                                                  -
                                                                                                                                  1304 *
                                                                                                                                  -
                                                                                                                                  1305 * This should be success in all states except State::S_CLOSED and
                                                                                                                                  -
                                                                                                                                  1306 * State::S_OPEN + Open_sub_state::S_DISCONNECTING.
                                                                                                                                  -
                                                                                                                                  1307 *
                                                                                                                                  -
                                                                                                                                  1308 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1309 * Since user threads will access this at least via receive() and send(), while
                                                                                                                                  -
                                                                                                                                  1310 * thread W may set it having detected disconnection, this must be protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1311 */
                                                                                                                                  - -
                                                                                                                                  1313
                                                                                                                                  -
                                                                                                                                  1314 /**
                                                                                                                                  -
                                                                                                                                  1315 * If `!m_active_connect`, this contains the serialized metadata that the user supplied on
                                                                                                                                  -
                                                                                                                                  1316 * the other side when initiating the connect; otherwise this is the serialized metadata that the user
                                                                                                                                  -
                                                                                                                                  1317 * supplied on this side when initiating the connect. In either case (though obviously more
                                                                                                                                  -
                                                                                                                                  1318 * useful in the `!m_active_connect` case) it can be obtained via get_connect_metadata().
                                                                                                                                  -
                                                                                                                                  1319 * In the `m_active_connect` case, this is also needed if we must re-send the original SYN
                                                                                                                                  -
                                                                                                                                  1320 * (retransmission).
                                                                                                                                  -
                                                                                                                                  1321 *
                                                                                                                                  -
                                                                                                                                  1322 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1323 * Same as #m_snd_buf and #m_rcv_buf (protected by #m_mutex). This would not be
                                                                                                                                  -
                                                                                                                                  1324 * necessary, since this value is immutable once user gets access to `*this`, and threads other than
                                                                                                                                  -
                                                                                                                                  1325 * W can access it, but sock_free_memory() does clear it while the user may be accessing it. Due
                                                                                                                                  -
                                                                                                                                  1326 * to that caveat, we have to lock it.
                                                                                                                                  -
                                                                                                                                  1327 */
                                                                                                                                  - -
                                                                                                                                  1329
                                                                                                                                  -
                                                                                                                                  1330 /**
                                                                                                                                  -
                                                                                                                                  1331 * This object's mutex. The protected items are #m_state, #m_open_sub_state, #m_disconnect_cause,
                                                                                                                                  -
                                                                                                                                  1332 * #m_node, #m_rcv_buf, #m_snd_buf, #m_serialized_metadata.
                                                                                                                                  -
                                                                                                                                  1333 *
                                                                                                                                  -
                                                                                                                                  1334 * Generally speaking, if 2 or more of the protected variables must be changed in the same
                                                                                                                                  -
                                                                                                                                  1335 * non-blocking "operation" (for some reasonable definition of "operation"), they should probably
                                                                                                                                  -
                                                                                                                                  1336 * be changed within the same #m_mutex-locking critical section. For example, if closing the
                                                                                                                                  -
                                                                                                                                  1337 * socket in thread W due to an incoming RST, one should lock #m_mutex, clear both buffers, set
                                                                                                                                  -
                                                                                                                                  1338 * #m_disconnect_cause, change `m_state = State::S_CLOSED`, and then unlock #m_mutex. Then thread U != W
                                                                                                                                  -
                                                                                                                                  1339 * will observe all this state changed at the "same time," which is desirable.
                                                                                                                                  -
                                                                                                                                  1340 */
                                                                                                                                  - -
                                                                                                                                  1342
                                                                                                                                  -
                                                                                                                                  1343 /// See remote_endpoint(). Should be set before user gets access to `*this` and not changed afterwards.
                                                                                                                                  - -
                                                                                                                                  1345
                                                                                                                                  -
                                                                                                                                  1346 /// See local_port(). Should be set before user gets access to `*this` and not changed afterwards.
                                                                                                                                  - -
                                                                                                                                  1348
                                                                                                                                  -
                                                                                                                                  1349 /**
                                                                                                                                  -
                                                                                                                                  1350 * Current internal state of the socket. Note this is a very central piece of information and is analogous
                                                                                                                                  -
                                                                                                                                  1351 * to TCP's "state" (ESTABLISHED, etc. etc.).
                                                                                                                                  -
                                                                                                                                  1352 *
                                                                                                                                  -
                                                                                                                                  1353 * This gains meaning only in thread W. This should NOT be
                                                                                                                                  -
                                                                                                                                  1354 * accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1355 */
                                                                                                                                  - -
                                                                                                                                  1357
                                                                                                                                  -
                                                                                                                                  1358 /**
                                                                                                                                  -
                                                                                                                                  1359 * The queue of DATA packets received while in Int_state::S_SYN_RCVD state before the
                                                                                                                                  -
                                                                                                                                  1360 * Syn_ack_ack_packet arrives to move us to Int_state::S_ESTABLISHED
                                                                                                                                  -
                                                                                                                                  1361 * state, at which point these packets can be processed normally. Such
                                                                                                                                  -
                                                                                                                                  1362 * DATA packets would not normally exist, but they can exist if the SYN_ACK_ACK is lost or DATA
                                                                                                                                  -
                                                                                                                                  1363 * packets are re-ordered to go ahead of it. See Node::handle_data_to_syn_rcvd() for more
                                                                                                                                  -
                                                                                                                                  1364 * detail.
                                                                                                                                  -
                                                                                                                                  1365 *
                                                                                                                                  -
                                                                                                                                  1366 * This gains meaning only in thread W. This should NOT be accessed outside of thread W
                                                                                                                                  -
                                                                                                                                  1367 * and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1368 */
                                                                                                                                  - -
                                                                                                                                  1370
                                                                                                                                  -
                                                                                                                                  1371 /**
                                                                                                                                  -
                                                                                                                                  1372 * The running total count of bytes in the `m_data` fields of #m_rcv_syn_rcvd_data_q. Undefined
                                                                                                                                  -
                                                                                                                                  1373 * when the latter is empty. Used to limit its size. This gains meaning only in thread W. This
                                                                                                                                  -
                                                                                                                                  1374 * should NOT be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1375 */
                                                                                                                                  - -
                                                                                                                                  1377
                                                                                                                                  -
                                                                                                                                  1378 /**
                                                                                                                                  -
                                                                                                                                  1379 * The Initial Sequence Number (ISN) contained in the original Syn_packet or
                                                                                                                                  -
                                                                                                                                  1380 * Syn_ack_packet we received.
                                                                                                                                  -
                                                                                                                                  1381 *
                                                                                                                                  -
                                                                                                                                  1382 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1383 * not protected by a mutex. Useful at least in verifying the validity of duplicate SYNs and
                                                                                                                                  -
                                                                                                                                  1384 * SYN_ACKs.
                                                                                                                                  -
                                                                                                                                  1385 */
                                                                                                                                  - -
                                                                                                                                  1387
                                                                                                                                  -
                                                                                                                                  1388 /**
                                                                                                                                  -
                                                                                                                                  1389 * The maximal sequence number R from the remote side such that all data with sequence numbers
                                                                                                                                  -
                                                                                                                                  1390 * strictly less than R in this connection have been received by us and placed into the Receive
                                                                                                                                  -
                                                                                                                                  1391 * buffer. This first gains meaning upon receiving SYN and is the sequence number of that SYN,
                                                                                                                                  -
                                                                                                                                  1392 * plus one (as in TCP); or upon receiving SYN_ACK (similarly). Note that received packets past
                                                                                                                                  -
                                                                                                                                  1393 * this sequence number may exist, but if so there is at least one missing packet (the one at
                                                                                                                                  -
                                                                                                                                  1394 * #m_rcv_next_seq_num) preceding all of them.
                                                                                                                                  -
                                                                                                                                  1395 *
                                                                                                                                  -
                                                                                                                                  1396 * @see #m_rcv_packets_with_gaps.
                                                                                                                                  -
                                                                                                                                  1397 *
                                                                                                                                  -
                                                                                                                                  1398 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1399 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1400 */
                                                                                                                                  - -
                                                                                                                                  1402
                                                                                                                                  -
                                                                                                                                  1403 /**
                                                                                                                                  -
                                                                                                                                  1404 * The sequence-number-ordered collection of all
                                                                                                                                  -
                                                                                                                                  1405 * received-and-not-dropped-due-to-buffer-overflow packets such that at least
                                                                                                                                  -
                                                                                                                                  1406 * one unreceived-or-otherwise-unknown datum precedes all sequence numbers in this collection;
                                                                                                                                  -
                                                                                                                                  1407 * a/k/a the reassembly queue if retransmission is enabled.
                                                                                                                                  -
                                                                                                                                  1408 * With retransmission off, the only purpose of keeping this structure at all is to detect any
                                                                                                                                  -
                                                                                                                                  1409 * already-received-and-given-to-Receive-buffer packet coming in again; such a packet should be
                                                                                                                                  -
                                                                                                                                  1410 * ACKed but NOT given to the Receive buffer again (avoid data duplication). With retransmission
                                                                                                                                  -
                                                                                                                                  1411 * on, this is additionally used as the reassembly queue (storing the non-contiguous data until
                                                                                                                                  -
                                                                                                                                  1412 * the gaps are filled in).
                                                                                                                                  -
                                                                                                                                  1413 *
                                                                                                                                  -
                                                                                                                                  1414 * The structure is best explained by breaking down the sequence number space. I list the
                                                                                                                                  -
                                                                                                                                  1415 * sequence number ranges in increasing order starting with the ISN. Let `last_rcv_seq_num` be the
                                                                                                                                  -
                                                                                                                                  1416 * sequence number of the last datum to have been received (and not dropped due to insufficient
                                                                                                                                  -
                                                                                                                                  1417 * Receive buffer space), for exposition purposes.
                                                                                                                                  -
                                                                                                                                  1418 *
                                                                                                                                  -
                                                                                                                                  1419 * - #m_rcv_init_seq_num =
                                                                                                                                  -
                                                                                                                                  1420 * - SYN or SYN_ACK
                                                                                                                                  -
                                                                                                                                  1421 *
                                                                                                                                  -
                                                                                                                                  1422 * - [`m_rcv_init_seq_num + 1`, `m_rcv_next_seq_num - 1`] =
                                                                                                                                  -
                                                                                                                                  1423 * - Largest possible range of sequence numbers such that each datum represented by this range
                                                                                                                                  -
                                                                                                                                  1424 * has been received (and not dropped due to insufficient Receive buffer space) and copied to
                                                                                                                                  -
                                                                                                                                  1425 * the Receive buffer for user retrieval.
                                                                                                                                  -
                                                                                                                                  1426 *
                                                                                                                                  -
                                                                                                                                  1427 * - [#m_rcv_next_seq_num, `m_rcv_next_seq_num + N - 1`] =
                                                                                                                                  -
                                                                                                                                  1428 * - The first packet after the ISN that has not yet been received (or has been received but has
                                                                                                                                  -
                                                                                                                                  1429 * been dropped due to insufficient Receive buffer space). `N` is the (unknown to us) length of
                                                                                                                                  -
                                                                                                                                  1430 * that packet. `N` > 0. This can be seen as the first "gap" in the received sequence number
                                                                                                                                  -
                                                                                                                                  1431 * space.
                                                                                                                                  -
                                                                                                                                  1432 *
                                                                                                                                  -
                                                                                                                                  1433 * - [`m_rcv_next_seq_num + N`, `last_rcv_seq_num`] =
                                                                                                                                  -
                                                                                                                                  1434 * - The remaining packets up to and including the last byte that has been received (and not
                                                                                                                                  -
                                                                                                                                  1435 * dropped due to insufficient Receive buffer space). Each packet in this range is one of the
                                                                                                                                  -
                                                                                                                                  1436 * following:
                                                                                                                                  -
                                                                                                                                  1437 * - received (and not dropped due to insufficient Receive buffer space);
                                                                                                                                  -
                                                                                                                                  1438 * - not received (or received and dropped due to insufficient Receive buffer space).
                                                                                                                                  -
                                                                                                                                  1439 *
                                                                                                                                  -
                                                                                                                                  1440 * - [`last_rcv_seq_num + 1`, ...] =
                                                                                                                                  -
                                                                                                                                  1441 * - All remaining not-yet-received (or received but dropped due to insufficient Receive buffer
                                                                                                                                  -
                                                                                                                                  1442 * space) packets.
                                                                                                                                  -
                                                                                                                                  1443 *
                                                                                                                                  -
                                                                                                                                  1444 * #m_rcv_packets_with_gaps contains all Received_packets in the range [`m_rcv_next_seq_num + N`,
                                                                                                                                  -
                                                                                                                                  1445 * `last_rcv_seq_num`], with each particular Received_packet's first sequence number as its key. If
                                                                                                                                  -
                                                                                                                                  1446 * there are no gaps -- all received sequence numbers are followed by unreceived sequence numbers
                                                                                                                                  -
                                                                                                                                  1447 * -- then that range is empty and so is #m_rcv_packets_with_gaps. All the other ranges can be
                                                                                                                                  -
                                                                                                                                  1448 * null (empty) as well. If there are no received-and-undropped packets, then `m_rcv_init_seq_num
                                                                                                                                  -
                                                                                                                                  1449 * == m_rcv_next_seq_num`, which is the initial situation.
                                                                                                                                  -
                                                                                                                                  1450 *
                                                                                                                                  -
                                                                                                                                  1451 * The above is an invariant, to be true at the end of each boost.asio handler in thread W, at
                                                                                                                                  -
                                                                                                                                  1452 * least.
                                                                                                                                  -
                                                                                                                                  1453 *
                                                                                                                                  -
                                                                                                                                  1454 * Each received-and-undropped packet therefore is placed into #m_rcv_packets_with_gaps, anywhere
                                                                                                                                  -
                                                                                                                                  1455 * in the middle. If retransmission is off, the data in the packet is added to Receive buffer.
                                                                                                                                  -
                                                                                                                                  1456 * If retransmission is on, the data in the packet is NOT added to Receive buffer but instead
                                                                                                                                  -
                                                                                                                                  1457 * saved within the structure for later reassembly (see next paragraph).
                                                                                                                                  -
                                                                                                                                  1458 *
                                                                                                                                  -
                                                                                                                                  1459 * If the [#m_rcv_next_seq_num, ...] (first gap) packet is received-and-not-dropped, then
                                                                                                                                  -
                                                                                                                                  1460 * #m_rcv_next_seq_num is incremented by N (the length of that packet), filling the gap. Moreover,
                                                                                                                                  -
                                                                                                                                  1461 * any contiguous packets at the front of #m_rcv_packets_with_gaps, assuming the first packet's
                                                                                                                                  -
                                                                                                                                  1462 * sequence number equals #m_rcv_next_seq_num, must be removed from #m_rcv_packets_with_gaps, and
                                                                                                                                  -
                                                                                                                                  1463 * #m_rcv_next_seq_num should be incremented accordingly. All of this maintains the invariant. If
                                                                                                                                  -
                                                                                                                                  1464 * retransmission is on, the data in the byte sequence formed by this operation is to be placed
                                                                                                                                  -
                                                                                                                                  1465 * (in sequence number order) into the Receive buffer (a/k/a reassembly).
                                                                                                                                  -
                                                                                                                                  1466 *
                                                                                                                                  -
                                                                                                                                  1467 * Conceptually, this is the action of receiving a gap packet which links up following
                                                                                                                                  -
                                                                                                                                  1468 * already-received packets to previous already-received packets, which means all of these can go
                                                                                                                                  -
                                                                                                                                  1469 * away, as the window slides forward beyond them.
                                                                                                                                  -
                                                                                                                                  1470 *
                                                                                                                                  -
                                                                                                                                  1471 * If a packet arrives and is already in #m_rcv_packets_with_gaps, then it is a duplicate and is
                                                                                                                                  -
                                                                                                                                  1472 * NOT placed on the Receive buffer. The same holds for any packet with sequence numbers
                                                                                                                                  -
                                                                                                                                  1473 * preceding #m_rcv_next_seq_num.
                                                                                                                                  -
                                                                                                                                  1474 *
                                                                                                                                  -
                                                                                                                                  1475 * The type used is a map sorted by starting sequence number of each packet. Why? We need pretty
                                                                                                                                  -
                                                                                                                                  1476 * fast middle operations, inserting and checking for existence of arriving packet. We need fast
                                                                                                                                  -
                                                                                                                                  1477 * access to the earliest (smallest sequence number) packet, for when the first gap is filled.
                                                                                                                                  -
                                                                                                                                  1478 * `std::map` satisfies these needs: `insert()` and `lower_bound()` are <em>O(log n)</em>; `begin()` gives the
                                                                                                                                  -
                                                                                                                                  1479 * smallest element and is @em O(1). Iteration is @em O(1) as well. (All amortized.)
                                                                                                                                  -
                                                                                                                                  1480 *
                                                                                                                                  -
                                                                                                                                  1481 * ### Memory use ###
                                                                                                                                  -
                                                                                                                                  1482 * The above scheme allows for unbounded memory use given certain behavior from the
                                                                                                                                  -
                                                                                                                                  1483 * other side, when retransmission is off. Suppose packets 1, 2, 3 are received; then packets 5,
                                                                                                                                  -
                                                                                                                                  1484 * 6, ..., 1000 are received. Retransmission is off, so eventually the sender
                                                                                                                                  -
                                                                                                                                  1485 * may give up on packet 4 and consider it Dropped. So the gap will forever exist; hence
                                                                                                                                  -
                                                                                                                                  1486 * #m_rcv_packets_with_gaps will always hold per-packet data for 5, 6, ..., 1000 (and any
                                                                                                                                  -
                                                                                                                                  1487 * subsequent packets). With retransmission, packet 4 would eventually arrive, or the connection
                                                                                                                                  -
                                                                                                                                  1488 * would get RSTed, but without retransmission that doesn't happen. Thus memory use will just
                                                                                                                                  -
                                                                                                                                  1489 * grow and grow. Solution: come up with some heuristic that would quite conservatively declare
                                                                                                                                  -
                                                                                                                                  1490 * that packet 4 has been "received," even though it hasn't. This will plug the hole (packet 4)
                                                                                                                                  -
                                                                                                                                  1491 * and clear #m_rcv_packets_with_gaps in this example. Then if packet 4 does somehow come in, it
                                                                                                                                  -
                                                                                                                                  1492 * will get ACKed (like any valid received packet) but will NOT be saved into the Receive buffer,
                                                                                                                                  -
                                                                                                                                  1493 * since it will be considered "duplicate" due to already being "received." Of course, the
                                                                                                                                  -
                                                                                                                                  1494 * heuristic must be such that few if any packets considered "received" this way will actually get
                                                                                                                                  -
                                                                                                                                  1495 * delivered eventually, otherwise we may lose a lot of data. Here is one such heuristic, that is
                                                                                                                                  -
                                                                                                                                  1496 * both simple and conservative: let N be some constant (e.g., N = 100). If
                                                                                                                                  -
                                                                                                                                  1497 * `m_rcv_packets_with_gaps.size()` exceeds N (i.e., equals (N + 1)), consider all gap packets
                                                                                                                                  -
                                                                                                                                  1498 * preceding #m_rcv_packets_with_gaps's first sequence number as "received." This will, through
                                                                                                                                  -
                                                                                                                                  1499 * gap filling logic described above, reduce `m_rcv_packets_with_gaps.size()` to N or less. Thus it
                                                                                                                                  -
                                                                                                                                  1500 * puts a simple upper bound on #m_rcv_packets_with_gaps's memory; if N = 100 the memory used by
                                                                                                                                  -
                                                                                                                                  1501 * the structure is not much (since we don't store the actual packet data there [but this can get
                                                                                                                                  -
                                                                                                                                  1502 * non-trivial with 100,000 sockets all filled up]). Is it conservative? Yes. 100 packets
                                                                                                                                  -
                                                                                                                                  1503 * arriving after a gap are a near-guarantee those gap packets will never arrive (especially
                                                                                                                                  -
                                                                                                                                  1504 * without retransmission, which is the predicate for this entire problem). Besides, the Drop
                                                                                                                                  -
                                                                                                                                  1505 * heuristics on the Sender side almost certainly will consider gap packets with 100 or near 100
                                                                                                                                  -
                                                                                                                                  1506 * Acknowledged packets after them as Dropped a long time ago; if the receiving side's heuristics
                                                                                                                                  -
                                                                                                                                  1507 * are far more conservative, then that is good enough.
                                                                                                                                  -
                                                                                                                                  1508 *
                                                                                                                                  -
                                                                                                                                  1509 * If retransmission is on, then (as noted) the sender's CWND and retransmission logic will ensure
                                                                                                                                  -
                                                                                                                                  1510 * that gaps are filled before more future data are sent, so the above situation will not occur.
                                                                                                                                  -
                                                                                                                                  1511 * However if the sender is a bad boy and for some reason sends new data and ignores gaps
                                                                                                                                  -
                                                                                                                                  1512 * (possibly malicious behavior), then it would still be a problem. Since in retransmission mode
                                                                                                                                  -
                                                                                                                                  1513 * it's not OK to just ignore lost packets, we have no choice but to drop received packets when
                                                                                                                                  -
                                                                                                                                  1514 * the above situation occurs (similarly to when Receive buffer is exceeded). This is basically a
                                                                                                                                  -
                                                                                                                                  1515 * security measure and should not matter assuming well-behaved operation from the other side.
                                                                                                                                  -
                                                                                                                                  1516 * Update: With retransmission on, this structure is now subject to overflow protection with a tighter
                                                                                                                                  -
                                                                                                                                  1517 * limit than with rexmit-off; namely, the limit controlling #m_rcv_buf overflow actually applies to
                                                                                                                                  -
                                                                                                                                  1518 * the sum of data being stored in #m_rcv_buf and this structure, together. I.e., a packet is dropped
                                                                                                                                  -
                                                                                                                                  1519 * if the total data stored in #m_rcv_buf and #m_rcv_packets_with_gaps equal or exceed the configured
                                                                                                                                  -
                                                                                                                                  1520 * limit. Accordingly, rcv-wnd advertised to other side is based on this sum also.
                                                                                                                                  -
                                                                                                                                  1521 *
                                                                                                                                  -
                                                                                                                                  1522 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1523 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1524 *
                                                                                                                                  -
                                                                                                                                  1525 * @see #m_rcv_reassembly_q_data_size.
                                                                                                                                  -
                                                                                                                                  1526 *
                                                                                                                                  -
                                                                                                                                  1527 * @todo The memory use of this structure could be greatly optimized if, instead of storing each
                                                                                                                                  -
                                                                                                                                  1528 * individual received packet's metadata separately, we always merged contiguous sequence number
                                                                                                                                  -
                                                                                                                                  1529 * ranges. So for example if packet P1, P2, P3 (contiguous) all arrived in sequence, after
                                                                                                                                  -
                                                                                                                                  1530 * missing packet P0, then we'd store P1's first sequence number and the total data size of
                                                                                                                                  -
                                                                                                                                  1531 * P1+P2+P3, in a single `struct` instance. Since a typical pattern might include 1 lost packet
                                                                                                                                  -
                                                                                                                                  1532 * followed by 100 received packets, we'd be able to cut down memory use by a factor of about 100
                                                                                                                                  -
                                                                                                                                  1533 * in that case (and thus worry much less about the limit). Of course the code would get more
                                                                                                                                  -
                                                                                                                                  1534 * complex and potentially slower (but not necessarily significantly).
                                                                                                                                  -
                                                                                                                                  1535 */
                                                                                                                                  - -
                                                                                                                                  1537
                                                                                                                                  -
                                                                                                                                  1538 /**
                                                                                                                                  -
                                                                                                                                  1539 * With retransmission enabled, the sum of Received_packet::m_size over all packets stored in the
                                                                                                                                  -
                                                                                                                                  1540 * reassembly queue, #m_rcv_packets_with_gaps. Stored for performance.
                                                                                                                                  -
                                                                                                                                  1541 *
                                                                                                                                  -
                                                                                                                                  1542 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1543 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1544 */
                                                                                                                                  - -
                                                                                                                                  1546
                                                                                                                                  -
                                                                                                                                  1547 /**
                                                                                                                                  -
                                                                                                                                  1548 * The received packets to be acknowledged in the next low-level ACK packet to be sent to the
                                                                                                                                  -
                                                                                                                                  1549 * other side, ordered in the chronological order they were received. They are accumulated in a
                                                                                                                                  -
                                                                                                                                  1550 * data structure because we may not send each desired acknowledgment right away, combining
                                                                                                                                  -
                                                                                                                                  1551 * several together, thus reducing overhead at the cost of short delays (or even nearly
                                                                                                                                  -
                                                                                                                                  1552 * non-existent delays, as in the case of several DATA packets handled in one
                                                                                                                                  -
                                                                                                                                  1553 * NodeLLlow_lvl_recv_and_handle() invocation, i.e., having arrived at nearly at the same time).
                                                                                                                                  -
                                                                                                                                  1554 *
                                                                                                                                  -
                                                                                                                                  1555 * Any two packets represented by these Individual_ack objects may be duplicates of each other (same
                                                                                                                                  -
                                                                                                                                  1556 * Sequence_number, possibly different Individual_ack::m_received_when values). It's up to the sender (receiver
                                                                                                                                  -
                                                                                                                                  1557 * of ACK) to sort it out. However, again, they MUST be ordered chronologicaly based on the time
                                                                                                                                  -
                                                                                                                                  1558 * when they were received; from earliest to latest.
                                                                                                                                  -
                                                                                                                                  1559 *
                                                                                                                                  -
                                                                                                                                  1560 * Storing shared pointers to avoid copying of structs (however small) during internal
                                                                                                                                  -
                                                                                                                                  1561 * reshuffling; shared instead of raw pointers to not worry about delete.
                                                                                                                                  -
                                                                                                                                  1562 *
                                                                                                                                  -
                                                                                                                                  1563 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1564 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1565 */
                                                                                                                                  -
                                                                                                                                  1566 std::vector<boost::shared_ptr<Individual_ack>> m_rcv_pending_acks;
                                                                                                                                  -
                                                                                                                                  1567
                                                                                                                                  -
                                                                                                                                  1568 /**
                                                                                                                                  -
                                                                                                                                  1569 * Helper state, to be used while inside either Node::low_lvl_recv_and_handle() or
                                                                                                                                  -
                                                                                                                                  1570 * async part of Node::async_wait_latency_then_handle_incoming(), set only at the beginning of either and equal to
                                                                                                                                  -
                                                                                                                                  1571 * `m_rcv_pending_acks.size()` at that time. Because, for efficiency, individual acknowledgements are
                                                                                                                                  -
                                                                                                                                  1572 * accumulated over the course of those two methods, and an ACK with those acknowledgments is
                                                                                                                                  -
                                                                                                                                  1573 * sent at the end of that method (in perform_accumulated_on_recv_tasks()) at the earliest, this
                                                                                                                                  -
                                                                                                                                  1574 * member is used to determine whether we should start a delayed ACK timer at that point.
                                                                                                                                  -
                                                                                                                                  1575 *
                                                                                                                                  -
                                                                                                                                  1576 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  -
                                                                                                                                  1577 * and loses meaning after either method exits. This should NOT
                                                                                                                                  -
                                                                                                                                  1578 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1579 */
                                                                                                                                  - -
                                                                                                                                  1581
                                                                                                                                  -
                                                                                                                                  1582 /**
                                                                                                                                  -
                                                                                                                                  1583 * While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming() is running,
                                                                                                                                  -
                                                                                                                                  1584 * accumulates the individual acknowledgments contained in all incoming ACK low-level packets
                                                                                                                                  -
                                                                                                                                  1585 * received in those methods. More precisely, this accumulates the elements of
                                                                                                                                  -
                                                                                                                                  1586 * `packet.m_rcv_acked_packets` for all packets such that `packet` is an Ack_packet. They are accumulated
                                                                                                                                  -
                                                                                                                                  1587 * in this data structure for a similar reason that outgoing acknowledgments are accumulated in
                                                                                                                                  -
                                                                                                                                  1588 * `Peer_socket::m_rcv_pending_acks`. The situation here is simpler, however, since the present
                                                                                                                                  -
                                                                                                                                  1589 * structure is always scanned and cleared at the end of the current handler and never carried
                                                                                                                                  -
                                                                                                                                  1590 * over to the next, as we always want to scan all individual acks received within a non-blocking
                                                                                                                                  -
                                                                                                                                  1591 * amount of time from receipt. See Node::handle_ack_to_established() for details.
                                                                                                                                  -
                                                                                                                                  1592 *
                                                                                                                                  -
                                                                                                                                  1593 * This structure is empty, accumulated over the course of those methods, is used to finally scan
                                                                                                                                  -
                                                                                                                                  1594 * all individual acknowledgments (in the exact order received), and then cleared for the next
                                                                                                                                  -
                                                                                                                                  1595 * run.
                                                                                                                                  -
                                                                                                                                  1596 *
                                                                                                                                  -
                                                                                                                                  1597 * Storing shared pointers to avoid copying of structs (however small) during internal
                                                                                                                                  -
                                                                                                                                  1598 * reshuffling; shared instead of raw pointers to not worry about delete.
                                                                                                                                  -
                                                                                                                                  1599 *
                                                                                                                                  -
                                                                                                                                  1600 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  -
                                                                                                                                  1601 * and loses meaning after either method exits. This should NOT
                                                                                                                                  -
                                                                                                                                  1602 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1603 */
                                                                                                                                  -
                                                                                                                                  1604 std::vector<Ack_packet::Individual_ack::Ptr> m_rcv_acked_packets;
                                                                                                                                  -
                                                                                                                                  1605
                                                                                                                                  -
                                                                                                                                  1606 /**
                                                                                                                                  -
                                                                                                                                  1607 * While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming() is running,
                                                                                                                                  -
                                                                                                                                  1608 * contains the rcv_wnd (eventual #m_snd_remote_rcv_wnd) value in the last observed ACK low-level
                                                                                                                                  -
                                                                                                                                  1609 * packet received in those methods. The reasoning is similar to #m_rcv_acked_packets. See
                                                                                                                                  -
                                                                                                                                  1610 * Node::handle_ack_to_established() for details.
                                                                                                                                  -
                                                                                                                                  1611 *
                                                                                                                                  -
                                                                                                                                  1612 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  -
                                                                                                                                  1613 * and loses meaning after either method exits. This should NOT
                                                                                                                                  -
                                                                                                                                  1614 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1615 */
                                                                                                                                  - -
                                                                                                                                  1617
                                                                                                                                  -
                                                                                                                                  1618 /**
                                                                                                                                  -
                                                                                                                                  1619 * The last rcv_wnd value sent to the other side (in an ACK). This is used to gauge how much the
                                                                                                                                  -
                                                                                                                                  1620 * true rcv_wnd has increased since the value that the sender probably (assuming ACK was not lost)
                                                                                                                                  -
                                                                                                                                  1621 * knows.
                                                                                                                                  -
                                                                                                                                  1622 *
                                                                                                                                  -
                                                                                                                                  1623 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1624 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1625 */
                                                                                                                                  - -
                                                                                                                                  1627
                                                                                                                                  -
                                                                                                                                  1628 /**
                                                                                                                                  -
                                                                                                                                  1629 * `true` indicates we are in a state where we've decided other side needs to be informed that
                                                                                                                                  -
                                                                                                                                  1630 * our receive window has increased substantially, so that it can resume sending data (probably
                                                                                                                                  -
                                                                                                                                  1631 * after a zero window being advertised).
                                                                                                                                  -
                                                                                                                                  1632 *
                                                                                                                                  -
                                                                                                                                  1633 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1634 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1635 */
                                                                                                                                  - -
                                                                                                                                  1637
                                                                                                                                  -
                                                                                                                                  1638 /**
                                                                                                                                  -
                                                                                                                                  1639 * Time point at which #m_rcv_in_rcv_wnd_recovery was last set to true. It is only used when the
                                                                                                                                  -
                                                                                                                                  1640 * latter is indeed true.
                                                                                                                                  -
                                                                                                                                  1641 *
                                                                                                                                  -
                                                                                                                                  1642 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1643 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1644 */
                                                                                                                                  - -
                                                                                                                                  1646
                                                                                                                                  -
                                                                                                                                  1647 /**
                                                                                                                                  -
                                                                                                                                  1648 * When #m_rcv_in_rcv_wnd_recovery is `true`, this is the scheduled task to possibly
                                                                                                                                  -
                                                                                                                                  1649 * send another unsolicited rcv_wnd-advertising ACK to the other side.
                                                                                                                                  -
                                                                                                                                  1650 *
                                                                                                                                  -
                                                                                                                                  1651 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1652 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1653 */
                                                                                                                                  - -
                                                                                                                                  1655
                                                                                                                                  -
                                                                                                                                  1656 /**
                                                                                                                                  -
                                                                                                                                  1657 * Timer started, assuming delayed ACKs are enabled, when the first Individual_ack is placed onto
                                                                                                                                  -
                                                                                                                                  1658 * an empty #m_rcv_pending_acks; when it triggers, the pending individual acknowledgments are packed
                                                                                                                                  -
                                                                                                                                  1659 * into as few as possible ACKs and sent to the other side. After the handler exits
                                                                                                                                  -
                                                                                                                                  1660 * #m_rcv_pending_acks is again empty and the process can repeat starting with the next received valid
                                                                                                                                  -
                                                                                                                                  1661 * packet.
                                                                                                                                  -
                                                                                                                                  1662 *
                                                                                                                                  -
                                                                                                                                  1663 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1664 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1665 *
                                                                                                                                  -
                                                                                                                                  1666 * ### Implementation notes ###
                                                                                                                                  -
                                                                                                                                  1667 * In other places we have tended to replace a `Timer` with the far simpler util::schedule_task_from_now() (etc.)
                                                                                                                                  -
                                                                                                                                  1668 * facility (which internally uses a `Timer` but hides its various annoyances and caveats). Why not here?
                                                                                                                                  -
                                                                                                                                  1669 * Answer: This timer is scheduled and fires often (could be on the order of every 1-500 milliseconds) and throughout
                                                                                                                                  -
                                                                                                                                  1670 * a given socket's existence; hence the potential performance effects aren't worth the risk (or at least mental
                                                                                                                                  -
                                                                                                                                  1671 * energy spent on evaluating that risk, originally and over time). The conservative thing to do is reuse a single
                                                                                                                                  -
                                                                                                                                  1672 * `Timer` repeatedly, as we do here.
                                                                                                                                  -
                                                                                                                                  1673 */
                                                                                                                                  - -
                                                                                                                                  1675
                                                                                                                                  -
                                                                                                                                  1676 /// Stats regarding incoming traffic (and resulting outgoing ACKs) for this connection so far.
                                                                                                                                  - -
                                                                                                                                  1678
                                                                                                                                  -
                                                                                                                                  1679 /**
                                                                                                                                  -
                                                                                                                                  1680 * The Initial Sequence Number (ISN) used in our original SYN or SYN_ACK. Useful at least in re-sending the
                                                                                                                                  -
                                                                                                                                  1681 * original SYN or SYN_ACK if unacknowledged for too long.
                                                                                                                                  -
                                                                                                                                  1682 *
                                                                                                                                  -
                                                                                                                                  1683 * @see #m_snd_flying_pkts_by_seq_num and #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  -
                                                                                                                                  1684 *
                                                                                                                                  -
                                                                                                                                  1685 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1686 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1687 */
                                                                                                                                  - -
                                                                                                                                  1689
                                                                                                                                  -
                                                                                                                                  1690 /**
                                                                                                                                  -
                                                                                                                                  1691 * The sequence number for the start of the data in the next new DATA packet to be sent out. By
                                                                                                                                  -
                                                                                                                                  1692 * "new" I mean not-retransmitted (assuming retransmission is even enabled).
                                                                                                                                  -
                                                                                                                                  1693 *
                                                                                                                                  -
                                                                                                                                  1694 * @todo Possibly #m_snd_next_seq_num will apply to other packet types than DATA, probably anything to do with
                                                                                                                                  -
                                                                                                                                  1695 * connection termination.
                                                                                                                                  -
                                                                                                                                  1696 *
                                                                                                                                  -
                                                                                                                                  1697 * @see #m_snd_flying_pkts_by_seq_num and #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  -
                                                                                                                                  1698 *
                                                                                                                                  -
                                                                                                                                  1699 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1700 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1701 */
                                                                                                                                  - -
                                                                                                                                  1703
                                                                                                                                  -
                                                                                                                                  1704 /**
                                                                                                                                  -
                                                                                                                                  1705 * The collection of all In-flight packets, indexed by sequence number and ordered from most to
                                                                                                                                  -
                                                                                                                                  1706 * least recently sent (including those queued up to wire-send in pacing module). See also
                                                                                                                                  -
                                                                                                                                  1707 * #m_snd_flying_pkts_by_seq_num which is a similar map but in order of sequence number.
                                                                                                                                  -
                                                                                                                                  1708 * That map's keys are again sequence numbers, but its values are iterators into the present map
                                                                                                                                  -
                                                                                                                                  1709 * to save memory and avoid having to sync up data between the two (the only thing we must sync between them
                                                                                                                                  -
                                                                                                                                  1710 * are their key sets). The two maps together can be considered to be the sender-side "scoreboard."
                                                                                                                                  -
                                                                                                                                  1711 *
                                                                                                                                  -
                                                                                                                                  1712 * These are all the packets that have been sent but not Acknowledged that we have not yet considered
                                                                                                                                  -
                                                                                                                                  1713 * Dropped. (With retransmission on, packets are never considered
                                                                                                                                  -
                                                                                                                                  1714 * permanently Dropped, but they are considered Dropped until retransmitted.) With retransmission
                                                                                                                                  -
                                                                                                                                  1715 * off, the ultimate goal of having this structure at all is to handle ACKs, the ultimate goal of
                                                                                                                                  -
                                                                                                                                  1716 * which is, in turn, for the In-flight vs. Congestion Window comparison for congestion control.
                                                                                                                                  -
                                                                                                                                  1717 * With retransmission on, the structure additionally stores the data in the In-flight packets, so
                                                                                                                                  -
                                                                                                                                  1718 * that they can be retransmitted if we determine they were probably dropped.
                                                                                                                                  -
                                                                                                                                  1719 *
                                                                                                                                  -
                                                                                                                                  1720 * With retransmission on, this is NOT the retransmission queue itself -- i.e., this does NOT
                                                                                                                                  -
                                                                                                                                  1721 * store packet data that we know should be retransmitted when possible but rather only the data
                                                                                                                                  -
                                                                                                                                  1722 * already In-flight (whether from first attempt or from retransmission).
                                                                                                                                  -
                                                                                                                                  1723 *
                                                                                                                                  -
                                                                                                                                  1724 * Please see #m_snd_flying_pkts_by_seq_num for a breakdown of the sequence number space.
                                                                                                                                  -
                                                                                                                                  1725 * Since that structure contains iterators to exactly the values in the present map, that comment will
                                                                                                                                  -
                                                                                                                                  1726 * explain which packets are in the present map.
                                                                                                                                  -
                                                                                                                                  1727 *
                                                                                                                                  -
                                                                                                                                  1728 * #m_snd_flying_pkts_by_sent_when contains In-flight Sent_packet objects as values, with each particular
                                                                                                                                  -
                                                                                                                                  1729 * Sent_packet's first sequence number as its key. If there are no In-flight Sent_packet objects, then
                                                                                                                                  -
                                                                                                                                  1730 * `m_snd_flying_pkts_by_sent_when.empty()`.
                                                                                                                                  -
                                                                                                                                  1731 *
                                                                                                                                  -
                                                                                                                                  1732 * The above is an invariant, to be true at the end of each boost.asio handler in thread W, at
                                                                                                                                  -
                                                                                                                                  1733 * least.
                                                                                                                                  -
                                                                                                                                  1734 *
                                                                                                                                  -
                                                                                                                                  1735 * Each sent packet therefore is placed into #m_snd_flying_pkts_by_sent_when, at the front (as is standard
                                                                                                                                  -
                                                                                                                                  1736 * for a Linked_hash_map, and as is expected, since they are ordered by send time). (Note, however,
                                                                                                                                  -
                                                                                                                                  1737 * that being in this map does not mean it has been sent; it may only be queued up to be sent and
                                                                                                                                  -
                                                                                                                                  1738 * waiting in the pacing module; however, pacing does not change the order of packets but merely
                                                                                                                                  -
                                                                                                                                  1739 * the exact send moment, which cannot change the position in this queue.)
                                                                                                                                  -
                                                                                                                                  1740 * When a packet is Acknowledged, it is removed from #m_snd_flying_pkts_by_sent_when -- could be from anywhere
                                                                                                                                  -
                                                                                                                                  1741 * in the ordering. Similarly to Acknowledged packets, Dropped ones are also removed.
                                                                                                                                  -
                                                                                                                                  1742 *
                                                                                                                                  -
                                                                                                                                  1743 * The type used is a map indexed by starting sequence number of each packet but also in order of
                                                                                                                                  -
                                                                                                                                  1744 * being sent out. Lookup by sequence number is near constant time; insertion near the end is
                                                                                                                                  -
                                                                                                                                  1745 * near constant time; and iteration by order of when it was sent out is easy/fast, with iterators
                                                                                                                                  -
                                                                                                                                  1746 * remaining valid as long as the underlying elements are not erased. Why use this particular
                                                                                                                                  -
                                                                                                                                  1747 * structure? Well, the lookup by sequence number occurs all the time, such as when matching up
                                                                                                                                  -
                                                                                                                                  1748 * an arriving acknowledgment against a packet that we'd sent out. We'd prefer it to not invalidate
                                                                                                                                  -
                                                                                                                                  1749 * iterators when something is erased, so Linked_hash_map is good in that way
                                                                                                                                  -
                                                                                                                                  1750 * also. So finally, why order by time it was queued up for sending (as opposed to by sequence
                                                                                                                                  -
                                                                                                                                  1751 * number, as would be the case if this were an std::map)? In truth, both are needed, which is why
                                                                                                                                  -
                                                                                                                                  1752 * #m_snd_flying_pkts_by_seq_num exists. This ordering is needed particularly for the
                                                                                                                                  -
                                                                                                                                  1753 * `m_acks_after_me` logic, wherein we count how many times packets that were sent after a given packet
                                                                                                                                  -
                                                                                                                                  1754 * have been acknowledged so far; by arranging the packets in that same order, that value can be
                                                                                                                                  -
                                                                                                                                  1755 * easily and quickly accumulated by walking back from the most recently sent packet. On the other
                                                                                                                                  -
                                                                                                                                  1756 * hand, some operations need sequence number ordering, which is why we have #m_snd_flying_pkts_by_seq_num;
                                                                                                                                  -
                                                                                                                                  1757 * note (again) that the two maps have the same key set, with one's values being iterators pointing into
                                                                                                                                  -
                                                                                                                                  1758 * the other.
                                                                                                                                  -
                                                                                                                                  1759 *
                                                                                                                                  -
                                                                                                                                  1760 * Whenever a packet with `m_sent_when.back().m_sent_time == T` is acknowledged, we need to (by definition of
                                                                                                                                  -
                                                                                                                                  1761 * Sent_packet::m_acks_after_me) increment `m_acks_after_me` for each packet with
                                                                                                                                  -
                                                                                                                                  1762 * `m_sent_when.back().m_sent_time < T`. So, if we
                                                                                                                                  -
                                                                                                                                  1763 * find the latest-sent element that satisfies that, then all packets appearing to the right
                                                                                                                                  -
                                                                                                                                  1764 * (i.e., "sent less recently than") and including that one, in this ordering, should have `m_acks_after_me`
                                                                                                                                  -
                                                                                                                                  1765 * incremented. Using a certain priority queue-using algorithm (see Node::handle_accumulated_acks())
                                                                                                                                  -
                                                                                                                                  1766 * we can do this quite efficiently.
                                                                                                                                  -
                                                                                                                                  1767 *
                                                                                                                                  -
                                                                                                                                  1768 * Note that this means Sent_packet::m_acks_after_me is strictly increasing as one walks this map.
                                                                                                                                  -
                                                                                                                                  1769 *
                                                                                                                                  -
                                                                                                                                  1770 * Since any packet with `m_acks_after_me >= C`, where `C` is some constant, is considered Dropped and
                                                                                                                                  -
                                                                                                                                  1771 * removed from #m_snd_flying_pkts_by_seq_num and therefore this map also, we also get the property that
                                                                                                                                  -
                                                                                                                                  1772 * if we find a packet in this map for which that is true, then it is also true for all packets
                                                                                                                                  -
                                                                                                                                  1773 * following it ("sent less recently" than it) in this map. This allows us to more quickly determine which
                                                                                                                                  -
                                                                                                                                  1774 * packets should be removed from #m_snd_flying_pkts_by_sent_when, without having to walk the entire structure(s).
                                                                                                                                  -
                                                                                                                                  1775 *
                                                                                                                                  -
                                                                                                                                  1776 * ### Memory use ###
                                                                                                                                  -
                                                                                                                                  1777 * This structure's memory use is naturally bounded by the Congestion Window.
                                                                                                                                  -
                                                                                                                                  1778 * Congestion control will not let it grow beyond that many packets (bytes really, but you get the point).
                                                                                                                                  -
                                                                                                                                  1779 * At that point blocks will stay on the Send buffer, until that fills up too. Then send() will refuse to enqueue
                                                                                                                                  -
                                                                                                                                  1780 * any more packets (telling the user as much).
                                                                                                                                  -
                                                                                                                                  1781 *
                                                                                                                                  -
                                                                                                                                  1782 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1783 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1784 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1785 *
                                                                                                                                  -
                                                                                                                                  1786 * @see Sent_when and Sent_packet::m_sent_when, where if `X` is the the last element of the latter sequence, then
                                                                                                                                  -
                                                                                                                                  1787 * `X.m_sent_time` is the value by which elements in the present map are ordered. However, this only
                                                                                                                                  -
                                                                                                                                  1788 * happens to be the case, because by definition an element
                                                                                                                                  -
                                                                                                                                  1789 * is always placed at the front of the present map (Linked_hash_map), and this order is inductively maintained;
                                                                                                                                  -
                                                                                                                                  1790 * AND MEANWHILE A Sent_when::m_sent_time's constructed value can only increase over time (which is a guaranteed
                                                                                                                                  -
                                                                                                                                  1791 * property of the clock we use (::Fine_clock)).
                                                                                                                                  -
                                                                                                                                  1792 * @see #m_snd_flying_bytes, which must always be updated to be accurate w/r/t
                                                                                                                                  -
                                                                                                                                  1793 * #m_snd_flying_pkts_by_sent_when. Use Node::snd_flying_pkts_updated() whenever
                                                                                                                                  -
                                                                                                                                  1794 * #m_snd_flying_pkts_by_sent_when is changed.
                                                                                                                                  -
                                                                                                                                  1795 * @see #m_snd_flying_pkts_by_seq_num, which provides an ordering of the elements of
                                                                                                                                  -
                                                                                                                                  1796 * #m_snd_flying_pkts_by_sent_when by sequence number. Whereas the present structure is used to
                                                                                                                                  -
                                                                                                                                  1797 * determine `m_acks_after_me` (since logically "after" means "sent after"), `..._by_seq_num`
                                                                                                                                  -
                                                                                                                                  1798 * is akin to the more classic TCP scoreboard, which is used to subdivide the sequence number
                                                                                                                                  -
                                                                                                                                  1799 * space (closely related to #m_snd_next_seq_num and such). With
                                                                                                                                  -
                                                                                                                                  1800 * retransmission off, "after" would simply mean "having higher sequence number," so
                                                                                                                                  -
                                                                                                                                  1801 * #m_snd_flying_pkts_by_sent_when would already provide this ordering, but with retransmission on
                                                                                                                                  -
                                                                                                                                  1802 * a retransmitted packet with a lower number could be sent after one with a higher number.
                                                                                                                                  -
                                                                                                                                  1803 * To make the code simpler, we therefore rely on a separate structure in either situation.
                                                                                                                                  -
                                                                                                                                  1804 */
                                                                                                                                  - -
                                                                                                                                  1806
                                                                                                                                  -
                                                                                                                                  1807 /**
                                                                                                                                  -
                                                                                                                                  1808 * The collection of all In-flight packets (including those queued up to send in pacing module),
                                                                                                                                  -
                                                                                                                                  1809 * indexed AND ordered by sequence number. See also #m_snd_flying_pkts_by_sent_when which is a similar map
                                                                                                                                  -
                                                                                                                                  1810 * but in order of time sent. Our map's keys are sequence numbers again, but its values are iterators
                                                                                                                                  -
                                                                                                                                  1811 * into #m_snd_flying_pkts_by_sent_when to save memory and avoid having to sync up data between the two
                                                                                                                                  -
                                                                                                                                  1812 * (only keys are in sync). The two maps together can be considered to be the "scoreboard," though in fact
                                                                                                                                  -
                                                                                                                                  1813 * the present structure alone is closer to a classic TCP scoreboard.
                                                                                                                                  -
                                                                                                                                  1814 *
                                                                                                                                  -
                                                                                                                                  1815 * The key sets of the two maps are identical. The values in this map are iterators to exactly all
                                                                                                                                  -
                                                                                                                                  1816 * elements of #m_snd_flying_pkts_by_sent_when. One can think of the present map as essentially achieving an
                                                                                                                                  -
                                                                                                                                  1817 * alternate ordering of the values in the other map.
                                                                                                                                  -
                                                                                                                                  1818 *
                                                                                                                                  -
                                                                                                                                  1819 * That said, the structure's contents and ordering are closely related to a breakdown of the sequence
                                                                                                                                  -
                                                                                                                                  1820 * number space. I provide this breakdown here. I list the
                                                                                                                                  -
                                                                                                                                  1821 * sequence number ranges in increasing order starting with the ISN. Let `first_flying_seq_num
                                                                                                                                  -
                                                                                                                                  1822 * = m_snd_flying_pkts_by_seq_num.begin()->first` (i.e., the first key Sequence_number in
                                                                                                                                  -
                                                                                                                                  1823 * #m_snd_flying_pkts_by_seq_num) for exposition purposes.
                                                                                                                                  -
                                                                                                                                  1824 *
                                                                                                                                  -
                                                                                                                                  1825 * - #m_snd_init_seq_num =
                                                                                                                                  -
                                                                                                                                  1826 * - SYN or SYN_ACK
                                                                                                                                  -
                                                                                                                                  1827 *
                                                                                                                                  -
                                                                                                                                  1828 * - [`m_snd_init_seq_num + 1`, `first_flying_seq_num - 1`] =
                                                                                                                                  -
                                                                                                                                  1829 * - Largest possible range of sequence numbers such that each datum represented by this range
                                                                                                                                  -
                                                                                                                                  1830 * has been sent and either:
                                                                                                                                  -
                                                                                                                                  1831 * - Acknowledged (ACK received for it); or
                                                                                                                                  -
                                                                                                                                  1832 * - Dropped (ACK not received; we consider it dropped due to some factor like timeout or
                                                                                                                                  -
                                                                                                                                  1833 * duplicate ACKs);
                                                                                                                                  -
                                                                                                                                  1834 *
                                                                                                                                  -
                                                                                                                                  1835 * - [`first_flying_seq_num`, `first_flying_seq_num + N - 1`] =
                                                                                                                                  -
                                                                                                                                  1836 * - The first packet that has been sent that is neither Acknowledged nor Dropped. `N` is length
                                                                                                                                  -
                                                                                                                                  1837 * of that packet. This is always the first packet, if any, to be considered Dropped in the
                                                                                                                                  -
                                                                                                                                  1838 * future. This packet is categorized In-flight.
                                                                                                                                  -
                                                                                                                                  1839 *
                                                                                                                                  -
                                                                                                                                  1840 * - [`first_flying_seq_num + N`, `m_snd_next_seq_num - 1`] =
                                                                                                                                  -
                                                                                                                                  1841 * - All remaining sent packets. Each packet in this range is one of the following:
                                                                                                                                  -
                                                                                                                                  1842 * - Acknowledged;
                                                                                                                                  -
                                                                                                                                  1843 * - not Acknowledged and not Dropped = categorized In-flight.
                                                                                                                                  -
                                                                                                                                  1844 *
                                                                                                                                  -
                                                                                                                                  1845 * - [#m_snd_next_seq_num, ...] =
                                                                                                                                  -
                                                                                                                                  1846 * - Unsent packets, if any.
                                                                                                                                  -
                                                                                                                                  1847 *
                                                                                                                                  -
                                                                                                                                  1848 * #m_snd_flying_pkts_by_sent_when and #m_snd_flying_pkts_by_seq_num contain In-flight Sent_packet objects as values
                                                                                                                                  -
                                                                                                                                  1849 * (though the latter indirectly via iterator into the former) with each particular Sent_packet's first sequence
                                                                                                                                  -
                                                                                                                                  1850 * number as its key in either structure. If there are no In-flight Sent_packet objects, then
                                                                                                                                  -
                                                                                                                                  1851 * `m_snd_flying_pkts_by_{sent_when|seq_num}.empty()` and hence `first_flying_seq_num` above does not
                                                                                                                                  -
                                                                                                                                  1852 * exist. Each of the [ranges] above can be null (empty).
                                                                                                                                  -
                                                                                                                                  1853 *
                                                                                                                                  -
                                                                                                                                  1854 * Each sent packet therefore is placed into #m_snd_flying_pkts_by_seq_num, at the back (if it's a new packet) or
                                                                                                                                  -
                                                                                                                                  1855 * possibly elsewhere (if it's retransmitted) -- while it is also placed into #m_snd_flying_pkts_by_sent_when but
                                                                                                                                  -
                                                                                                                                  1856 * always at the front (as, regardless of retransmission or anything else, it is the latest packet to be SENT). When
                                                                                                                                  -
                                                                                                                                  1857 * packet is Acknowledged, it is removed from `m_snd_flying_pkts_by_*` -- could be from anywhere in
                                                                                                                                  -
                                                                                                                                  1858 * the ordering. Similarly to Acknowledged packets, Dropped ones are also removed.
                                                                                                                                  -
                                                                                                                                  1859 *
                                                                                                                                  -
                                                                                                                                  1860 * Why do we need this map type in addition to `Linked_hash_map m_snd_flying_pkts_by_sent_when`? Answer: Essentially,
                                                                                                                                  -
                                                                                                                                  1861 * when an acknowledgment comes in, we need to be able to determine where in the sequence number space this is.
                                                                                                                                  -
                                                                                                                                  1862 * If packets are ordered by send time -- not sequence number -- and the sequence number does not match
                                                                                                                                  -
                                                                                                                                  1863 * exactly one of the elements here (e.g., it erroneously straddles one, or it is a duplicate acknowledgement,
                                                                                                                                  -
                                                                                                                                  1864 * which means that element isn't in the map any longer), then a tree-sorted-by-key map is invaluable
                                                                                                                                  -
                                                                                                                                  1865 * (in particular: to get `upper_bound()`, and also to travel to the previous-by-sequence-number packet
                                                                                                                                  -
                                                                                                                                  1866 * from the latter). So logarithmic-time upper-bound searches and iteration by sequence number are what we want and
                                                                                                                                  -
                                                                                                                                  1867 * get with this added ordering on top of #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  -
                                                                                                                                  1868 *
                                                                                                                                  -
                                                                                                                                  1869 * ### Memory use ###
                                                                                                                                  -
                                                                                                                                  1870 * This structure's memory use is naturally bounded the same as #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  -
                                                                                                                                  1871 *
                                                                                                                                  -
                                                                                                                                  1872 * ### Thread safety ###
                                                                                                                                  -
                                                                                                                                  1873 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1874 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1875 *
                                                                                                                                  -
                                                                                                                                  1876 * @see #m_snd_flying_pkts_by_sent_when. There's a "see also" comment there that contrasts these two
                                                                                                                                  -
                                                                                                                                  1877 * important structures.
                                                                                                                                  -
                                                                                                                                  1878 */
                                                                                                                                  - -
                                                                                                                                  1880
                                                                                                                                  -
                                                                                                                                  1881 /**
                                                                                                                                  -
                                                                                                                                  1882 * The number of bytes contained in all In-flight packets, used at least for comparison against
                                                                                                                                  -
                                                                                                                                  1883 * the congestion window (CWND). More formally, this is the sum of all Sent_packet::m_size values
                                                                                                                                  -
                                                                                                                                  1884 * in #m_snd_flying_pkts_by_sent_when. We keep this, instead of computing it whenever needed, for
                                                                                                                                  -
                                                                                                                                  1885 * performance. In various TCP and related RFCs this value (or something spiritually similar, if
                                                                                                                                  -
                                                                                                                                  1886 * only cumulative ACKs are used) is called "pipe" or "FlightSize."
                                                                                                                                  -
                                                                                                                                  1887 *
                                                                                                                                  -
                                                                                                                                  1888 * Though in protocols like DCCP, where CWND is stored in packets, instead of bytes, "pipe" is
                                                                                                                                  -
                                                                                                                                  1889 * actually just `m_snd_flying_pkts_by_sent_when.size()`. Not for us though.
                                                                                                                                  -
                                                                                                                                  1890 *
                                                                                                                                  -
                                                                                                                                  1891 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1892 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1893 *
                                                                                                                                  -
                                                                                                                                  1894 * @see #m_snd_flying_pkts_by_sent_when, which must always be updated to be accurate w/r/t
                                                                                                                                  -
                                                                                                                                  1895 * #m_snd_flying_bytes. Use Node::snd_flying_pkts_updated() whenever #m_snd_flying_pkts_by_sent_when
                                                                                                                                  -
                                                                                                                                  1896 * is changed.
                                                                                                                                  -
                                                                                                                                  1897 */
                                                                                                                                  - -
                                                                                                                                  1899
                                                                                                                                  -
                                                                                                                                  1900 /**
                                                                                                                                  -
                                                                                                                                  1901 * Helper data structure to store the packet IDs of packets that are marked Dropped during a single run
                                                                                                                                  -
                                                                                                                                  1902 * through accumulated ACKs; it is a data member instead of local variable for performance only. The pattern is
                                                                                                                                  -
                                                                                                                                  1903 * to simply `clear()` it just before use, then load it up with stuff in that same round of ACK handling;
                                                                                                                                  -
                                                                                                                                  1904 * and the same thing each time we need to handle accumulated ACKs. Normally one would just create one
                                                                                                                                  -
                                                                                                                                  1905 * of these locally within the code `{` block `}` each time instead.
                                                                                                                                  -
                                                                                                                                  1906 * Not doing so avoids unnecessary various internal-to-`vector` buffer
                                                                                                                                  -
                                                                                                                                  1907 * allocations. Instead the internal buffer will grow as large as it needs to and not go down from there, so
                                                                                                                                  -
                                                                                                                                  1908 * that it can be reused in subsequent operations. (Even `clear()` does not internally shrink the buffer.)
                                                                                                                                  -
                                                                                                                                  1909 * Of course some memory is held unnecessarily, but it's a small amount; on the other hand the performance
                                                                                                                                  -
                                                                                                                                  1910 * gain may be non-trivial due to the frequency of the ACK-handling code being invoked.
                                                                                                                                  -
                                                                                                                                  1911 *
                                                                                                                                  -
                                                                                                                                  1912 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1913 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1914 */
                                                                                                                                  -
                                                                                                                                  1915 std::vector<order_num_t> m_snd_temp_pkts_marked_to_drop;
                                                                                                                                  -
                                                                                                                                  1916
                                                                                                                                  -
                                                                                                                                  1917 /**
                                                                                                                                  -
                                                                                                                                  1918 * For the Sent_packet representing the next packet to be sent, this is the value to assign to
                                                                                                                                  -
                                                                                                                                  1919 * `m_sent_when.back().first`. In other words it's an ever-increasing number that is sort of like
                                                                                                                                  -
                                                                                                                                  1920 * a sequence number but one per packet and represents time at which sent, not order in the byte stream.
                                                                                                                                  -
                                                                                                                                  1921 * In particular the same packet retransmitted will have the same sequence number the 2nd time but
                                                                                                                                  -
                                                                                                                                  1922 * an increased order number. Starts at 0.
                                                                                                                                  -
                                                                                                                                  1923 *
                                                                                                                                  -
                                                                                                                                  1924 * This is only used for book-keeping locally and never transmitted over network.
                                                                                                                                  -
                                                                                                                                  1925 *
                                                                                                                                  -
                                                                                                                                  1926 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1927 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1928 */
                                                                                                                                  - -
                                                                                                                                  1930
                                                                                                                                  -
                                                                                                                                  1931 /**
                                                                                                                                  -
                                                                                                                                  1932 * If retransmission is on, this is the retransmission queue. It's the queue of packets determined to have
                                                                                                                                  -
                                                                                                                                  1933 * been dropped and thus to be retransmitted, when Congestion Window allows this. Packet in Sent_packet::m_packet
                                                                                                                                  -
                                                                                                                                  1934 * field of element at top of the queue is to be retransmitted next; and the element itself is to be inserted into
                                                                                                                                  -
                                                                                                                                  1935 * #m_snd_flying_pkts_by_sent_when while popped from the present structure. The packet's Data_packet::m_rexmit_id
                                                                                                                                  -
                                                                                                                                  1936 * should be incremented before sending; and the Sent_packet::m_sent_when `vector` should be appended with the
                                                                                                                                  -
                                                                                                                                  1937 * then-current time (for future RTT calculation).
                                                                                                                                  -
                                                                                                                                  1938 *
                                                                                                                                  -
                                                                                                                                  1939 * If retransmission is off, this is empty.
                                                                                                                                  -
                                                                                                                                  1940 *
                                                                                                                                  -
                                                                                                                                  1941 * Why use `list<>` and not `queue<>` or `deque<>`? Answer: I'd like to use `list::splice()`.
                                                                                                                                  -
                                                                                                                                  1942 *
                                                                                                                                  -
                                                                                                                                  1943 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1944 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1945 */
                                                                                                                                  -
                                                                                                                                  1946 std::list<boost::shared_ptr<Sent_packet>> m_snd_rexmit_q;
                                                                                                                                  -
                                                                                                                                  1947
                                                                                                                                  -
                                                                                                                                  1948 /// Equals `m_snd_rexmit_q.size().` Kept since `m_snd_rexmit_q.size()` may be @em O(n) depending on implementation.
                                                                                                                                  - -
                                                                                                                                  1950
                                                                                                                                  -
                                                                                                                                  1951 /**
                                                                                                                                  -
                                                                                                                                  1952 * The congestion control strategy in use for this connection on this side. Node informs
                                                                                                                                  -
                                                                                                                                  1953 * this object of events, such as acknowedgments and loss events; conversely this object informs
                                                                                                                                  -
                                                                                                                                  1954 * (or can inform if asked) the Node whether or not DATA packets can be sent, by means of
                                                                                                                                  -
                                                                                                                                  1955 * providing the Node with the socket's current Congestion Window (CWND) computed based on the
                                                                                                                                  -
                                                                                                                                  1956 * particular Congestion_control_strategy implementation's algorithm (e.g., Reno or Westwood+).
                                                                                                                                  -
                                                                                                                                  1957 * Node then determines whether data can be sent by comparing #m_snd_flying_bytes (# of bytes we think
                                                                                                                                  -
                                                                                                                                  1958 * are currently In-flight) to CWND (# of bytes the strategy allows to be In-flight currently).
                                                                                                                                  -
                                                                                                                                  1959 *
                                                                                                                                  -
                                                                                                                                  1960 * ### Life cycle ###
                                                                                                                                  -
                                                                                                                                  1961 * #m_snd_cong_ctl must be initialized to an instance before user gains access to this
                                                                                                                                  -
                                                                                                                                  1962 * socket; the pointer must never change subsequently except back to null (permanently). The
                                                                                                                                  -
                                                                                                                                  1963 * Peer_socket destructor, at the latest, will delete the underlying object, as #m_snd_cong_ctl
                                                                                                                                  -
                                                                                                                                  1964 * will be destructed. (Note `unique_ptr` has no copy operator or
                                                                                                                                  -
                                                                                                                                  1965 * constructor.) There is a 1-to-1 relationship between `*this` and #m_snd_cong_ctl.
                                                                                                                                  -
                                                                                                                                  1966 *
                                                                                                                                  -
                                                                                                                                  1967 * ### Visibility between Congestion_control_strategy and Peer_socket ###
                                                                                                                                  -
                                                                                                                                  1968 * #m_snd_cong_ctl gets read-only (`const`!) but otherwise complete
                                                                                                                                  -
                                                                                                                                  1969 * private access (via `friend`) to the contents of `*this` Peer_socket. For example, it can
                                                                                                                                  -
                                                                                                                                  1970 * read `this->m_snd_smoothed_round_trip_time` (the SRTT) and use it
                                                                                                                                  -
                                                                                                                                  1971 * for computations if needed. Node and Peer_socket get only strict public API access to
                                                                                                                                  -
                                                                                                                                  1972 * #m_snd_cong_ctl, which is a black box to it.
                                                                                                                                  -
                                                                                                                                  1973 *
                                                                                                                                  -
                                                                                                                                  1974 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1975 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1976 */
                                                                                                                                  -
                                                                                                                                  1977 boost::movelib::unique_ptr<Congestion_control_strategy> m_snd_cong_ctl;
                                                                                                                                  -
                                                                                                                                  1978
                                                                                                                                  -
                                                                                                                                  1979 /**
                                                                                                                                  -
                                                                                                                                  1980 * The receive window: the maximum number of bytes the other side has advertised it would be
                                                                                                                                  -
                                                                                                                                  1981 * willing to accept into its Receive buffer if they'd arrived at the moment that advertisement
                                                                                                                                  -
                                                                                                                                  1982 * was generated by the other side. This starts as 0 (undefined) and is originally set at SYN_ACK
                                                                                                                                  -
                                                                                                                                  1983 * or SYN_ACK_ACK receipt and then subsequently updated upon each ACK received. Each such update
                                                                                                                                  -
                                                                                                                                  1984 * is called a "rcv_wnd update" or "window update."
                                                                                                                                  -
                                                                                                                                  1985 *
                                                                                                                                  -
                                                                                                                                  1986 * #m_snd_cong_ctl provides congestion control; this value provides flow control. The socket's
                                                                                                                                  -
                                                                                                                                  1987 * state machine must be extremely careful whenever either this value or
                                                                                                                                  -
                                                                                                                                  1988 * `m_snd_cong_ctl->congestion_window_bytes()` may increase, as when that occurs it should call
                                                                                                                                  -
                                                                                                                                  1989 * Node::send_worker() in order to possibly send data over the network.
                                                                                                                                  -
                                                                                                                                  1990 *
                                                                                                                                  -
                                                                                                                                  1991 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  1992 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  1993 */
                                                                                                                                  - -
                                                                                                                                  1995
                                                                                                                                  -
                                                                                                                                  1996 /**
                                                                                                                                  -
                                                                                                                                  1997 * The outgoing available bandwidth estimator for this connection on this side. Node informs
                                                                                                                                  -
                                                                                                                                  1998 * this object of events, namely as acknowedgments; conversely this object informs
                                                                                                                                  -
                                                                                                                                  1999 * (or can inform if asked) the Node what it thinks is the current available bandwidth for
                                                                                                                                  -
                                                                                                                                  2000 * user data in DATA packets. This can be useful at least for some forms of congestion control
                                                                                                                                  -
                                                                                                                                  2001 * but possibly as information for the user, which is why it's an independent object and not
                                                                                                                                  -
                                                                                                                                  2002 * part of a specific congestion control strategy (I only mention this because the mechanics of such
                                                                                                                                  -
                                                                                                                                  2003 * a bandwidth estimator typically originate in service of a congestion control algorithm like Westwood+).
                                                                                                                                  -
                                                                                                                                  2004 *
                                                                                                                                  -
                                                                                                                                  2005 * ### Life cycle ###
                                                                                                                                  -
                                                                                                                                  2006 * It must be initialized to an instance before user gains access to this
                                                                                                                                  -
                                                                                                                                  2007 * socket; the pointer must never change subsequently except back to null (permanently). The
                                                                                                                                  -
                                                                                                                                  2008 * Peer_socket destructor, at the latest, will delete the underlying object, as #m_snd_bandwidth_estimator
                                                                                                                                  -
                                                                                                                                  2009 * is destroyed along with `*this`. The only reason it's a pointer is that it takes a Const_ptr in the constructor,
                                                                                                                                  -
                                                                                                                                  2010 * and that's not available during Peer_socket construction yet. (Note `unique_ptr` has no copy operator or
                                                                                                                                  -
                                                                                                                                  2011 * constructor.) There is a 1-to-1 relationship between `*this` and #m_snd_bandwidth_estimator.
                                                                                                                                  -
                                                                                                                                  2012 *
                                                                                                                                  -
                                                                                                                                  2013 * ### Visibility between Send_bandwidth_estimator and Peer_socket ###
                                                                                                                                  -
                                                                                                                                  2014 * The former gets read-only (`const`!) but otherwise complete private access (via `friend`) to the contents of
                                                                                                                                  -
                                                                                                                                  2015 * `*this` Peer_socket. For example, it can read #m_snd_smoothed_round_trip_time (the SRTT) and use it
                                                                                                                                  -
                                                                                                                                  2016 * for computations if needed. Node and Peer_socket get only strict public API access to
                                                                                                                                  -
                                                                                                                                  2017 * #m_snd_bandwidth_estimator, which is a black box to it.
                                                                                                                                  -
                                                                                                                                  2018 *
                                                                                                                                  -
                                                                                                                                  2019 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2020 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2021 */
                                                                                                                                  -
                                                                                                                                  2022 boost::movelib::unique_ptr<Send_bandwidth_estimator> m_snd_bandwidth_estimator;
                                                                                                                                  -
                                                                                                                                  2023
                                                                                                                                  -
                                                                                                                                  2024 /**
                                                                                                                                  -
                                                                                                                                  2025 * Estimated current round trip time of packets, computed as a smooth value over the
                                                                                                                                  -
                                                                                                                                  2026 * past individual RTT measurements. This is updated each time we make an RTT measurement (i.e.,
                                                                                                                                  -
                                                                                                                                  2027 * receive a valid, non-duplicate acknowledgment of a packet we'd sent). The algorithm to compute
                                                                                                                                  -
                                                                                                                                  2028 * it is taken from RFC 6298. The value is 0 (not a legal value otherwise) until the first RTT
                                                                                                                                  -
                                                                                                                                  2029 * measurement is made.
                                                                                                                                  -
                                                                                                                                  2030 *
                                                                                                                                  -
                                                                                                                                  2031 * We use #Fine_duration (the high fine-grainedness and large bit width corresponding to #Fine_clock) to
                                                                                                                                  -
                                                                                                                                  2032 * store this, and the algorithm we use to compute it avoids losing digits via unnecessary
                                                                                                                                  -
                                                                                                                                  2033 * conversions between units (e.g., nanoseconds -> milliseconds).
                                                                                                                                  -
                                                                                                                                  2034 *
                                                                                                                                  -
                                                                                                                                  2035 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2036 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2037 */
                                                                                                                                  - -
                                                                                                                                  2039
                                                                                                                                  -
                                                                                                                                  2040 /// RTTVAR used for #m_snd_smoothed_round_trip_time calculation. @see #m_snd_smoothed_round_trip_time.
                                                                                                                                  - -
                                                                                                                                  2042
                                                                                                                                  -
                                                                                                                                  2043 /**
                                                                                                                                  -
                                                                                                                                  2044 * The Drop Timer engine, which controls how In-flight (#m_snd_flying_pkts_by_sent_when) packets are
                                                                                                                                  -
                                                                                                                                  2045 * considered Dropped due to being unacknowledged for too long. Used while #m_int_state is
                                                                                                                                  -
                                                                                                                                  2046 * Int_state::S_ESTABLISHED.
                                                                                                                                  -
                                                                                                                                  2047 *
                                                                                                                                  -
                                                                                                                                  2048 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2049 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2050 */
                                                                                                                                  - -
                                                                                                                                  2052
                                                                                                                                  -
                                                                                                                                  2053 /**
                                                                                                                                  -
                                                                                                                                  2054 * The Drop Timeout: Time period between the next time #m_snd_drop_timer schedules a Drop Timer and that timer
                                                                                                                                  -
                                                                                                                                  2055 * expiring. This is updated each time #m_snd_smoothed_round_trip_time is updated, and the Drop_timer
                                                                                                                                  -
                                                                                                                                  2056 * itself may change it under certain circumstances.
                                                                                                                                  -
                                                                                                                                  2057 *
                                                                                                                                  -
                                                                                                                                  2058 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2059 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2060 */
                                                                                                                                  - -
                                                                                                                                  2062
                                                                                                                                  -
                                                                                                                                  2063 /**
                                                                                                                                  -
                                                                                                                                  2064 * The state of outgoing packet pacing for this socket; segregated into a simple `struct` to keep
                                                                                                                                  -
                                                                                                                                  2065 * Peer_socket shorter and easier to understand. Packet pacing tries to combat the burstiness of
                                                                                                                                  -
                                                                                                                                  2066 * outgoing low-level packet stream.
                                                                                                                                  -
                                                                                                                                  2067 *
                                                                                                                                  -
                                                                                                                                  2068 * @see `struct Send_pacing_data` doc header for much detail.
                                                                                                                                  -
                                                                                                                                  2069 */
                                                                                                                                  - -
                                                                                                                                  2071
                                                                                                                                  -
                                                                                                                                  2072 /**
                                                                                                                                  -
                                                                                                                                  2073 * The last time that Node has detected a packet loss event and so informed #m_snd_cong_ctl by calling
                                                                                                                                  -
                                                                                                                                  2074 * the appropriate method of class Congestion_control_strategy. Roughly speaking, this is used to
                                                                                                                                  -
                                                                                                                                  2075 * determine whether the detection of a given dropped packet is part of the same loss event as the
                                                                                                                                  -
                                                                                                                                  2076 * previous one; if so then #m_snd_cong_ctl is not informed again (presumably to avoid dropping CWND
                                                                                                                                  -
                                                                                                                                  2077 * too fast); if not it is informed of the new loss event. Even more roughly speaking, if the new
                                                                                                                                  -
                                                                                                                                  2078 * event is within a certain time frame of #m_snd_last_loss_event_when, then they're considered in the
                                                                                                                                  -
                                                                                                                                  2079 * same loss event. You can find detailed discussion in a giant comment in
                                                                                                                                  -
                                                                                                                                  2080 * Node::handle_accumulated_acks().
                                                                                                                                  -
                                                                                                                                  2081 *
                                                                                                                                  -
                                                                                                                                  2082 * Before any loss events, this is set to its default value (zero time since epoch).
                                                                                                                                  -
                                                                                                                                  2083 *
                                                                                                                                  -
                                                                                                                                  2084 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2085 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2086 */
                                                                                                                                  - -
                                                                                                                                  2088
                                                                                                                                  -
                                                                                                                                  2089 /**
                                                                                                                                  -
                                                                                                                                  2090 * Time at which the last Data_packet low-level packet for this connection was sent. We
                                                                                                                                  -
                                                                                                                                  2091 * use this when determining whether the connection is in Idle Timeout (i.e., has sent no traffic
                                                                                                                                  -
                                                                                                                                  2092 * for a while, which means there has been no data to send). It's used for congestion control.
                                                                                                                                  -
                                                                                                                                  2093 *
                                                                                                                                  -
                                                                                                                                  2094 * Before any packets are sent, this is set to its default value (zero time since epoch).
                                                                                                                                  -
                                                                                                                                  2095 *
                                                                                                                                  -
                                                                                                                                  2096 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2097 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2098 *
                                                                                                                                  -
                                                                                                                                  2099 * ### Pacing ###
                                                                                                                                  -
                                                                                                                                  2100 * See Send_packet_pacing #m_snd_pacing_data. See pacing-relevant note on Sent_packet::m_sent_when
                                                                                                                                  -
                                                                                                                                  2101 * which applies equally to this data member.
                                                                                                                                  -
                                                                                                                                  2102 */
                                                                                                                                  - -
                                                                                                                                  2104
                                                                                                                                  -
                                                                                                                                  2105 /// Stats regarding outgoing traffic (and resulting incoming ACKs) for this connection so far.
                                                                                                                                  - -
                                                                                                                                  2107
                                                                                                                                  -
                                                                                                                                  2108 /**
                                                                                                                                  -
                                                                                                                                  2109 * Random security token used during SYN_ACK-SYN_ACK_ACK. For a given connection handshake, the
                                                                                                                                  -
                                                                                                                                  2110 * SYN_ACK_ACK receiver ensures that #m_security_token it received is equal to the original one it
                                                                                                                                  -
                                                                                                                                  2111 * had sent in SYN_ACK. This first gains meaning upong sending SYN_ACK and it does not change afterwards.
                                                                                                                                  -
                                                                                                                                  2112 * It is not used unless `!m_active_connect`. See #m_active_connect.
                                                                                                                                  -
                                                                                                                                  2113 *
                                                                                                                                  -
                                                                                                                                  2114 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2115 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2116 */
                                                                                                                                  - -
                                                                                                                                  2118
                                                                                                                                  -
                                                                                                                                  2119 /**
                                                                                                                                  -
                                                                                                                                  2120 * Connection attempt scheduled task; fires if an individual connection request packet is not answered with a reply
                                                                                                                                  -
                                                                                                                                  2121 * packet in time. It is readied when *any* SYN or SYN_ACK packet is sent, and fired if that packet has gone
                                                                                                                                  -
                                                                                                                                  2122 * unacknowledged with a SYN_ACK or SYN_ACK_ACK (respectively), long enough to be retransmitted.
                                                                                                                                  -
                                                                                                                                  2123 *
                                                                                                                                  -
                                                                                                                                  2124 * Connection establishment is aborted if it fires too many times, but #m_connection_timeout_scheduled_task is how
                                                                                                                                  -
                                                                                                                                  2125 * "too many times" is determined.
                                                                                                                                  -
                                                                                                                                  2126 *
                                                                                                                                  -
                                                                                                                                  2127 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2128 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2129 *
                                                                                                                                  -
                                                                                                                                  2130 * @see #m_connection_timeout_scheduled_task which keeps track of the entire process timing out, as opposed to the
                                                                                                                                  -
                                                                                                                                  2131 * individual attempts.
                                                                                                                                  -
                                                                                                                                  2132 */
                                                                                                                                  - -
                                                                                                                                  2134
                                                                                                                                  -
                                                                                                                                  2135 /**
                                                                                                                                  -
                                                                                                                                  2136 * If currently using #m_init_rexmit_scheduled_task, this is the number of times the timer has already fired
                                                                                                                                  -
                                                                                                                                  2137 * in this session. So when the timer is readied the first time it's zero; if it fires and is
                                                                                                                                  -
                                                                                                                                  2138 * thus readied again it's one; again => two; etc., until timer is canceled or connection is
                                                                                                                                  -
                                                                                                                                  2139 * aborted due to too many retries.
                                                                                                                                  -
                                                                                                                                  2140 *
                                                                                                                                  -
                                                                                                                                  2141 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2142 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2143 */
                                                                                                                                  - -
                                                                                                                                  2145
                                                                                                                                  -
                                                                                                                                  2146 /**
                                                                                                                                  -
                                                                                                                                  2147 * Connection timeout scheduled task; fires if the entire initial connection process does not complete within a
                                                                                                                                  -
                                                                                                                                  2148 * certain amount of time. It is started when the SYN or SYN_ACK is sent the very first time (NOT counting
                                                                                                                                  -
                                                                                                                                  2149 * resends), canceled when SYN_ACK or SYN_ACK_ACK (respectively) is received in response to ANY SYN or
                                                                                                                                  -
                                                                                                                                  2150 * SYN_ACK (respevtively), and fired if the the latter does not occur in time.
                                                                                                                                  -
                                                                                                                                  2151 *
                                                                                                                                  -
                                                                                                                                  2152 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  -
                                                                                                                                  2153 * not protected by a mutex.
                                                                                                                                  -
                                                                                                                                  2154 *
                                                                                                                                  -
                                                                                                                                  2155 * @see #m_init_rexmit_scheduled_task which keeps track of *individual* attempts timing out, as opposed to the
                                                                                                                                  -
                                                                                                                                  2156 * entire process.
                                                                                                                                  -
                                                                                                                                  2157 */
                                                                                                                                  - -
                                                                                                                                  2159
                                                                                                                                  -
                                                                                                                                  2160 /**
                                                                                                                                  -
                                                                                                                                  2161 * This is the final set of stats collected at the time the socket was moved to S_CLOSED #m_state.
                                                                                                                                  -
                                                                                                                                  2162 * If it has not yet moved to that state, this is not applicable (but equals Peer_socket_info()).
                                                                                                                                  -
                                                                                                                                  2163 * It's used by info() to get at the final set of stats, before the source info is purged by the
                                                                                                                                  -
                                                                                                                                  2164 * resource cleanup in sock_free_memory().
                                                                                                                                  -
                                                                                                                                  2165 */
                                                                                                                                  - -
                                                                                                                                  2167}; // class Peer_socket
                                                                                                                                  -
                                                                                                                                  2168
                                                                                                                                  -
                                                                                                                                  2169
                                                                                                                                  -
                                                                                                                                  2170/**
                                                                                                                                  -
                                                                                                                                  2171 * @private
                                                                                                                                  -
                                                                                                                                  2172 *
                                                                                                                                  -
                                                                                                                                  2173 * Metadata (and data, if retransmission is on) for a packet that has been sent one (if
                                                                                                                                  -
                                                                                                                                  2174 * retransmission is off) or possibly more (if on) times. This is purely a data store, not a
                                                                                                                                  -
                                                                                                                                  2175 * class. It is not copyable, and moving them around by smart Sent_packet::Ptr is encouraged.
                                                                                                                                  -
                                                                                                                                  2176 */
                                                                                                                                  - -
                                                                                                                                  2178 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  -
                                                                                                                                  2179 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket::Sent_packet>>,
                                                                                                                                  -
                                                                                                                                  2180 private boost::noncopyable
                                                                                                                                  -
                                                                                                                                  2181{
                                                                                                                                  -
                                                                                                                                  2182 // Types.
                                                                                                                                  -
                                                                                                                                  2183
                                                                                                                                  -
                                                                                                                                  2184 struct Sent_when;
                                                                                                                                  -
                                                                                                                                  2185
                                                                                                                                  -
                                                                                                                                  2186 /**
                                                                                                                                  -
                                                                                                                                  2187 * Type used for #m_acks_after_me. Use a small type to save memory; this is easily large enough,
                                                                                                                                  -
                                                                                                                                  2188 * given that that we drop a packet after #m_acks_after_me exceeds a very small value (< 10), and
                                                                                                                                  -
                                                                                                                                  2189 * a given ACK can *conceivably* hold a few thousand individual acknowledgments (most likely many
                                                                                                                                  -
                                                                                                                                  2190 * fewer). In fact `uint8_t` is probably enough, but it seemed easier to not worry about
                                                                                                                                  -
                                                                                                                                  2191 * overflows when doing arithmetic with these.
                                                                                                                                  -
                                                                                                                                  2192 */
                                                                                                                                  -
                                                                                                                                  2193 using ack_count_t = uint16_t;
                                                                                                                                  -
                                                                                                                                  2194
                                                                                                                                  -
                                                                                                                                  2195 // Data.
                                                                                                                                  -
                                                                                                                                  2196
                                                                                                                                  -
                                                                                                                                  2197 /// Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  -
                                                                                                                                  2198 const size_t m_size;
                                                                                                                                  -
                                                                                                                                  2199
                                                                                                                                  -
                                                                                                                                  2200 /**
                                                                                                                                  -
                                                                                                                                  2201 * Time stamps, order numbers, and other info at the times when the different attempts (including
                                                                                                                                  -
                                                                                                                                  2202 * original sending and retransmissions) to send the packet were given to the UDP net-stack. These are
                                                                                                                                  -
                                                                                                                                  2203 * arranged in the order they were sent (0 = original transmission, 1 = first retransmission, 2 = second
                                                                                                                                  -
                                                                                                                                  2204 * retransmission, ...). If retransmission is off, this only ever has 1 element (set via
                                                                                                                                  -
                                                                                                                                  2205 * constructor).
                                                                                                                                  -
                                                                                                                                  2206 *
                                                                                                                                  -
                                                                                                                                  2207 * Along with each time stamp, we also store an order number. It is much like a sequence
                                                                                                                                  -
                                                                                                                                  2208 * number, except (a) we never send it anywhere (internal bookkeeping only), (b) it specifies
                                                                                                                                  -
                                                                                                                                  2209 * the order in which the packets were sent off. Why use that and not a `m_sent_time` timestamp? Because
                                                                                                                                  -
                                                                                                                                  2210 * `m_sent_time` can, in theory, have ties (i.e., it's kind of possible for 2 packets to be sent
                                                                                                                                  -
                                                                                                                                  2211 * within the same high-resolution clock tick). This gives us a solid way to order packets by send time
                                                                                                                                  -
                                                                                                                                  2212 * in certain key algorithms.
                                                                                                                                  -
                                                                                                                                  2213 *
                                                                                                                                  -
                                                                                                                                  2214 * Note: for reasons explained in the pacing module this should be the time stamp when we
                                                                                                                                  -
                                                                                                                                  2215 * actually send it off to boost.asio UDP net-stack, not when we queue it into the pacing module (which can be
                                                                                                                                  -
                                                                                                                                  2216 * quite a bit earlier, if pacing is enabled). Subtlety: Note that "time stamp when we actually send it off
                                                                                                                                  -
                                                                                                                                  2217 * to boost.asio UDP net-stack" IS the same as "time stamp when boost.asio UDP net-stack actually performs the
                                                                                                                                  -
                                                                                                                                  2218 * `sendto()` call" in practice -- a good thing for accurate RTT measurements.
                                                                                                                                  -
                                                                                                                                  2219 */
                                                                                                                                  -
                                                                                                                                  2220 std::vector<Sent_when> m_sent_when;
                                                                                                                                  -
                                                                                                                                  2221
                                                                                                                                  -
                                                                                                                                  2222 /**
                                                                                                                                  -
                                                                                                                                  2223 * The number of times any packet with `m_sent_when.back().m_order_num > this->m_sent_when.back().m_order_num`
                                                                                                                                  -
                                                                                                                                  2224 * has been acknowledged. Reworded slightly: start at 0; *IF* a packet, other than this one, is In-flight and then
                                                                                                                                  -
                                                                                                                                  2225 * acknowledged, and that packet was sent out (or, equivalently, scheduled to be sent out -- packets do not
                                                                                                                                  -
                                                                                                                                  2226 * change order once marked for sending -- a/k/a became In-flight) chronologically AFTER same happened to
                                                                                                                                  -
                                                                                                                                  2227 * `*this` packet *THEN* add 1. After adding up all such acks, the resulting value = this member.
                                                                                                                                  -
                                                                                                                                  2228 *
                                                                                                                                  -
                                                                                                                                  2229 * This is used to determine when `*this` packet should be considered Dropped,
                                                                                                                                  -
                                                                                                                                  2230 * as in TCP's Fast Retransmit heuristic (but better, since time-when-sent -- not sequence number, which has
                                                                                                                                  -
                                                                                                                                  2231 * retransmission ambiguities -- is used to order packets).
                                                                                                                                  -
                                                                                                                                  2232 *
                                                                                                                                  -
                                                                                                                                  2233 * Note, again, that "after" has little to do with *sequence* number but rather with send time, as ordered via
                                                                                                                                  -
                                                                                                                                  2234 * the *order* number. E.g., due to retransmission, `*this` may have sequence number greater than another
                                                                                                                                  -
                                                                                                                                  2235 * packet yet have the lesser order number. (This dichotomy is mentioned a lot, everywhere, and if I'm overdoing
                                                                                                                                  -
                                                                                                                                  2236 * it, it's only because sometimes TCP cumulative-ack habits die hard, so I have to keep reminding myself.)
                                                                                                                                  -
                                                                                                                                  2237 * (If retransmission is disabled, however, then sequence number order = order number order.)
                                                                                                                                  -
                                                                                                                                  2238 */
                                                                                                                                  - -
                                                                                                                                  2240
                                                                                                                                  -
                                                                                                                                  2241 /**
                                                                                                                                  -
                                                                                                                                  2242 * If retransmission is on, this is the DATA packet itself that was sent; otherwise null. It is
                                                                                                                                  -
                                                                                                                                  2243 * stored in case we need to retransmit it. If we don't (it is acknowledged), the entire
                                                                                                                                  -
                                                                                                                                  2244 * Sent_packet is erased and goes away, so #m_packet's ref-count decreases to zero, and it
                                                                                                                                  -
                                                                                                                                  2245 * disappears. If we do, all we need to do to retransmit it is increment its Data_packet::m_rexmit_id and
                                                                                                                                  -
                                                                                                                                  2246 * place it into the retransmission queue for sending, when CWND space is available.
                                                                                                                                  -
                                                                                                                                  2247 *
                                                                                                                                  -
                                                                                                                                  2248 * Why store the entire packet and not just its Data_packet::m_data? There's a small bit of memory overhead, but
                                                                                                                                  -
                                                                                                                                  2249 * we get Data_packet::m_rexmit_id for free and don't have to spend time re-creating the packet to retransmit.
                                                                                                                                  -
                                                                                                                                  2250 * So it's just convenient.
                                                                                                                                  -
                                                                                                                                  2251 *
                                                                                                                                  -
                                                                                                                                  2252 * If retransmission is off, there is no need to store this, as it will not be re-sent.
                                                                                                                                  -
                                                                                                                                  2253 */
                                                                                                                                  -
                                                                                                                                  2254 const boost::shared_ptr<Data_packet> m_packet;
                                                                                                                                  -
                                                                                                                                  2255
                                                                                                                                  -
                                                                                                                                  2256 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  2257
                                                                                                                                  -
                                                                                                                                  2258 /**
                                                                                                                                  -
                                                                                                                                  2259 * Constructs object with the given values and #m_acks_after_me at zero. If rexmit-on option enabled, the
                                                                                                                                  -
                                                                                                                                  2260 * packet is stored in #m_packet; otherwise #m_packet is initialized to null. Regardless, #m_size
                                                                                                                                  -
                                                                                                                                  2261 * is set to `packet.m_data.size()`.
                                                                                                                                  -
                                                                                                                                  2262 *
                                                                                                                                  -
                                                                                                                                  2263 * @param rexmit_on
                                                                                                                                  -
                                                                                                                                  2264 * True if and only if `sock->rexmit_on()` for the containing socket.
                                                                                                                                  -
                                                                                                                                  2265 * @param packet
                                                                                                                                  -
                                                                                                                                  2266 * The packet that will be sent. Used for #m_size and, if `sock->rexmit_on()`, saved in #m_packet.
                                                                                                                                  -
                                                                                                                                  2267 * @param sent_when
                                                                                                                                  -
                                                                                                                                  2268 * #m_sent_when is set to contain one element equalling this argument.
                                                                                                                                  -
                                                                                                                                  2269 */
                                                                                                                                  -
                                                                                                                                  2270 explicit Sent_packet(bool rexmit_on, boost::shared_ptr<Data_packet> packet, const Sent_when& sent_when);
                                                                                                                                  -
                                                                                                                                  2271}; // struct Peer_socket::Sent_packet
                                                                                                                                  -
                                                                                                                                  2272
                                                                                                                                  -
                                                                                                                                  2273/**
                                                                                                                                  -
                                                                                                                                  2274 * @private
                                                                                                                                  -
                                                                                                                                  2275 *
                                                                                                                                  -
                                                                                                                                  2276 * Data store to keep timing related info when a packet is sent out. Construct via direct member initialization.
                                                                                                                                  -
                                                                                                                                  2277 * It is copy-constructible (for initially copying into containers and such) but not assignable to discourage
                                                                                                                                  -
                                                                                                                                  2278 * unneeded copying (though it is not a heavy structure). Update: A later version of clang does not like
                                                                                                                                  -
                                                                                                                                  2279 * this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff;
                                                                                                                                  -
                                                                                                                                  2280 * it's internal code; we should be fine.
                                                                                                                                  -
                                                                                                                                  2281 */
                                                                                                                                  - -
                                                                                                                                  2283{
                                                                                                                                  -
                                                                                                                                  2284 // Data.
                                                                                                                                  -
                                                                                                                                  2285
                                                                                                                                  -
                                                                                                                                  2286 /**
                                                                                                                                  -
                                                                                                                                  2287 * Order number of the packet. This can be used to compare two packets sent out; the one with the
                                                                                                                                  -
                                                                                                                                  2288 * higher order number was sent out later. See Peer_socket::m_snd_last_order_num. The per-socket next-value
                                                                                                                                  -
                                                                                                                                  2289 * for this is incremented each time another packet is sent out.
                                                                                                                                  -
                                                                                                                                  2290 *
                                                                                                                                  -
                                                                                                                                  2291 * @see Peer_socket::Sent_packet::m_sent_when for more discussion.
                                                                                                                                  -
                                                                                                                                  2292 *
                                                                                                                                  -
                                                                                                                                  2293 * @internal
                                                                                                                                  -
                                                                                                                                  2294 * @todo Can we make Sent_when::m_order_num and some of its peers const?
                                                                                                                                  -
                                                                                                                                  2295 */
                                                                                                                                  -
                                                                                                                                  2296 // That @internal should not be necessary to hide the @todo in public generated docs -- Doxygen bug?
                                                                                                                                  - -
                                                                                                                                  2298
                                                                                                                                  -
                                                                                                                                  2299 /**
                                                                                                                                  -
                                                                                                                                  2300 * The timestamp when the packet is sent out. This may be "corrected" when actually sent *after* pacing delay
                                                                                                                                  -
                                                                                                                                  2301 * (hence not `const`).
                                                                                                                                  -
                                                                                                                                  2302 *
                                                                                                                                  -
                                                                                                                                  2303 * @see Fine_clock. Recall that, due to latter's properties, `Fine_clock::now()` results monotonically increase
                                                                                                                                  -
                                                                                                                                  2304 * over time -- a property on which we rely on, particularly since this data member is only assigned
                                                                                                                                  -
                                                                                                                                  2305 * `Fine_clock::now()` at various times.
                                                                                                                                  -
                                                                                                                                  2306 *
                                                                                                                                  -
                                                                                                                                  2307 * @see Peer_socket::Sent_packet::m_sent_when for more discussion.
                                                                                                                                  -
                                                                                                                                  2308 */
                                                                                                                                  - -
                                                                                                                                  2310
                                                                                                                                  -
                                                                                                                                  2311 /**
                                                                                                                                  -
                                                                                                                                  2312 * The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  -
                                                                                                                                  2313 * We store this to pass to the congestion control module when this packet is acked in the future.
                                                                                                                                  -
                                                                                                                                  2314 * Some congestion control algorithms compute CWND based on an earlier CWND value.
                                                                                                                                  -
                                                                                                                                  2315 * Not `const` for similar reason as #m_sent_time.
                                                                                                                                  -
                                                                                                                                  2316 *
                                                                                                                                  -
                                                                                                                                  2317 * @internal
                                                                                                                                  -
                                                                                                                                  2318 * @todo Why is #m_sent_cwnd_bytes in Sent_when `struct` and not directly in `Sent_packet`? Or maybe it should
                                                                                                                                  -
                                                                                                                                  2319 * stay here, but Sent_when should be renamed `Send_attempt` (or `Send_try` for brevity)? Yeah, I think that's
                                                                                                                                  -
                                                                                                                                  2320 * it. Then Sent_packet::m_sent_when -- a container of Sent_when objects -- would become `m_send_tries`, a
                                                                                                                                  -
                                                                                                                                  2321 * container of `Send_try` objects. That makes more sense (sentce?!) than the status quo which involves the
                                                                                                                                  -
                                                                                                                                  2322 * singular-means-plural strangeness.
                                                                                                                                  -
                                                                                                                                  2323 *
                                                                                                                                  -
                                                                                                                                  2324 * @todo Can we make #m_sent_cwnd_bytes and some of its peers `const`?
                                                                                                                                  -
                                                                                                                                  2325 */
                                                                                                                                  -
                                                                                                                                  2326 // That @internal should not be necessary to hide the @todo in public generated docs -- Doxygen bug?
                                                                                                                                  - -
                                                                                                                                  2328}; // struct Peer_socket::Sent_packet::Sent_when
                                                                                                                                  -
                                                                                                                                  2329
                                                                                                                                  -
                                                                                                                                  2330/**
                                                                                                                                  -
                                                                                                                                  2331 * @private
                                                                                                                                  -
                                                                                                                                  2332 *
                                                                                                                                  -
                                                                                                                                  2333 * Metadata (and data, if retransmission is on) for a packet that has been received (and, if
                                                                                                                                  -
                                                                                                                                  2334 * retransmission is off, copied to Receive buffer). This is purely a data store, not a class.
                                                                                                                                  -
                                                                                                                                  2335 * It is not copyable, and moving them around by smart Received_packet::Ptr is encouraged.
                                                                                                                                  -
                                                                                                                                  2336 */
                                                                                                                                  - -
                                                                                                                                  2338 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  -
                                                                                                                                  2339 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket::Received_packet>>,
                                                                                                                                  -
                                                                                                                                  2340 private boost::noncopyable
                                                                                                                                  -
                                                                                                                                  2341{
                                                                                                                                  -
                                                                                                                                  2342 // Data.
                                                                                                                                  -
                                                                                                                                  2343
                                                                                                                                  -
                                                                                                                                  2344 /// Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  -
                                                                                                                                  2345 const size_t m_size;
                                                                                                                                  -
                                                                                                                                  2346
                                                                                                                                  -
                                                                                                                                  2347 /**
                                                                                                                                  -
                                                                                                                                  2348 * Byte sequence equal to that of Data_packet::m_data of the packet. Kept `empty()` if retransmission is off,
                                                                                                                                  -
                                                                                                                                  2349 * since in that mode any received packet's `m_data` is immediately moved to Receive buffer. With
                                                                                                                                  -
                                                                                                                                  2350 * retransmission on, it is stored until all gaps before the packet are filled (a/k/a
                                                                                                                                  -
                                                                                                                                  2351 * reassembly).
                                                                                                                                  -
                                                                                                                                  2352 */
                                                                                                                                  - -
                                                                                                                                  2354
                                                                                                                                  -
                                                                                                                                  2355 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  2356
                                                                                                                                  -
                                                                                                                                  2357 /**
                                                                                                                                  -
                                                                                                                                  2358 * Constructs object by storing size of data and, if so instructed, the data themselves.
                                                                                                                                  -
                                                                                                                                  2359 *
                                                                                                                                  -
                                                                                                                                  2360 * @param logger_ptr
                                                                                                                                  -
                                                                                                                                  2361 * The Logger implementation to use subsequently.
                                                                                                                                  -
                                                                                                                                  2362 * @param size
                                                                                                                                  -
                                                                                                                                  2363 * #m_size.
                                                                                                                                  -
                                                                                                                                  2364 * @param src_data
                                                                                                                                  -
                                                                                                                                  2365 * Pointer to the packet data to be moved into #m_data; or null if we shouldn't store it.
                                                                                                                                  -
                                                                                                                                  2366 * This should be null if and only if retransmission is off. If not null, for
                                                                                                                                  -
                                                                                                                                  2367 * performance, `*src_data` is CLEARED by this constructor (its data moved, in constant
                                                                                                                                  -
                                                                                                                                  2368 * time, into #m_data). In that case, `src_data.size() == size` must be true at entrance to
                                                                                                                                  -
                                                                                                                                  2369 * constructor, or behavior is undefined.
                                                                                                                                  -
                                                                                                                                  2370 */
                                                                                                                                  -
                                                                                                                                  2371 explicit Received_packet(log::Logger* logger_ptr, size_t size, util::Blob* src_data);
                                                                                                                                  -
                                                                                                                                  2372};
                                                                                                                                  -
                                                                                                                                  2373
                                                                                                                                  -
                                                                                                                                  2374/**
                                                                                                                                  -
                                                                                                                                  2375 * @private
                                                                                                                                  -
                                                                                                                                  2376 *
                                                                                                                                  -
                                                                                                                                  2377 * Metadata describing the data sent in the acknowledgment of an individual received packet. (A
                                                                                                                                  -
                                                                                                                                  2378 * low-level ACK packet may include several sets of such data.) This is purely a data store, not
                                                                                                                                  -
                                                                                                                                  2379 * a class. It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged.
                                                                                                                                  -
                                                                                                                                  2380 * Construct this by direct member initialization.
                                                                                                                                  -
                                                                                                                                  2381 */
                                                                                                                                  - -
                                                                                                                                  2383 // Cannot use boost::noncopyable or Shared_ptr_alias_holder, because that turns off direct initialization.
                                                                                                                                  -
                                                                                                                                  2384{
                                                                                                                                  -
                                                                                                                                  2385 // Types.
                                                                                                                                  -
                                                                                                                                  2386
                                                                                                                                  -
                                                                                                                                  2387 /// Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  2388 using Ptr = boost::shared_ptr<Individual_ack>;
                                                                                                                                  -
                                                                                                                                  2389
                                                                                                                                  -
                                                                                                                                  2390 /// Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  2391 using Const_ptr = boost::shared_ptr<const Individual_ack>;
                                                                                                                                  -
                                                                                                                                  2392
                                                                                                                                  -
                                                                                                                                  2393 // Data.
                                                                                                                                  -
                                                                                                                                  2394
                                                                                                                                  -
                                                                                                                                  2395 /// Sequence number of first datum in packet.
                                                                                                                                  - -
                                                                                                                                  2397
                                                                                                                                  -
                                                                                                                                  2398 /**
                                                                                                                                  -
                                                                                                                                  2399 * Retransmit counter of the packet (as reported by sender). Identifies which attempt we are
                                                                                                                                  -
                                                                                                                                  2400 * acknowledging (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Always 0
                                                                                                                                  -
                                                                                                                                  2401 * unless retransmission is on.
                                                                                                                                  -
                                                                                                                                  2402 */
                                                                                                                                  -
                                                                                                                                  2403 const unsigned int m_rexmit_id;
                                                                                                                                  -
                                                                                                                                  2404
                                                                                                                                  -
                                                                                                                                  2405 /// When was it received? Used for supplying delay before acknowledging (for other side's RTT calculations).
                                                                                                                                  - -
                                                                                                                                  2407
                                                                                                                                  -
                                                                                                                                  2408 /// Number of bytes in the packet's user data.
                                                                                                                                  -
                                                                                                                                  2409 const size_t m_data_size;
                                                                                                                                  -
                                                                                                                                  2410
                                                                                                                                  -
                                                                                                                                  2411 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  2412
                                                                                                                                  -
                                                                                                                                  2413 /// Force direct member initialization even if no member is `const`.
                                                                                                                                  - -
                                                                                                                                  2415
                                                                                                                                  -
                                                                                                                                  2416 // Methods.
                                                                                                                                  -
                                                                                                                                  2417
                                                                                                                                  -
                                                                                                                                  2418 /// Forbid copy assignment.
                                                                                                                                  - -
                                                                                                                                  2420}; // struct Peer_socket::Individual_ack
                                                                                                                                  -
                                                                                                                                  2421
                                                                                                                                  -
                                                                                                                                  2422// Free functions: in *_fwd.hpp.
                                                                                                                                  -
                                                                                                                                  2423
                                                                                                                                  -
                                                                                                                                  2424// However the following refer to inner type(s) and hence must be declared here and not _fwd.hpp.
                                                                                                                                  -
                                                                                                                                  2425
                                                                                                                                  -
                                                                                                                                  2426/**
                                                                                                                                  -
                                                                                                                                  2427 * @internal
                                                                                                                                  +
                                                                                                                                  39#include <type_traits>
                                                                                                                                  +
                                                                                                                                  40
                                                                                                                                  +
                                                                                                                                  41namespace flow::net_flow
                                                                                                                                  +
                                                                                                                                  42{
                                                                                                                                  +
                                                                                                                                  43// Types.
                                                                                                                                  +
                                                                                                                                  44
                                                                                                                                  +
                                                                                                                                  45/**
                                                                                                                                  +
                                                                                                                                  46 * A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and
                                                                                                                                  +
                                                                                                                                  47 * reliability support.
                                                                                                                                  +
                                                                                                                                  48 *
                                                                                                                                  +
                                                                                                                                  49 * Reliability is enabled or disabled via a socket option, Peer_socket_options::m_st_rexmit_on,
                                                                                                                                  +
                                                                                                                                  50 * at socket creation. Use unreliable mode with care -- see send() method doc header for details.
                                                                                                                                  +
                                                                                                                                  51 *
                                                                                                                                  +
                                                                                                                                  52 * ### Life cycle of a Peer_socket ###
                                                                                                                                  +
                                                                                                                                  53 * A given Peer_socket can arise either by connecting to
                                                                                                                                  +
                                                                                                                                  54 * Server_socket on a Node (Node::connect() or Node::sync_connect()), or by listening on a
                                                                                                                                  +
                                                                                                                                  55 * Node's Server_socket and accepting such a connection (Server_socket::accept() or
                                                                                                                                  +
                                                                                                                                  56 * Server_socket::sync_accept()). In all cases, Node or Server_socket generates a new Peer_socket
                                                                                                                                  +
                                                                                                                                  57 * and returns it (factory pattern). Peer_socket is not instantiable otherwise. A Peer_socket
                                                                                                                                  +
                                                                                                                                  58 * cannot be deleted explicitly by the user and will only be returned via `boost::shared_ptr<>`; when
                                                                                                                                  +
                                                                                                                                  59 * both the Node and all user code no longer refers to it, the Peer_socket will be destroyed.
                                                                                                                                  +
                                                                                                                                  60 *
                                                                                                                                  +
                                                                                                                                  61 * Once a `net_flow` user has a Peer_socket object, that object represents a socket in one of the
                                                                                                                                  +
                                                                                                                                  62 * following basic states:
                                                                                                                                  +
                                                                                                                                  63 *
                                                                                                                                  +
                                                                                                                                  64 * - Open.
                                                                                                                                  +
                                                                                                                                  65 * - Sub-states:
                                                                                                                                  +
                                                                                                                                  66 * - Connecting. (Never Writable, never Readable.)
                                                                                                                                  +
                                                                                                                                  67 * - Connected. (May be Writable, may be Readable.)
                                                                                                                                  +
                                                                                                                                  68 * - Disconnecting. (May be Readable, never Writable.)
                                                                                                                                  +
                                                                                                                                  69 * - Closed.
                                                                                                                                  +
                                                                                                                                  70 * - Socket can neither read nor write.
                                                                                                                                  +
                                                                                                                                  71 *
                                                                                                                                  +
                                                                                                                                  72 * Open.Connecting means means Node initiated a connect to the given server, and this is in
                                                                                                                                  +
                                                                                                                                  73 * progress. Open.Connected means the connection to the other Node is fully functional.
                                                                                                                                  +
                                                                                                                                  74 * Open.Disconnecting means either our side or the other side has initiated a clean or abrupt
                                                                                                                                  +
                                                                                                                                  75 * disconnect, but it is not yet entirely finished (background handshaking is happening, you have
                                                                                                                                  +
                                                                                                                                  76 * not read all available data or sent all queued data, etc.).
                                                                                                                                  +
                                                                                                                                  77 *
                                                                                                                                  +
                                                                                                                                  78 * In either case, reading and writing may or may not be possible at a given time, depending on the
                                                                                                                                  +
                                                                                                                                  79 * state of the internal buffers and the data having arrived on the logical connection. Thus all
                                                                                                                                  +
                                                                                                                                  80 * Open sub-states can and often should be treated the same way in a typical Flow-protocol-using algorithm:
                                                                                                                                  +
                                                                                                                                  81 * simply determine when the Peer_socket is Readable, and read; and similarly for Writable and
                                                                                                                                  +
                                                                                                                                  82 * write. Thus the sub-states are distinguished for informational/diagnostic purposes only, as user
                                                                                                                                  +
                                                                                                                                  83 * reading/writing logic in these states should usually be identical.
                                                                                                                                  +
                                                                                                                                  84 *
                                                                                                                                  +
                                                                                                                                  85 * @todo Closing connection considerations. May implement closing only via timeouts at first (as
                                                                                                                                  +
                                                                                                                                  86 * opposed to explicit closing). Below text refers to `close_final()` and `close_start()`, but those
                                                                                                                                  +
                                                                                                                                  87 * are just ideas and may be replaced with timeout, or nothing. At this time, the only closing
                                                                                                                                  +
                                                                                                                                  88 * supported is abrupt close due to error or abrupt close via close_abruptly().
                                                                                                                                  +
                                                                                                                                  89 *
                                                                                                                                  +
                                                                                                                                  90 * Closed means that the Peer_socket has become disconnected, and no data can possibly be
                                                                                                                                  +
                                                                                                                                  91 * received or sent, AND that Node has no more background internal operations to perform and has
                                                                                                                                  +
                                                                                                                                  92 * disowned the Peer_socket. In other words, a Closed Peer_socket is entirely dead.
                                                                                                                                  +
                                                                                                                                  93 *
                                                                                                                                  +
                                                                                                                                  94 * Exactly the following state transitions are possible for a given Peer_socket returned by Node:
                                                                                                                                  +
                                                                                                                                  95 *
                                                                                                                                  +
                                                                                                                                  96 * - start => Closed
                                                                                                                                  +
                                                                                                                                  97 * - start => Open
                                                                                                                                  +
                                                                                                                                  98 * - Open => Closed
                                                                                                                                  +
                                                                                                                                  99 *
                                                                                                                                  +
                                                                                                                                  100 * Note, in particular, that Closed is final; socket cannot move from Closed to
                                                                                                                                  +
                                                                                                                                  101 * Open. If after an error or valid disconnection you want to reestablish a
                                                                                                                                  +
                                                                                                                                  102 * connection, obtain a new Peer_socket from Node's factories. Rationale (subject to change):
                                                                                                                                  +
                                                                                                                                  103 * this cuts down on state having to be tracked inside a Peer_socket, while the interface becomes
                                                                                                                                  +
                                                                                                                                  104 * simpler without much impact on usability. Anti-rationale: contradicts BSD socket and boost.asio
                                                                                                                                  +
                                                                                                                                  105 * established practices; potentially more resource-intensive/slower in the event of errors and
                                                                                                                                  +
                                                                                                                                  106 * disconnects. Why IMO rationale > anti-rationale: it's simpler, and the potential problems do not
                                                                                                                                  +
                                                                                                                                  107 * appear immediately serious; added statefulness can be added later if found desirable.
                                                                                                                                  +
                                                                                                                                  108 *
                                                                                                                                  +
                                                                                                                                  109 * Receving, sending, and buffers: Peer_socket, like a TCP socket, has a Receive buffer (a/k/a
                                                                                                                                  +
                                                                                                                                  110 * FIFO queue of bytes) of some maximum size and a Send buffer (a/k/a FIFO queue of bytes) of some
                                                                                                                                  +
                                                                                                                                  111 * maximum size. They are typically not directly exposed via the interface, but their existence
                                                                                                                                  +
                                                                                                                                  112 * affects documented behavior. I formally describe them here, but generally they work similarly to
                                                                                                                                  +
                                                                                                                                  113 * TCP socket Send/Receive buffers.
                                                                                                                                  +
                                                                                                                                  114 *
                                                                                                                                  +
                                                                                                                                  115 * The Receive buffer: Contains bytes asynchronously received on the connection that have not yet
                                                                                                                                  +
                                                                                                                                  116 * been removed with a `*receive()` method. Any bytes that asynchronously arrive on the connection are
                                                                                                                                  +
                                                                                                                                  117 * asynchronously stored to the buffer on the other side of the buffer in a queued fashion.
                                                                                                                                  +
                                                                                                                                  118 *
                                                                                                                                  +
                                                                                                                                  119 * The Send buffer: Contains bytes intended to be asynchronously sent on the connection that have
                                                                                                                                  +
                                                                                                                                  120 * been placed there by a `*send()` method but not yet sent on the connection. Any bytes that are
                                                                                                                                  +
                                                                                                                                  121 * asynchronously sent on the connection are asynchronously removed from the buffer on the other
                                                                                                                                  +
                                                                                                                                  122 * side of the buffer in a queued fashion.
                                                                                                                                  +
                                                                                                                                  123 *
                                                                                                                                  +
                                                                                                                                  124 * With that in mind, here are the definitions of Readable and Writable while state is Open:
                                                                                                                                  +
                                                                                                                                  125 *
                                                                                                                                  +
                                                                                                                                  126 * - Readable <=> Data available in internal Receive buffer, and user has not explicitly announced
                                                                                                                                  +
                                                                                                                                  127 * via `close_final()` they're not interested in reading further.
                                                                                                                                  +
                                                                                                                                  128 * - Writable <=> Space for data available in internal Send buffer, and the state is Open.Connected.
                                                                                                                                  +
                                                                                                                                  129 *
                                                                                                                                  +
                                                                                                                                  130 * Note that neither definition really cares about the state of the network connection (e.g., could
                                                                                                                                  +
                                                                                                                                  131 * bytes actually be sent over the network at the moment?). There is one caveat: A
                                                                                                                                  +
                                                                                                                                  132 * socket is not Writable until Open.Connecting state is transitioned away from; this prevents user
                                                                                                                                  +
                                                                                                                                  133 * from buffering up send data before the connection is ready. (Allowing that would not necessarily
                                                                                                                                  +
                                                                                                                                  134 * be wrong, but I'm taking a cue from BSD socket semantics on this, as they seem to be convenient.)
                                                                                                                                  +
                                                                                                                                  135 *
                                                                                                                                  +
                                                                                                                                  136 * In Open, the following archetypal operations are provided. (In Closed all
                                                                                                                                  +
                                                                                                                                  137 * immediately fail; in Open.Disconnecting some immediately fail if `close*()` has been called.) Let
                                                                                                                                  +
                                                                                                                                  138 * R be the current size of data in the Receive buffer, and S be the available space for data in the
                                                                                                                                  +
                                                                                                                                  139 * Send buffer.
                                                                                                                                  +
                                                                                                                                  140 *
                                                                                                                                  +
                                                                                                                                  141 * - `receive(N)`. If Readable, return to caller `min(N, R)` oldest data to have been received from
                                                                                                                                  +
                                                                                                                                  142 * the other side, and remove them from Receive buffer. Otherwise do nothing.
                                                                                                                                  +
                                                                                                                                  143 * - `send(N)`. If Writable, take from caller `min(N, S)` data to be appended to the Send
                                                                                                                                  +
                                                                                                                                  144 * buffer and, when possible, sent to the other side. Otherwise do nothing.
                                                                                                                                  +
                                                                                                                                  145 * - `sync_receive(N)`. If Readable, `receive(N)`. Otherwise sleep until Readable, then `receive(N)`.
                                                                                                                                  +
                                                                                                                                  146 * - `sync_send(N)`. If Writable, `send(N)`. Otherwise sleep until Writable, then `send(N)`.
                                                                                                                                  +
                                                                                                                                  147 *
                                                                                                                                  +
                                                                                                                                  148 * These are similar to TCP Receive and Send APIs in non-blocking mode, and TCP Receive and Send APIs in
                                                                                                                                  +
                                                                                                                                  149 * blocking mode, respectively. There may be other similarly themed methods, but all use these as
                                                                                                                                  +
                                                                                                                                  150 * semantic building blocks.
                                                                                                                                  +
                                                                                                                                  151 *
                                                                                                                                  +
                                                                                                                                  152 * To understand the order of events, one can think of a disconnect-causing event (like a graceful
                                                                                                                                  +
                                                                                                                                  153 * close initiation from the remote socket) as a piece of data itself. Thus, for example, if 5
                                                                                                                                  +
                                                                                                                                  154 * bytes are received and placed into the Receive buffer without being read by the user, and then a
                                                                                                                                  +
                                                                                                                                  155 * connection close is detected, the socket will be Readable until the 5 bytes have been
                                                                                                                                  +
                                                                                                                                  156 * receive()ed, and the next receive() (or send()) would yield the error, since that's the order
                                                                                                                                  +
                                                                                                                                  157 * things happened. Similarly, suppose you've sent 5 bytes, but they haven't been yet
                                                                                                                                  +
                                                                                                                                  158 * sent over the wire and are sitting in the Send buffer. Then you trigger a graceful connection close.
                                                                                                                                  +
                                                                                                                                  159 * First the 5 bytes will be sent if possible, and then the closing procedure will actually begin.
                                                                                                                                  +
                                                                                                                                  160 *
                                                                                                                                  +
                                                                                                                                  161 * Abrupt closes such as connection resets may force both buffers to be immediately emptied without
                                                                                                                                  +
                                                                                                                                  162 * giving to the user or writing to the other side, so that the above rule does not have to apply.
                                                                                                                                  +
                                                                                                                                  163 * Typically a connection reset means the socket is immediately unusable no matter what was in the
                                                                                                                                  +
                                                                                                                                  164 * buffers at the time, per BSD socket semantics.
                                                                                                                                  +
                                                                                                                                  165 *
                                                                                                                                  +
                                                                                                                                  166 * ### Efficiently reading/writing ###
                                                                                                                                  +
                                                                                                                                  167 * The `sync_*`() methods are efficient, in that they use no processor
                                                                                                                                  +
                                                                                                                                  168 * cycles until Readable or Writable is achieved (i.e., they sleep until that point). The
                                                                                                                                  +
                                                                                                                                  169 * non-blocking versions don't sleep/block, however. For a program using them to be efficient it
                                                                                                                                  +
                                                                                                                                  170 * should sleep until Readable or Writable and only then call receive()/send(), when data are
                                                                                                                                  +
                                                                                                                                  171 * certainly available for immediate reading or writing. Moreover, a complex program is likely to
                                                                                                                                  +
                                                                                                                                  172 * want to perform this sleep-and-conditional-wake on a set of several Peer_socket objects simultaneously
                                                                                                                                  +
                                                                                                                                  173 * (similarly to `select()`, `epoll*()`, etc.). Use class Event_set for this purpose.
                                                                                                                                  +
                                                                                                                                  174 *
                                                                                                                                  +
                                                                                                                                  175 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  176 * Same as for Node. (Briefly: all operations safe for simultaneous execution on
                                                                                                                                  +
                                                                                                                                  177 * separate or the same object.)
                                                                                                                                  +
                                                                                                                                  178 *
                                                                                                                                  +
                                                                                                                                  179 * @internal
                                                                                                                                  +
                                                                                                                                  180 *
                                                                                                                                  +
                                                                                                                                  181 * Implementation notes
                                                                                                                                  +
                                                                                                                                  182 * --------------------
                                                                                                                                  +
                                                                                                                                  183 *
                                                                                                                                  +
                                                                                                                                  184 * While to a user a Peer_socket appears as a nearly self-sufficient object (i.e., you can do things
                                                                                                                                  +
                                                                                                                                  185 * like `s->send()`, which means 'socket `s`, send some data!''), the most reasonable way to internally
                                                                                                                                  +
                                                                                                                                  186 * implement this is to have Node contain the logic behind a Peer_socket (and how it works together
                                                                                                                                  +
                                                                                                                                  187 * with other Peer_socket objects and other internal infrastructure). Thus Node is the class with all of
                                                                                                                                  +
                                                                                                                                  188 * the logic behind (for example) `s->send()`. Peer_socket then, privately, is not too much more than a
                                                                                                                                  +
                                                                                                                                  189 * collection of data (like a `struct` almost) to help Node.
                                                                                                                                  +
                                                                                                                                  190 *
                                                                                                                                  +
                                                                                                                                  191 * Therefore Peer_socket provides a clean object-oriented public interface to the user but, on the
                                                                                                                                  +
                                                                                                                                  192 * implementation side, is basically a data store (with Node as `friend`) and forwards the logic to
                                                                                                                                  +
                                                                                                                                  193 * the originating Node. One idea to make this dichotomy more cleanly expressed (e.g., without
                                                                                                                                  +
                                                                                                                                  194 * `friend`) was to make Peer_socket a pure interface and have Node produce `Peer_socket_impl`
                                                                                                                                  +
                                                                                                                                  195 * objects, where `Peer_socket_impl` implements Peer_socket and is itself private to the user (a
                                                                                                                                  +
                                                                                                                                  196 * classic factory pattern). Unfortunately defining function templates such as `send<Buffers>()`
                                                                                                                                  +
                                                                                                                                  197 * (where `Buffers` is an arbitrary `Buffers` concept model) as pure `virtual` functions is not really
                                                                                                                                  +
                                                                                                                                  198 * possible in C++. Since such a templated interface can be highly convenient (see boost.asio with
                                                                                                                                  +
                                                                                                                                  199 * its seamless support for buffers and buffer sequences of most types, including scatter-gather),
                                                                                                                                  +
                                                                                                                                  200 * the usefulness of the interface trumps implementation beauty.
                                                                                                                                  +
                                                                                                                                  201 *
                                                                                                                                  +
                                                                                                                                  202 * To prevent node.cpp from being unmanageably large (and also because it makes sense),
                                                                                                                                  +
                                                                                                                                  203 * implementations for Node methods that deal only with an individual Peer_socket reside in
                                                                                                                                  +
                                                                                                                                  204 * peer_socket.cpp (even though they are members of Node, since, again, the logic is all forwarded to Node).
                                                                                                                                  +
                                                                                                                                  205 *
                                                                                                                                  +
                                                                                                                                  206 * @todo Rename `State` and `Open_sub_state` to `Phase` and `Open_sub_phase` respectively; and
                                                                                                                                  +
                                                                                                                                  207 * `Int_state` to `State`. Explain difference between phases (application-layer, user-visible and used
                                                                                                                                  +
                                                                                                                                  208 * close to application layer) and states (transport layer, internal).
                                                                                                                                  +
                                                                                                                                  209 *
                                                                                                                                  +
                                                                                                                                  210 * @todo Look into a way to defeat the need for boiler-plate trickery -- with low but non-zero perf cost --
                                                                                                                                  +
                                                                                                                                  211 * involving `*_socket`-vs-`Node` circular references in method templates, such as the way
                                                                                                                                  +
                                                                                                                                  212 * Peer_socket::send() and Peer_socket::receive() internally make `Function<>`s before forwarding to the core
                                                                                                                                  +
                                                                                                                                  213 * in Node. Can this be done with `.inl` files? Look into how Boost internally uses `.inl` files; this could
                                                                                                                                  +
                                                                                                                                  214 * inspire a solution... or not.
                                                                                                                                  +
                                                                                                                                  215 */
                                                                                                                                  + + +
                                                                                                                                  218 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  +
                                                                                                                                  219 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket>>,
                                                                                                                                  +
                                                                                                                                  220 // Allow access to Ptr(this) from inside Peer_socket methods. Just call shared_from_this().
                                                                                                                                  +
                                                                                                                                  221 public boost::enable_shared_from_this<Peer_socket>,
                                                                                                                                  +
                                                                                                                                  222 public log::Log_context,
                                                                                                                                  +
                                                                                                                                  223 private boost::noncopyable
                                                                                                                                  +
                                                                                                                                  224{
                                                                                                                                  +
                                                                                                                                  225public:
                                                                                                                                  +
                                                                                                                                  226 // Types.
                                                                                                                                  +
                                                                                                                                  227
                                                                                                                                  +
                                                                                                                                  228 /// State of a Peer_socket.
                                                                                                                                  +
                                                                                                                                  229 enum class State
                                                                                                                                  +
                                                                                                                                  230 {
                                                                                                                                  +
                                                                                                                                  231 /// Future reads or writes may be possible. A socket in this state may be Writable or Readable.
                                                                                                                                  +
                                                                                                                                  232 S_OPEN,
                                                                                                                                  +
                                                                                                                                  233 /// Neither future reads nor writes are possible, AND Node has disowned the Peer_socket.
                                                                                                                                  +
                                                                                                                                  234 S_CLOSED
                                                                                                                                  +
                                                                                                                                  235 };
                                                                                                                                  +
                                                                                                                                  236
                                                                                                                                  +
                                                                                                                                  237 /// The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  +
                                                                                                                                  238 enum class Open_sub_state
                                                                                                                                  +
                                                                                                                                  239 {
                                                                                                                                  +
                                                                                                                                  240 /**
                                                                                                                                  +
                                                                                                                                  241 * This Peer_socket was created through an active connect (Node::connect() and the like), and
                                                                                                                                  +
                                                                                                                                  242 * the connection to the remote Node is currently being negotiated by this socket's Node.
                                                                                                                                  +
                                                                                                                                  243 * A socket in this state may be Writable but cannot be Readable. However, except for
                                                                                                                                  +
                                                                                                                                  244 * diagnostic purposes, this state should generally be treated the same as S_CONNECTED.
                                                                                                                                  +
                                                                                                                                  245 */
                                                                                                                                  +
                                                                                                                                  246 S_CONNECTING,
                                                                                                                                  +
                                                                                                                                  247
                                                                                                                                  +
                                                                                                                                  248 /**
                                                                                                                                  +
                                                                                                                                  249 * This Peer_socket was created through a passive connect (Node::accept() and the like) or an
                                                                                                                                  +
                                                                                                                                  250 * active connect (Node::connect() and the like), and the connection is (as far this socket's
                                                                                                                                  +
                                                                                                                                  251 * Node knows) set up and functioning. A socket in this state may be Writable or Readable.
                                                                                                                                  +
                                                                                                                                  252 */
                                                                                                                                  +
                                                                                                                                  253 S_CONNECTED,
                                                                                                                                  +
                                                                                                                                  254
                                                                                                                                  +
                                                                                                                                  255 /**
                                                                                                                                  +
                                                                                                                                  256 * This Peer_socket was created through a passive connect (Node::accept() and the like) or an
                                                                                                                                  +
                                                                                                                                  257 * active connect (Node::connect() and the like), but since then either an active close,
                                                                                                                                  +
                                                                                                                                  258 * passive close, or an error has begun to close the connection, but data may still possibly
                                                                                                                                  +
                                                                                                                                  259 * arrive and be Readable; also data may have been "sent" but still sitting in the Send buffer
                                                                                                                                  +
                                                                                                                                  260 * and needs to be sent over the network. A socket in this state may be Readable but cannot
                                                                                                                                  +
                                                                                                                                  261 * be Writable.
                                                                                                                                  +
                                                                                                                                  262 *
                                                                                                                                  +
                                                                                                                                  263 * This implies that a non-S_CLOSED socket may be, at a lower level, disconnected. For
                                                                                                                                  +
                                                                                                                                  264 * example, say there are 5 bytes in the Receive buffer, and the other side sends a graceful
                                                                                                                                  +
                                                                                                                                  265 * disconnect packet to this socket. This means the connection is finished, but the user can
                                                                                                                                  +
                                                                                                                                  266 * still receive() the 5 bytes (without blocking). Then state will remain
                                                                                                                                  +
                                                                                                                                  267 * S_OPEN.S_DISCONNECTING until the last of the 5 bytes is received (gone from the buffer); at
                                                                                                                                  +
                                                                                                                                  268 * this point state may change to S_CLOSED (pending any other work Node must do to be able to
                                                                                                                                  +
                                                                                                                                  269 * disown the socket).
                                                                                                                                  +
                                                                                                                                  270 */
                                                                                                                                  +
                                                                                                                                  271 S_DISCONNECTING
                                                                                                                                  +
                                                                                                                                  272 }; // enum class Open_sub_state
                                                                                                                                  +
                                                                                                                                  273
                                                                                                                                  +
                                                                                                                                  274 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  275
                                                                                                                                  +
                                                                                                                                  276 /// Boring `virtual` destructor. Note that deletion is to be handled exclusively via `shared_ptr`, never explicitly.
                                                                                                                                  +
                                                                                                                                  277 ~Peer_socket() override;
                                                                                                                                  +
                                                                                                                                  278
                                                                                                                                  +
                                                                                                                                  279 // Methods.
                                                                                                                                  +
                                                                                                                                  280
                                                                                                                                  +
                                                                                                                                  281 /**
                                                                                                                                  +
                                                                                                                                  282 * Current State of the socket.
                                                                                                                                  +
                                                                                                                                  283 *
                                                                                                                                  +
                                                                                                                                  284 * @param open_sub_state
                                                                                                                                  +
                                                                                                                                  285 * Ignored if null. Otherwise, if and only if State::S_OPEN is returned, `*open_sub_state` is set to
                                                                                                                                  +
                                                                                                                                  286 * the current sub-state of `S_OPEN`.
                                                                                                                                  +
                                                                                                                                  287 * @return Current main state of the socket.
                                                                                                                                  +
                                                                                                                                  288 */
                                                                                                                                  +
                                                                                                                                  289 State state(Open_sub_state* open_sub_state = 0) const;
                                                                                                                                  +
                                                                                                                                  290
                                                                                                                                  +
                                                                                                                                  291 /**
                                                                                                                                  +
                                                                                                                                  292 * Node that produced this Peer_socket.
                                                                                                                                  +
                                                                                                                                  293 *
                                                                                                                                  +
                                                                                                                                  294 * @return Pointer to (guaranteed valid) Node; null if state is State::S_CLOSED.
                                                                                                                                  +
                                                                                                                                  295 */
                                                                                                                                  +
                                                                                                                                  296 Node* node() const;
                                                                                                                                  +
                                                                                                                                  297
                                                                                                                                  +
                                                                                                                                  298 /**
                                                                                                                                  +
                                                                                                                                  299 * Intended other side of the connection (regardless of success, failure, or current State).
                                                                                                                                  +
                                                                                                                                  300 * For a given Peer_socket, this will always return the same value, even if state is
                                                                                                                                  +
                                                                                                                                  301 * State::S_CLOSED.
                                                                                                                                  +
                                                                                                                                  302 *
                                                                                                                                  +
                                                                                                                                  303 * @return See above.
                                                                                                                                  +
                                                                                                                                  304 */
                                                                                                                                  +
                                                                                                                                  305 const Remote_endpoint& remote_endpoint() const;
                                                                                                                                  +
                                                                                                                                  306
                                                                                                                                  +
                                                                                                                                  307 /**
                                                                                                                                  +
                                                                                                                                  308 * The local Flow-protocol port chosen by the Node (if active or passive open) or user (if passive open) for
                                                                                                                                  +
                                                                                                                                  309 * this side of the connection. For a given Peer_socket, this will always return the same value,
                                                                                                                                  +
                                                                                                                                  310 * even if state is State::S_CLOSED. However, when state is State::S_CLOSED, the port may be unused or
                                                                                                                                  +
                                                                                                                                  311 * taken by another socket.
                                                                                                                                  +
                                                                                                                                  312 *
                                                                                                                                  +
                                                                                                                                  313 * @return See above.
                                                                                                                                  +
                                                                                                                                  314 */
                                                                                                                                  +
                                                                                                                                  315 flow_port_t local_port() const;
                                                                                                                                  +
                                                                                                                                  316
                                                                                                                                  +
                                                                                                                                  317 /**
                                                                                                                                  +
                                                                                                                                  318 * Obtains the serialized connect metadata, as supplied by the user during the connection handshake.
                                                                                                                                  +
                                                                                                                                  319 * If this side initiated the connection (Node::connect() and friends), then this will equal what
                                                                                                                                  +
                                                                                                                                  320 * was passed to the connect_with_metadata() (or similar) method. More likely, if this side
                                                                                                                                  +
                                                                                                                                  321 * accepted the connection (Server_socket::accept() and friends), then this will equal what the
                                                                                                                                  +
                                                                                                                                  322 * user on the OTHER side passed to connect_with_metadata() or similar.
                                                                                                                                  +
                                                                                                                                  323 *
                                                                                                                                  +
                                                                                                                                  324 * @note It is up to the user to deserialize the metadata portably. One recommended convention is to
                                                                                                                                  +
                                                                                                                                  325 * use `boost::endian::native_to_little()` (and similar) before connecting; and
                                                                                                                                  +
                                                                                                                                  326 * on the other side use the reverse (`boost::endian::little_to_native()`) before using the value.
                                                                                                                                  +
                                                                                                                                  327 * Packet dumps will show a flipped (little-endian) representation, while with most platforms the conversion
                                                                                                                                  +
                                                                                                                                  328 * will be a no-op at compile time. Alternatively use `native_to_big()` and vice-versa.
                                                                                                                                  +
                                                                                                                                  329 * @note If a connect() variant without `_with_metadata` in the name was used, then the metadata are
                                                                                                                                  +
                                                                                                                                  330 * composed of a single byte with the zero value.
                                                                                                                                  +
                                                                                                                                  331 * @param buffer
                                                                                                                                  +
                                                                                                                                  332 * A buffer to copy the metadata into.
                                                                                                                                  +
                                                                                                                                  333 * @param err_code
                                                                                                                                  +
                                                                                                                                  334 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  335 * @return The size of the copied metadata.
                                                                                                                                  +
                                                                                                                                  336 */
                                                                                                                                  +
                                                                                                                                  337 size_t get_connect_metadata(const boost::asio::mutable_buffer& buffer,
                                                                                                                                  +
                                                                                                                                  338 Error_code* err_code = 0) const;
                                                                                                                                  +
                                                                                                                                  339
                                                                                                                                  +
                                                                                                                                  340 /**
                                                                                                                                  +
                                                                                                                                  341 * Sends (adds to the Send buffer) the given bytes of data up to a maximum internal buffer size;
                                                                                                                                  +
                                                                                                                                  342 * and asynchronously sends them to the other side. The data given is copied into `*this`, in the order
                                                                                                                                  +
                                                                                                                                  343 * given. Only as many bytes as possible without the Send buffer size exceeding a certain max are
                                                                                                                                  +
                                                                                                                                  344 * copied.
                                                                                                                                  +
                                                                                                                                  345 *
                                                                                                                                  +
                                                                                                                                  346 * The method does not block. Data are then sent asynchronously (in the background).
                                                                                                                                  +
                                                                                                                                  347 *
                                                                                                                                  +
                                                                                                                                  348 * Method does nothing except possibly logging if there are no bytes in data.
                                                                                                                                  +
                                                                                                                                  349 *
                                                                                                                                  +
                                                                                                                                  350 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  351 * These are the possible outcomes.
                                                                                                                                  +
                                                                                                                                  352 * 1. There is no space in the Send buffer (usually due to network congestion). Socket not
                                                                                                                                  +
                                                                                                                                  353 * Writable. 0 is returned; `*err_code` is set to success unless null; no data buffered.
                                                                                                                                  +
                                                                                                                                  354 * 2. The socket is not yet fully connected (`S_OPEN+S_CONNECTING` state). Socket not
                                                                                                                                  +
                                                                                                                                  355 * Writable. 0 is returned; `*err_code` is set to success unless null; no data buffered.
                                                                                                                                  +
                                                                                                                                  356 * 3. There is space in the Send buffer, and socket connection is open (`S_OPEN+S_CONNECTED`).
                                                                                                                                  +
                                                                                                                                  357 * Socket Writable. >= 1 is returned; `*err_code` is set to success; data buffered.
                                                                                                                                  +
                                                                                                                                  358 * 4. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  359 * specific error unless null; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  360 *
                                                                                                                                  +
                                                                                                                                  361 * The semantics of -3- (the success case) are as follows. N bytes will be copied into Send
                                                                                                                                  +
                                                                                                                                  362 * buffer from the start of the Const_buffer_sequence data. These N bytes may be spread across 1
                                                                                                                                  +
                                                                                                                                  363 * or more buffers in that sequence; the subdivision structure of the sequence of bytes into
                                                                                                                                  +
                                                                                                                                  364 * buffers has no effect on what will be buffered in Send buffer (e.g., "data" could be N+ 1-byte
                                                                                                                                  +
                                                                                                                                  365 * buffers, or one N+-byte buffer -- the result would be the same). N equals the smaller of: the
                                                                                                                                  +
                                                                                                                                  366 * available space in the Send buffer; and `buffer_size(data)`. We return N.
                                                                                                                                  +
                                                                                                                                  367 *
                                                                                                                                  +
                                                                                                                                  368 * ### Reliability and ordering guarantees: if the socket option rexmit-on is enabled ###
                                                                                                                                  +
                                                                                                                                  369 * Reliability and ordering are guaranteed, and there is no notion of message boundaries. There is no possibility
                                                                                                                                  +
                                                                                                                                  370 * of data duplication. In other words full stream-of-bytes functionality is provided, as in TCP.
                                                                                                                                  +
                                                                                                                                  371 *
                                                                                                                                  +
                                                                                                                                  372 * ### Reliability and ordering guarantees: if the socket option rexmit-on is NOT enabled ###
                                                                                                                                  +
                                                                                                                                  373 * NO reliability guarantees are given, UNLESS *ALL* calls to send() (and other `*send`() methods)
                                                                                                                                  +
                                                                                                                                  374 * satisfy the condition: '`buffer_size(data)` is a multiple of `sock->max_block_size()`'; AND all
                                                                                                                                  +
                                                                                                                                  375 * calls to receive() (and other `*receive()` methods) on the OTHER side satisfy the condition:
                                                                                                                                  +
                                                                                                                                  376 * '`buffer_size(target)` is a multiple of `sock->max_block_size()`.' If and only if these guidelines
                                                                                                                                  +
                                                                                                                                  377 * are followed, and there is no connection closure, the following reliability guarantee is made:
                                                                                                                                  +
                                                                                                                                  378 *
                                                                                                                                  +
                                                                                                                                  379 * Let a "block" be a contiguous chunk of bytes in a "data" buffer sequence immediately following
                                                                                                                                  +
                                                                                                                                  380 * another "block," except the first "block" in a connection, which begins with the first byte of
                                                                                                                                  +
                                                                                                                                  381 * the "data" buffer sequence passed to the first `*send()` call on that connection. Then: Each
                                                                                                                                  +
                                                                                                                                  382 * given block will either be available to `*receive()` on the other side exactly once and without
                                                                                                                                  +
                                                                                                                                  383 * corruption; or not available to `*receive()` at all. Blocks may arrive in a different order than
                                                                                                                                  +
                                                                                                                                  384 * specified here, including with respect to other `*send()` calls performed before or after this
                                                                                                                                  +
                                                                                                                                  385 * one. In other words, these are guaranteed: block boundary preservation, protection against
                                                                                                                                  +
                                                                                                                                  386 * corruption, protection again duplication. These are not guaranteed: order preservation,
                                                                                                                                  +
                                                                                                                                  387 * delivery. Informally, the latter factors are more likely to be present on higher quality
                                                                                                                                  +
                                                                                                                                  388 * network paths.
                                                                                                                                  +
                                                                                                                                  389 *
                                                                                                                                  +
                                                                                                                                  390 * @tparam Const_buffer_sequence
                                                                                                                                  +
                                                                                                                                  391 * Type that models the boost.asio `ConstBufferSequence` concept (see Boost docs).
                                                                                                                                  +
                                                                                                                                  392 * Basically, it's any container with elements convertible to `boost::asio::const_buffer`;
                                                                                                                                  +
                                                                                                                                  393 * and bidirectional iterator support. Examples: `vector<const_buffer>`, `list<const_buffer>`.
                                                                                                                                  +
                                                                                                                                  394 * Why allow `const_buffer` instead of, say, `Sequence` of bytes? Same reason as boost.asio's
                                                                                                                                  +
                                                                                                                                  395 * send functions: it allows a great amount of flexibility without sacrificing performance,
                                                                                                                                  +
                                                                                                                                  396 * since `boost::asio::buffer()` function can adapt lots of different objects (arrays,
                                                                                                                                  +
                                                                                                                                  397 * `vector`s, `string`s, and more -- composed of bytes, integers, and more).
                                                                                                                                  +
                                                                                                                                  398 * @param data
                                                                                                                                  +
                                                                                                                                  399 * Buffer sequence from which a stream of bytes to add to Send buffer will be obtained.
                                                                                                                                  +
                                                                                                                                  400 * @param err_code
                                                                                                                                  +
                                                                                                                                  401 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  402 * Error implies that neither this send() nor any subsequent `*send()` on this socket
                                                                                                                                  +
                                                                                                                                  403 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  404 * @return Number of bytes (possibly zero) added to buffer. Always 0 if `bool(*err_code) == true` when
                                                                                                                                  +
                                                                                                                                  405 * send() returns.
                                                                                                                                  +
                                                                                                                                  406 */
                                                                                                                                  +
                                                                                                                                  407 template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  408 size_t send(const Const_buffer_sequence& data, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  409
                                                                                                                                  +
                                                                                                                                  410 /**
                                                                                                                                  +
                                                                                                                                  411 * Blocking (synchronous) version of send(). Acts just like send(), except that if Socket is not
                                                                                                                                  +
                                                                                                                                  412 * immediately Writable (i.e., send() would return 0 and no error), waits until it is Writable
                                                                                                                                  +
                                                                                                                                  413 * (send() would return either >0, or 0 and an error) and returns `send(data, err_code)`. If a
                                                                                                                                  +
                                                                                                                                  414 * timeout is specified, and this timeout expires before socket is Writable, acts like send()
                                                                                                                                  +
                                                                                                                                  415 * executed on an un-Writable socket.
                                                                                                                                  +
                                                                                                                                  416 *
                                                                                                                                  +
                                                                                                                                  417 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  418 * These are the possible outcomes (assuming there are data in the argument `data`).
                                                                                                                                  +
                                                                                                                                  419 * 1. There is space in the Send buffer, and socket connection
                                                                                                                                  +
                                                                                                                                  420 * is open (`S_OPEN+S_CONNECTED`). Socket Writable. >= 1 is returned; `*err_code` is set to
                                                                                                                                  +
                                                                                                                                  421 * success unless null; data buffered.
                                                                                                                                  +
                                                                                                                                  422 * 2. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  423 * specific error unless null; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  424 * The code error::Code::S_WAIT_INTERRUPTED means the wait was interrupted
                                                                                                                                  +
                                                                                                                                  425 * (similarly to POSIX's `EINTR`).
                                                                                                                                  +
                                                                                                                                  426 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  +
                                                                                                                                  427 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  +
                                                                                                                                  428 *
                                                                                                                                  +
                                                                                                                                  429 * The semantics of -1- (the success case) equal those of send().
                                                                                                                                  +
                                                                                                                                  430 *
                                                                                                                                  +
                                                                                                                                  431 * Note that it is NOT possible to return 0 and no error.
                                                                                                                                  +
                                                                                                                                  432 *
                                                                                                                                  +
                                                                                                                                  433 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  +
                                                                                                                                  434 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  +
                                                                                                                                  435 *
                                                                                                                                  +
                                                                                                                                  436 * @see The version of sync_send() with no timeout.
                                                                                                                                  +
                                                                                                                                  437 * @tparam Rep
                                                                                                                                  +
                                                                                                                                  438 * See boost::chrono::duration documentation (and see above tip).
                                                                                                                                  +
                                                                                                                                  439 * @tparam Period
                                                                                                                                  +
                                                                                                                                  440 * See boost::chrono::duration documentation (and see above tip).
                                                                                                                                  +
                                                                                                                                  441 * @tparam Const_buffer_sequence
                                                                                                                                  +
                                                                                                                                  442 * See send().
                                                                                                                                  +
                                                                                                                                  443 * @param data
                                                                                                                                  +
                                                                                                                                  444 * See send().
                                                                                                                                  +
                                                                                                                                  445 * @param max_wait
                                                                                                                                  +
                                                                                                                                  446 * The maximum amount of time from now to wait before giving up on the wait and returning.
                                                                                                                                  +
                                                                                                                                  447 * `"duration<Rep, Period>::max()"` will eliminate the time limit and cause indefinite wait
                                                                                                                                  +
                                                                                                                                  448 * (i.e., no timeout).
                                                                                                                                  +
                                                                                                                                  449 * @param err_code
                                                                                                                                  +
                                                                                                                                  450 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  451 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  +
                                                                                                                                  452 * neither this send() nor any subsequent send() on this socket
                                                                                                                                  +
                                                                                                                                  453 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  454 * @return Number of bytes (possibly zero) added to Send buffer. Always 0 if `bool(*err_code) == true`
                                                                                                                                  +
                                                                                                                                  455 * when sync_send() returns.
                                                                                                                                  +
                                                                                                                                  456 */
                                                                                                                                  +
                                                                                                                                  457 template<typename Rep, typename Period, typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  458 size_t sync_send(const Const_buffer_sequence& data,
                                                                                                                                  +
                                                                                                                                  459 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  460
                                                                                                                                  +
                                                                                                                                  461 /**
                                                                                                                                  +
                                                                                                                                  462 * `sync_send()` operating in `null_buffers` mode, wherein -- if Writable state is reached -- the actual data
                                                                                                                                  +
                                                                                                                                  463 * are not moved out of any buffer, leaving that to the caller to do if desired. Hence, this is a way of waiting
                                                                                                                                  +
                                                                                                                                  464 * for Writable state that could be more concise in some situations than Event_set::sync_wait().
                                                                                                                                  +
                                                                                                                                  465 *
                                                                                                                                  +
                                                                                                                                  466 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  467 * These are the possible outcomes:
                                                                                                                                  +
                                                                                                                                  468 * 1. There is space in the Send buffer; and socket is fully connected
                                                                                                                                  +
                                                                                                                                  469 * (`S_OPEN+S_CONNECTED`). Socket
                                                                                                                                  +
                                                                                                                                  470 * Writable. `true` is returned; `*err_code` is set to success unless null.
                                                                                                                                  +
                                                                                                                                  471 * 2. The operation cannot proceed due to an error. `false` is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  472 * specific error unless null. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  +
                                                                                                                                  473 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  474 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  +
                                                                                                                                  475 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  +
                                                                                                                                  476 *
                                                                                                                                  +
                                                                                                                                  477 * Note that it is NOT possible to return `false` and no error.
                                                                                                                                  +
                                                                                                                                  478 *
                                                                                                                                  +
                                                                                                                                  479 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  +
                                                                                                                                  480 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  +
                                                                                                                                  481 *
                                                                                                                                  +
                                                                                                                                  482 * @tparam Rep
                                                                                                                                  +
                                                                                                                                  483 * See other sync_send().
                                                                                                                                  +
                                                                                                                                  484 * @tparam Period
                                                                                                                                  +
                                                                                                                                  485 * See other sync_send().
                                                                                                                                  +
                                                                                                                                  486 * @param max_wait
                                                                                                                                  +
                                                                                                                                  487 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  488 * @param err_code
                                                                                                                                  +
                                                                                                                                  489 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  490 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  +
                                                                                                                                  491 * neither this nor any subsequent send() on this socket
                                                                                                                                  +
                                                                                                                                  492 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  493 * @return `true` if 1+ bytes are possible to add to Send buffer; `false` if either a timeout has occurred (bytes
                                                                                                                                  +
                                                                                                                                  494 * not writable), or another error has occurred.
                                                                                                                                  +
                                                                                                                                  495 */
                                                                                                                                  +
                                                                                                                                  496 template<typename Rep, typename Period>
                                                                                                                                  +
                                                                                                                                  497 bool sync_send(const boost::asio::null_buffers&,
                                                                                                                                  +
                                                                                                                                  498 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  499
                                                                                                                                  +
                                                                                                                                  500 /**
                                                                                                                                  +
                                                                                                                                  501 * Equivalent to `sync_send(data, duration::max(), err_code)`; i.e., sync_send() with no timeout.
                                                                                                                                  +
                                                                                                                                  502 *
                                                                                                                                  +
                                                                                                                                  503 * @tparam Const_buffer_sequence
                                                                                                                                  +
                                                                                                                                  504 * See other sync_send().
                                                                                                                                  +
                                                                                                                                  505 * @param data
                                                                                                                                  +
                                                                                                                                  506 * See other sync_send().
                                                                                                                                  +
                                                                                                                                  507 * @param err_code
                                                                                                                                  +
                                                                                                                                  508 * See other sync_send().
                                                                                                                                  +
                                                                                                                                  509 * @return See other sync_send().
                                                                                                                                  +
                                                                                                                                  510 */
                                                                                                                                  +
                                                                                                                                  511 template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  512 size_t sync_send(const Const_buffer_sequence& data, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  513
                                                                                                                                  +
                                                                                                                                  514 /**
                                                                                                                                  +
                                                                                                                                  515 * Equivalent to `sync_send(null_buffers(), duration::max(), err_code)`; i.e., `sync_send(null_buffers)`
                                                                                                                                  +
                                                                                                                                  516 * with no timeout.
                                                                                                                                  +
                                                                                                                                  517 *
                                                                                                                                  +
                                                                                                                                  518 * @param err_code
                                                                                                                                  +
                                                                                                                                  519 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  520 * @param tag
                                                                                                                                  +
                                                                                                                                  521 * Tag argument.
                                                                                                                                  +
                                                                                                                                  522 * @return See other sync_receive().
                                                                                                                                  +
                                                                                                                                  523 */
                                                                                                                                  +
                                                                                                                                  524 bool sync_send(const boost::asio::null_buffers&, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  525
                                                                                                                                  +
                                                                                                                                  526 /**
                                                                                                                                  +
                                                                                                                                  527 * Receives (consumes from the Receive buffer) bytes of data, up to a given maximum
                                                                                                                                  +
                                                                                                                                  528 * cumulative number of bytes as inferred from size of provided target buffer sequence. The data
                                                                                                                                  +
                                                                                                                                  529 * are copied into the user's structure and then removed from the Receive buffer.
                                                                                                                                  +
                                                                                                                                  530 *
                                                                                                                                  +
                                                                                                                                  531 * The method does not block. In particular if there are no data already received from the other
                                                                                                                                  +
                                                                                                                                  532 * side, we return no data.
                                                                                                                                  +
                                                                                                                                  533 *
                                                                                                                                  +
                                                                                                                                  534 * If the provided buffer has size zero, the method is a NOOP other than possibly logging.
                                                                                                                                  +
                                                                                                                                  535 *
                                                                                                                                  +
                                                                                                                                  536 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  537 * These are the possible outcomes.
                                                                                                                                  +
                                                                                                                                  538 * 1. There are no data in the Receive buffer. Socket not Readable. 0 is returned;
                                                                                                                                  +
                                                                                                                                  539 * `*err_code` is set to success unless null; no data returned.
                                                                                                                                  +
                                                                                                                                  540 * 2. The socket is not yet fully connected (`S_OPEN+S_CONNECTING`). Socket not
                                                                                                                                  +
                                                                                                                                  541 * Readable. 0 is returned; `*err_code` is set to success unless null; no data returned.
                                                                                                                                  +
                                                                                                                                  542 * 3. There are data in the Receive buffer; and socket is fully connected (`S_OPEN+S_CONNECTED`)
                                                                                                                                  +
                                                                                                                                  543 * or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket Readable. >= 1 is returned;
                                                                                                                                  +
                                                                                                                                  544 * *err_code is set to success; data returned.
                                                                                                                                  +
                                                                                                                                  545 * 4. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  546 * specific error; no data buffered. (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  547 *
                                                                                                                                  +
                                                                                                                                  548 * The semantics of -3- (the success case) are as follows. N bytes will be copied from Receive
                                                                                                                                  +
                                                                                                                                  549 * buffer beginning at the start of the `Mutable_buffer_sequence target`. These N bytes may be
                                                                                                                                  +
                                                                                                                                  550 * spread across 1 or more buffers in that sequence; the subdivision structure of the sequence of
                                                                                                                                  +
                                                                                                                                  551 * bytes into buffers has no effect on the bytes, or order thereof, that will be moved from the
                                                                                                                                  +
                                                                                                                                  552 * Receive buffer (e.g., `target` could be N+ 1-byte buffers, or one N+-byte buffer
                                                                                                                                  +
                                                                                                                                  553 * -- the popped Receive buffer would be the same, as would be the extracted bytes). N equals the
                                                                                                                                  +
                                                                                                                                  554 * smaller of: the available bytes in the Receive buffer; and `buffer_size(target)`. We return N.
                                                                                                                                  +
                                                                                                                                  555 *
                                                                                                                                  +
                                                                                                                                  556 * ### Reliability and ordering guarantees ###
                                                                                                                                  +
                                                                                                                                  557 * See the send() doc header.
                                                                                                                                  +
                                                                                                                                  558 *
                                                                                                                                  +
                                                                                                                                  559 * @tparam Mutable_buffer_sequence
                                                                                                                                  +
                                                                                                                                  560 * Type that models the boost.asio `MutableBufferSequence` concept (see Boost docs).
                                                                                                                                  +
                                                                                                                                  561 * Basically, it's any container with elements convertible to `boost::asio::mutable_buffer`;
                                                                                                                                  +
                                                                                                                                  562 * and bidirectional iterator support. Examples: `vector<mutable_buffer>`,
                                                                                                                                  +
                                                                                                                                  563 * `list<mutable_buffer>`. Why allow `mutable_buffer` instead of, say, `Sequence` of bytes?
                                                                                                                                  +
                                                                                                                                  564 * Same reason as boost.asio's receive functions: it allows a great amount of flexibility
                                                                                                                                  +
                                                                                                                                  565 * without sacrificing performance, since `boost::asio::buffer()` function can adapt lots of
                                                                                                                                  +
                                                                                                                                  566 * different objects (arrays, `vector`s, `string`s, and more of bytes, integers, and more).
                                                                                                                                  +
                                                                                                                                  567 * @param target
                                                                                                                                  +
                                                                                                                                  568 * Buffer sequence to which a stream of bytes to consume from Receive buffer will be
                                                                                                                                  +
                                                                                                                                  569 * written.
                                                                                                                                  +
                                                                                                                                  570 * @param err_code
                                                                                                                                  +
                                                                                                                                  571 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  572 * Error implies that neither this receive() nor any subsequent receive() on this socket
                                                                                                                                  +
                                                                                                                                  573 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  574 * @return The number of bytes consumed (placed into `target`). Always 0 if `bool(*err_code) == true`
                                                                                                                                  +
                                                                                                                                  575 * when receive() returns.
                                                                                                                                  +
                                                                                                                                  576 */
                                                                                                                                  +
                                                                                                                                  577 template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  578 size_t receive(const Mutable_buffer_sequence& target, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  579
                                                                                                                                  +
                                                                                                                                  580 /**
                                                                                                                                  +
                                                                                                                                  581 * Blocking (synchronous) version of receive(). Acts just like receive(), except that if socket
                                                                                                                                  +
                                                                                                                                  582 * is not immediately Readable (i.e., receive() would return 0 and no error), waits until it is
                                                                                                                                  +
                                                                                                                                  583 * Readable (receive() would return either >0, or 0 and an error) and returns
                                                                                                                                  +
                                                                                                                                  584 * `receive(target, err_code)`. If a timeout is specified, and this timeout expires before socket is
                                                                                                                                  +
                                                                                                                                  585 * Readable, it acts as if receive() produced error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  +
                                                                                                                                  586 *
                                                                                                                                  +
                                                                                                                                  587 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  588 * These are the possible outcomes:
                                                                                                                                  +
                                                                                                                                  589 * 1. There are data in the Receive buffer; and socket is fully connected
                                                                                                                                  +
                                                                                                                                  590 * (`S_OPEN+S_CONNECTED`) or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket
                                                                                                                                  +
                                                                                                                                  591 * Readable. >= 1 is returned; `*err_code` is set to success unless null; data returned.
                                                                                                                                  +
                                                                                                                                  592 * 2. The operation cannot proceed due to an error. 0 is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  593 * specific error unless null; no data buffered. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  +
                                                                                                                                  594 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  595 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  +
                                                                                                                                  596 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  +
                                                                                                                                  597 *
                                                                                                                                  +
                                                                                                                                  598 * The semantics of -1- (the success case) equal those of receive().
                                                                                                                                  +
                                                                                                                                  599 *
                                                                                                                                  +
                                                                                                                                  600 * Note that it is NOT possible to return 0 and no error.
                                                                                                                                  +
                                                                                                                                  601 *
                                                                                                                                  +
                                                                                                                                  602 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  +
                                                                                                                                  603 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  +
                                                                                                                                  604 *
                                                                                                                                  +
                                                                                                                                  605 * @see The version of sync_receive() with no timeout.
                                                                                                                                  +
                                                                                                                                  606 * @tparam Rep
                                                                                                                                  +
                                                                                                                                  607 * See `boost::chrono::duration` documentation (and see above tip).
                                                                                                                                  +
                                                                                                                                  608 * @tparam Period
                                                                                                                                  +
                                                                                                                                  609 * See `boost::chrono::duration` documentation (and see above tip).
                                                                                                                                  +
                                                                                                                                  610 * @tparam Mutable_buffer_sequence
                                                                                                                                  +
                                                                                                                                  611 * See receive().
                                                                                                                                  +
                                                                                                                                  612 * @param target
                                                                                                                                  +
                                                                                                                                  613 * See receive().
                                                                                                                                  +
                                                                                                                                  614 * @param max_wait
                                                                                                                                  +
                                                                                                                                  615 * The maximum amount of time from now to wait before giving up on the wait and returning.
                                                                                                                                  +
                                                                                                                                  616 * `"duration<Rep, Period>::max()"` will eliminate the time limit and cause indefinite wait
                                                                                                                                  +
                                                                                                                                  617 * (i.e., no timeout).
                                                                                                                                  +
                                                                                                                                  618 * @param err_code
                                                                                                                                  +
                                                                                                                                  619 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  620 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  +
                                                                                                                                  621 * neither this receive() nor any subsequent receive() on this socket
                                                                                                                                  +
                                                                                                                                  622 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  623 * @return Number of bytes (possibly zero) added to target. Always 0 if `bool(*err_code) == true` when
                                                                                                                                  +
                                                                                                                                  624 * sync_receive() returns.
                                                                                                                                  +
                                                                                                                                  625 */
                                                                                                                                  +
                                                                                                                                  626 template<typename Rep, typename Period, typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  627 size_t sync_receive(const Mutable_buffer_sequence& target,
                                                                                                                                  +
                                                                                                                                  628 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  629
                                                                                                                                  +
                                                                                                                                  630 /**
                                                                                                                                  +
                                                                                                                                  631 * `sync_receive()` operating in `null_buffers` mode, wherein -- if Readable state is reached -- the actual data
                                                                                                                                  +
                                                                                                                                  632 * are not moved into any buffer, leaving that to the caller to do if desired. Hence, this is a way of waiting
                                                                                                                                  +
                                                                                                                                  633 * for Readable state that could be more concise in some situations than Event_set::sync_wait().
                                                                                                                                  +
                                                                                                                                  634 *
                                                                                                                                  +
                                                                                                                                  635 * ### Error handling ###
                                                                                                                                  +
                                                                                                                                  636 * These are the possible outcomes:
                                                                                                                                  +
                                                                                                                                  637 * 1. There are data in the Receive buffer; and socket is fully connected
                                                                                                                                  +
                                                                                                                                  638 * (`S_OPEN+S_CONNECTED`) or gracefully shutting down (`S_OPEN+S_DISCONNECTING`). Socket
                                                                                                                                  +
                                                                                                                                  639 * Readable. `true` is returned; `*err_code` is set to success unless null.
                                                                                                                                  +
                                                                                                                                  640 * 2. The operation cannot proceed due to an error. `false` is returned; `*err_code` is set to the
                                                                                                                                  +
                                                                                                                                  641 * specific error unless null. `*err_code == S_WAIT_INTERRUPTED` means the wait was
                                                                                                                                  +
                                                                                                                                  642 * interrupted (similarly to POSIX's `EINTR`). (If `err_code` null, Runtime_error thrown.)
                                                                                                                                  +
                                                                                                                                  643 * 3. Neither condition above is detected before the timeout expires (if provided).
                                                                                                                                  +
                                                                                                                                  644 * Output semantics are the same as in 2, with the specific code error::Code::S_WAIT_USER_TIMEOUT.
                                                                                                                                  +
                                                                                                                                  645 *
                                                                                                                                  +
                                                                                                                                  646 * Note that it is NOT possible to return `false` and no error.
                                                                                                                                  +
                                                                                                                                  647 *
                                                                                                                                  +
                                                                                                                                  648 * Tip: Typical types you might use for `max_wait`: `boost::chrono::milliseconds`,
                                                                                                                                  +
                                                                                                                                  649 * `boost::chrono::seconds`, `boost::chrono::high_resolution_clock::duration`.
                                                                                                                                  +
                                                                                                                                  650 *
                                                                                                                                  +
                                                                                                                                  651 * @tparam Rep
                                                                                                                                  +
                                                                                                                                  652 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  653 * @tparam Period
                                                                                                                                  +
                                                                                                                                  654 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  655 * @param max_wait
                                                                                                                                  +
                                                                                                                                  656 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  657 * @param err_code
                                                                                                                                  +
                                                                                                                                  658 * See flow::Error_code docs for error reporting semantics.
                                                                                                                                  +
                                                                                                                                  659 * Error, except `WAIT_INTERRUPTED` or `WAIT_USER_TIMEOUT`, implies that
                                                                                                                                  +
                                                                                                                                  660 * neither this nor any subsequent receive() on this socket
                                                                                                                                  +
                                                                                                                                  661 * will succeeed. (In particular a clean disconnect is an error.)
                                                                                                                                  +
                                                                                                                                  662 * @return `true` if there are 1+ bytes ready to read; `false` if either a timeout has occurred (no bytes ready), or
                                                                                                                                  +
                                                                                                                                  663 * another error has occurred.
                                                                                                                                  +
                                                                                                                                  664 */
                                                                                                                                  +
                                                                                                                                  665 template<typename Rep, typename Period>
                                                                                                                                  +
                                                                                                                                  666 bool sync_receive(const boost::asio::null_buffers&,
                                                                                                                                  +
                                                                                                                                  667 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  668
                                                                                                                                  +
                                                                                                                                  669 /**
                                                                                                                                  +
                                                                                                                                  670 * Equivalent to `sync_receive(target, duration::max(), err_code)`; i.e., sync_receive()
                                                                                                                                  +
                                                                                                                                  671 * with no timeout.
                                                                                                                                  +
                                                                                                                                  672 *
                                                                                                                                  +
                                                                                                                                  673 * @tparam Mutable_buffer_sequence
                                                                                                                                  +
                                                                                                                                  674 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  675 * @param target
                                                                                                                                  +
                                                                                                                                  676 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  677 * @param err_code
                                                                                                                                  +
                                                                                                                                  678 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  679 * @return See other sync_receive().
                                                                                                                                  +
                                                                                                                                  680 */
                                                                                                                                  +
                                                                                                                                  681 template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  682 size_t sync_receive(const Mutable_buffer_sequence& target, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  683
                                                                                                                                  +
                                                                                                                                  684 /**
                                                                                                                                  +
                                                                                                                                  685 * Equivalent to `sync_receive(null_buffers(), duration::max(), err_code)`; i.e., `sync_receive(null_buffers)`
                                                                                                                                  +
                                                                                                                                  686 * with no timeout.
                                                                                                                                  +
                                                                                                                                  687 *
                                                                                                                                  +
                                                                                                                                  688 * @param err_code
                                                                                                                                  +
                                                                                                                                  689 * See other sync_receive().
                                                                                                                                  +
                                                                                                                                  690 * @param tag
                                                                                                                                  +
                                                                                                                                  691 * Tag argument.
                                                                                                                                  +
                                                                                                                                  692 * @return See other sync_receive().
                                                                                                                                  +
                                                                                                                                  693 */
                                                                                                                                  +
                                                                                                                                  694 bool sync_receive(const boost::asio::null_buffers&, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  695
                                                                                                                                  +
                                                                                                                                  696 /**
                                                                                                                                  +
                                                                                                                                  697 * Acts as if fatal error error::Code::S_USER_CLOSED_ABRUPTLY has been discovered on the
                                                                                                                                  +
                                                                                                                                  698 * connection. Does not block.
                                                                                                                                  +
                                                                                                                                  699 *
                                                                                                                                  +
                                                                                                                                  700 * Post-condition: `state() == State::S_CLOSED`. Additionally, assuming no loss on the
                                                                                                                                  +
                                                                                                                                  701 * network, the other side will close the connection with error
                                                                                                                                  +
                                                                                                                                  702 * error::Code::S_CONN_RESET_BY_OTHER_SIDE.
                                                                                                                                  +
                                                                                                                                  703 *
                                                                                                                                  +
                                                                                                                                  704 * Note: Discovering a fatal error on the connection would trigger all event waits on this socket
                                                                                                                                  +
                                                                                                                                  705 * (sync_send(), sync_receive(), Event_set::sync_wait(), Event_set::async_wait()) to execute on-event
                                                                                                                                  +
                                                                                                                                  706 * behavior (return, return, return, invoke handler, respectively). Therefore this method will cause
                                                                                                                                  +
                                                                                                                                  707 * just that, if applicable.
                                                                                                                                  +
                                                                                                                                  708 *
                                                                                                                                  +
                                                                                                                                  709 * Note: As a corollary, a socket closing this way (or any other way) does NOT cause that socket's
                                                                                                                                  +
                                                                                                                                  710 * events (if any) to be removed from any Event_set objects. Clearing an Event_set of all or some
                                                                                                                                  +
                                                                                                                                  711 * sockets is the Event_set user's responsibility (the classic way being Event_set::close()).
                                                                                                                                  +
                                                                                                                                  712 *
                                                                                                                                  +
                                                                                                                                  713 * @warning The moment the other side is informed we have abruptly closed the connection, they
                                                                                                                                  +
                                                                                                                                  714 * will no longer be able to receive() any of it (even if data had been queued up in
                                                                                                                                  +
                                                                                                                                  715 * their Receive buffer).
                                                                                                                                  +
                                                                                                                                  716 *
                                                                                                                                  +
                                                                                                                                  717 * @todo Currently this close_abruptly() is the only way for the user to explicitly close one specified socket.
                                                                                                                                  +
                                                                                                                                  718 * All other ways are due to error (or other side starting graceful shutdown, once we
                                                                                                                                  +
                                                                                                                                  719 * implement that). Once we implement graceful close, via `close_start()` and `close_final()`,
                                                                                                                                  +
                                                                                                                                  720 * use of close_abruptly() should be discouraged, or it may even be deprecated (e.g.,
                                                                                                                                  +
                                                                                                                                  721 * `Node`s lack a way to initiate an abrupt close for a specific socket).
                                                                                                                                  +
                                                                                                                                  722 *
                                                                                                                                  +
                                                                                                                                  723 * @todo close_abruptly() return `bool` (`false` on failure)?
                                                                                                                                  +
                                                                                                                                  724 *
                                                                                                                                  +
                                                                                                                                  725 * @param err_code
                                                                                                                                  +
                                                                                                                                  726 * See flow::Error_code docs for error reporting semantics. Generated codes:
                                                                                                                                  +
                                                                                                                                  727 * error::Code::S_NODE_NOT_RUNNING, or -- if socket already closed (`state() == State::S_CLOSED`) --
                                                                                                                                  +
                                                                                                                                  728 * then the error that caused the closure.
                                                                                                                                  +
                                                                                                                                  729 */
                                                                                                                                  +
                                                                                                                                  730 void close_abruptly(Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  731
                                                                                                                                  +
                                                                                                                                  732 /**
                                                                                                                                  +
                                                                                                                                  733 * Dynamically replaces the current options set (options()) with the given options set.
                                                                                                                                  +
                                                                                                                                  734 * Only those members of `opts` designated as dynamic (as opposed to static) may be different
                                                                                                                                  +
                                                                                                                                  735 * between options() and `opts`. If this is violated, it is an error, and no options are changed.
                                                                                                                                  +
                                                                                                                                  736 *
                                                                                                                                  +
                                                                                                                                  737 * Typically one would acquire a copy of the existing options set via options(), modify the
                                                                                                                                  +
                                                                                                                                  738 * desired dynamic data members of that copy, and then apply that copy back by calling
                                                                                                                                  +
                                                                                                                                  739 * set_options().
                                                                                                                                  +
                                                                                                                                  740 *
                                                                                                                                  +
                                                                                                                                  741 * @param opts
                                                                                                                                  +
                                                                                                                                  742 * The new options to apply to this socket. It is copied; no reference is saved.
                                                                                                                                  +
                                                                                                                                  743 * @param err_code
                                                                                                                                  +
                                                                                                                                  744 * See flow::Error_code docs for error reporting semantics. Generated codes:
                                                                                                                                  +
                                                                                                                                  745 * error::Code::S_STATIC_OPTION_CHANGED, error::Code::S_OPTION_CHECK_FAILED,
                                                                                                                                  +
                                                                                                                                  746 * error::Code::S_NODE_NOT_RUNNING.
                                                                                                                                  +
                                                                                                                                  747 * @return `true` on success, `false` on error.
                                                                                                                                  +
                                                                                                                                  748 */
                                                                                                                                  +
                                                                                                                                  749 bool set_options(const Peer_socket_options& opts, Error_code* err_code = 0);
                                                                                                                                  +
                                                                                                                                  750
                                                                                                                                  +
                                                                                                                                  751 /**
                                                                                                                                  +
                                                                                                                                  752 * Copies this socket's option set and returns that copy. If you intend to use set_options() to
                                                                                                                                  +
                                                                                                                                  753 * modify a socket's options, we recommend you make the modifications on the copy returned by
                                                                                                                                  +
                                                                                                                                  754 * options().
                                                                                                                                  +
                                                                                                                                  755 *
                                                                                                                                  +
                                                                                                                                  756 * @todo Provide a similar options() method that loads an existing structure (for structure
                                                                                                                                  +
                                                                                                                                  757 * reuse).
                                                                                                                                  +
                                                                                                                                  758 *
                                                                                                                                  +
                                                                                                                                  759 * @return See above.
                                                                                                                                  +
                                                                                                                                  760 */
                                                                                                                                  + +
                                                                                                                                  762
                                                                                                                                  +
                                                                                                                                  763 /**
                                                                                                                                  +
                                                                                                                                  764 * Returns a structure containing the most up-to-date stats about this connection.
                                                                                                                                  +
                                                                                                                                  765 *
                                                                                                                                  +
                                                                                                                                  766 * @note At the cost of reducing locking overhead in 99.999999% of the Peer_socket's operation,
                                                                                                                                  +
                                                                                                                                  767 * this method may take a bit of time to run. It's still probably only 10 times or so slower than
                                                                                                                                  +
                                                                                                                                  768 * a simple lock, work, unlock -- there is a condition variable and stuff involved -- but this may
                                                                                                                                  +
                                                                                                                                  769 * matter if done very frequently. So you probably should not. (Hmmm... where did I get these estimates,
                                                                                                                                  +
                                                                                                                                  770 * namely "10 times or so"?)
                                                                                                                                  +
                                                                                                                                  771 *
                                                                                                                                  +
                                                                                                                                  772 * @todo Provide a similar info() method that loads an existing structure (for structure
                                                                                                                                  +
                                                                                                                                  773 * reuse).
                                                                                                                                  +
                                                                                                                                  774 *
                                                                                                                                  +
                                                                                                                                  775 * @return See above.
                                                                                                                                  +
                                                                                                                                  776 */
                                                                                                                                  +
                                                                                                                                  777 Peer_socket_info info() const;
                                                                                                                                  +
                                                                                                                                  778
                                                                                                                                  +
                                                                                                                                  779 /**
                                                                                                                                  +
                                                                                                                                  780 * The maximum number of bytes of user data per received or sent packet on this connection. See
                                                                                                                                  +
                                                                                                                                  781 * Peer_socket_options::m_st_max_block_size. Note that this method is ESSENTIAL when using the
                                                                                                                                  +
                                                                                                                                  782 * socket in unreliable mode (assuming you want to implement reliability outside of `net_flow`).
                                                                                                                                  +
                                                                                                                                  783 *
                                                                                                                                  +
                                                                                                                                  784 * @return Ditto.
                                                                                                                                  +
                                                                                                                                  785 */
                                                                                                                                  +
                                                                                                                                  786 size_t max_block_size() const;
                                                                                                                                  +
                                                                                                                                  787
                                                                                                                                  +
                                                                                                                                  788 /**
                                                                                                                                  +
                                                                                                                                  789 * The error code that perviously caused state() to become State::S_CLOSED, or success code if state
                                                                                                                                  +
                                                                                                                                  790 * is not CLOSED. For example, error::code::S_CONN_RESET_BY_OTHER_SIDE (if was connected) or
                                                                                                                                  +
                                                                                                                                  791 * error::Code::S_CONN_TIMEOUT (if was connecting)
                                                                                                                                  +
                                                                                                                                  792 *
                                                                                                                                  +
                                                                                                                                  793 * @return Ditto.
                                                                                                                                  +
                                                                                                                                  794 */
                                                                                                                                  + +
                                                                                                                                  796
                                                                                                                                  +
                                                                                                                                  797protected:
                                                                                                                                  +
                                                                                                                                  798 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  799
                                                                                                                                  +
                                                                                                                                  800 /**
                                                                                                                                  +
                                                                                                                                  801 * Constructs object; initializes most values to well-defined (0, empty, etc.) but not necessarily
                                                                                                                                  +
                                                                                                                                  802 * meaningful values.
                                                                                                                                  +
                                                                                                                                  803 *
                                                                                                                                  +
                                                                                                                                  804 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  805 * The Logger implementation to use subsequently.
                                                                                                                                  +
                                                                                                                                  806 * @param task_engine
                                                                                                                                  +
                                                                                                                                  807 * IO service for the timer(s) stored as data member(s).
                                                                                                                                  +
                                                                                                                                  808 * @param opts
                                                                                                                                  +
                                                                                                                                  809 * The options set to copy into this Peer_socket and use subsequently.
                                                                                                                                  +
                                                                                                                                  810 */
                                                                                                                                  +
                                                                                                                                  811 explicit Peer_socket(log::Logger* logger_ptr,
                                                                                                                                  +
                                                                                                                                  812 util::Task_engine* task_engine,
                                                                                                                                  +
                                                                                                                                  813 const Peer_socket_options& opts);
                                                                                                                                  +
                                                                                                                                  814
                                                                                                                                  +
                                                                                                                                  815private:
                                                                                                                                  +
                                                                                                                                  816 // Friends.
                                                                                                                                  +
                                                                                                                                  817
                                                                                                                                  +
                                                                                                                                  818 /**
                                                                                                                                  +
                                                                                                                                  819 * See rationale for `friend`ing Node in class Peer_socket documentation header.
                                                                                                                                  +
                                                                                                                                  820 * @see Node.
                                                                                                                                  +
                                                                                                                                  821 */
                                                                                                                                  +
                                                                                                                                  822 friend class Node;
                                                                                                                                  +
                                                                                                                                  823 /**
                                                                                                                                  +
                                                                                                                                  824 * See rationale for `friend`ing Server_socket in class Peer_socket documentation header.
                                                                                                                                  +
                                                                                                                                  825 * @see Server_socket.
                                                                                                                                  +
                                                                                                                                  826 */
                                                                                                                                  +
                                                                                                                                  827 friend class Server_socket;
                                                                                                                                  +
                                                                                                                                  828 /**
                                                                                                                                  +
                                                                                                                                  829 * For access to `Sent_pkt_by_sent_when_map` and Sent_packet types, at least.
                                                                                                                                  +
                                                                                                                                  830 * (Drop_timer has no actual Peer_socket instance to mess with.)
                                                                                                                                  +
                                                                                                                                  831 */
                                                                                                                                  +
                                                                                                                                  832 friend class Drop_timer;
                                                                                                                                  +
                                                                                                                                  833 /**
                                                                                                                                  +
                                                                                                                                  834 * Stats modules have const access to all socket internals.
                                                                                                                                  +
                                                                                                                                  835 * @see Send_bandwidth_estimator.
                                                                                                                                  +
                                                                                                                                  836 */
                                                                                                                                  + +
                                                                                                                                  838 /**
                                                                                                                                  +
                                                                                                                                  839 * Congestion control modules have const access to all socket internals.
                                                                                                                                  +
                                                                                                                                  840 * @see Congestion_control_classic_data.
                                                                                                                                  +
                                                                                                                                  841 */
                                                                                                                                  + +
                                                                                                                                  843 /**
                                                                                                                                  +
                                                                                                                                  844 * Congestion control modules have const access to all socket internals.
                                                                                                                                  +
                                                                                                                                  845 * @see Congestion_control_classic.
                                                                                                                                  +
                                                                                                                                  846 */
                                                                                                                                  + +
                                                                                                                                  848 /**
                                                                                                                                  +
                                                                                                                                  849 * Congestion control modules have const access to all socket internals.
                                                                                                                                  +
                                                                                                                                  850 * @see Congestion_control_classic_with_bandwidth_est.
                                                                                                                                  +
                                                                                                                                  851 */
                                                                                                                                  + +
                                                                                                                                  853
                                                                                                                                  +
                                                                                                                                  854 // Types.
                                                                                                                                  +
                                                                                                                                  855
                                                                                                                                  +
                                                                                                                                  856 /// Short-hand for `shared_ptr` to immutable Drop_timer (can't use Drop_timer::Ptr due to C++ and circular reference).
                                                                                                                                  +
                                                                                                                                  857 using Drop_timer_ptr = boost::shared_ptr<Drop_timer>;
                                                                                                                                  +
                                                                                                                                  858
                                                                                                                                  +
                                                                                                                                  859 /**
                                                                                                                                  +
                                                                                                                                  860 * Short-hand for high-performance, non-reentrant, exclusive mutex used to lock #m_opts.
                                                                                                                                  +
                                                                                                                                  861 *
                                                                                                                                  +
                                                                                                                                  862 * ### Rationale ###
                                                                                                                                  +
                                                                                                                                  863 * You might notice this seems tailor-made for shared/exclusive (a/k/a multiple-readers-single-writer) mutex.
                                                                                                                                  +
                                                                                                                                  864 * Why a 2-level mutex instead of a normal exclusive mutex? Because options can be accessed by
                                                                                                                                  +
                                                                                                                                  865 * thread W and various user threads, in the vast majority of the time to read option values. On
                                                                                                                                  +
                                                                                                                                  866 * the other hand, rarely, #m_opts may be modified via set_options(). To avoid thread contention
                                                                                                                                  +
                                                                                                                                  867 * when no one is writing (which is usual), we could use that 2-level type of mutex and apply the appropriate
                                                                                                                                  +
                                                                                                                                  868 * (shared or unique) lock depending on the situation. So why not? Answer:
                                                                                                                                  +
                                                                                                                                  869 * While a shared/exclusive mutex sounds lovely in theory -- and perhaps
                                                                                                                                  +
                                                                                                                                  870 * if its implementation were closer to the hardware it would be lovely indeed -- in practice it seems its
                                                                                                                                  +
                                                                                                                                  871 * implementation just causes performance problems rather than solving them. Apparently that's why
                                                                                                                                  +
                                                                                                                                  872 * it was rejected by C++11 standards people w/r/t inclusion in that standard. The people involved
                                                                                                                                  +
                                                                                                                                  873 * explained their decision here: http://permalink.gmane.org/gmane.comp.lib.boost.devel/211180.
                                                                                                                                  +
                                                                                                                                  874 * So until that is improved, just do this. I'm not even adding a to-do for fixing this, as that seems
                                                                                                                                  +
                                                                                                                                  875 * unlikely anytime soon. Update: C++17 added `std::shared_mutex`, and C++14 added a similar thing named
                                                                                                                                  +
                                                                                                                                  876 * something else. Seems like a good time to revisit this -- if not to materially improve #Options_mutex
                                                                                                                                  +
                                                                                                                                  877 * performance then to gain up-to-date knowledge on the topic, specifically whether `shared_mutex` is fast now.
                                                                                                                                  +
                                                                                                                                  878 * Update: Apparently as of Boost-1.80 the Boost.thread impl of `shared_mutex` is lacking in perf, and there
                                                                                                                                  +
                                                                                                                                  879 * is a ticket filed for many years for this. Perhaps gcc `std::shared_mutex` is fine. However research
                                                                                                                                  +
                                                                                                                                  880 * suggests it's less about this nitty-gritty of various impls and more the following bottom line:
                                                                                                                                  +
                                                                                                                                  881 * A simple mutex is *very* fast to lock/unlock, and perf problems occur only if one must wait for a lock.
                                                                                                                                  +
                                                                                                                                  882 * Experts say that it is possible but quite rare that there is enough lock contention to make it "worth it":
                                                                                                                                  +
                                                                                                                                  883 * a shared mutex is *much* slower to lock/unlock sans contention. Only when the read critical sections are
                                                                                                                                  +
                                                                                                                                  884 * long and very frequently accessed does it become "worth it."
                                                                                                                                  +
                                                                                                                                  885 */
                                                                                                                                  + +
                                                                                                                                  887
                                                                                                                                  +
                                                                                                                                  888 /// Short-hand for lock that acquires exclusive access to an #Options_mutex.
                                                                                                                                  + +
                                                                                                                                  890
                                                                                                                                  +
                                                                                                                                  891 /**
                                                                                                                                  +
                                                                                                                                  892 * Short-hand for reentrant mutex type. We explicitly rely on reentrant behavior, so this isn't "just in case."
                                                                                                                                  +
                                                                                                                                  893 *
                                                                                                                                  +
                                                                                                                                  894 * @todo This doc header for Peer_socket::Mutex should specify what specific behavior requires mutex reentrance, so
                                                                                                                                  +
                                                                                                                                  895 * that for example one could reevaluate whether there's a sleeker code pattern that would avoid it.
                                                                                                                                  +
                                                                                                                                  896 */
                                                                                                                                  + +
                                                                                                                                  898
                                                                                                                                  +
                                                                                                                                  899 /// Short-hand for RAII lock guard of #Mutex.
                                                                                                                                  + +
                                                                                                                                  901
                                                                                                                                  +
                                                                                                                                  902 /// Type used for #m_security_token.
                                                                                                                                  +
                                                                                                                                  903 using security_token_t = uint64_t;
                                                                                                                                  +
                                                                                                                                  904
                                                                                                                                  +
                                                                                                                                  905 /// Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  + +
                                                                                                                                  907
                                                                                                                                  +
                                                                                                                                  908 /**
                                                                                                                                  +
                                                                                                                                  909 * The state of the socket (and the connection from this end's point of view) for the internal state
                                                                                                                                  +
                                                                                                                                  910 * machine governing the operation of the socket.
                                                                                                                                  +
                                                                                                                                  911 *
                                                                                                                                  +
                                                                                                                                  912 * @todo Peer_socket::Int_state will also include various states on way to a graceful close, once we implement that.
                                                                                                                                  +
                                                                                                                                  913 */
                                                                                                                                  +
                                                                                                                                  914 enum class Int_state
                                                                                                                                  +
                                                                                                                                  915 {
                                                                                                                                  +
                                                                                                                                  916 /// Closed (dead or new) socket.
                                                                                                                                  +
                                                                                                                                  917 S_CLOSED,
                                                                                                                                  +
                                                                                                                                  918
                                                                                                                                  +
                                                                                                                                  919 /**
                                                                                                                                  +
                                                                                                                                  920 * Public state is OPEN+CONNECTING; user requested active connect; we sent SYN and are
                                                                                                                                  +
                                                                                                                                  921 * awaiting response.
                                                                                                                                  +
                                                                                                                                  922 */
                                                                                                                                  +
                                                                                                                                  923 S_SYN_SENT,
                                                                                                                                  +
                                                                                                                                  924
                                                                                                                                  +
                                                                                                                                  925 /**
                                                                                                                                  +
                                                                                                                                  926 * Public state is OPEN+CONNECTING; other side requested passive connect via SYN; we sent
                                                                                                                                  +
                                                                                                                                  927 * SYN_ACK and are awaiting response.
                                                                                                                                  +
                                                                                                                                  928 */
                                                                                                                                  +
                                                                                                                                  929 S_SYN_RCVD,
                                                                                                                                  +
                                                                                                                                  930
                                                                                                                                  +
                                                                                                                                  931 /// Public state is OPEN+CONNECTED; in our opinion the connection is established.
                                                                                                                                  +
                                                                                                                                  932 S_ESTABLISHED
                                                                                                                                  +
                                                                                                                                  933 }; // enum class Int_state
                                                                                                                                  +
                                                                                                                                  934
                                                                                                                                  +
                                                                                                                                  935 // Friend of Peer_socket: For access to private alias Int_state.
                                                                                                                                  +
                                                                                                                                  936 friend std::ostream& operator<<(std::ostream& os, Int_state state);
                                                                                                                                  +
                                                                                                                                  937
                                                                                                                                  +
                                                                                                                                  938 struct Sent_packet;
                                                                                                                                  +
                                                                                                                                  939
                                                                                                                                  +
                                                                                                                                  940 /// Short-hand for #m_snd_flying_pkts_by_sent_when type; see that data member.
                                                                                                                                  + +
                                                                                                                                  942
                                                                                                                                  +
                                                                                                                                  943 /// Short-hand for #m_snd_flying_pkts_by_sent_when `const` iterator type.
                                                                                                                                  + +
                                                                                                                                  945
                                                                                                                                  +
                                                                                                                                  946 /// Short-hand for #m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  + +
                                                                                                                                  948
                                                                                                                                  +
                                                                                                                                  949 /// Short-hand for #m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  +
                                                                                                                                  950 using Sent_pkt_by_seq_num_map = std::map<Sequence_number, Sent_pkt_ordered_by_when_iter>;
                                                                                                                                  +
                                                                                                                                  951
                                                                                                                                  +
                                                                                                                                  952 /// Short-hand for #m_snd_flying_pkts_by_seq_num `const` iterator type.
                                                                                                                                  +
                                                                                                                                  953 using Sent_pkt_ordered_by_seq_const_iter = Sent_pkt_by_seq_num_map::const_iterator;
                                                                                                                                  +
                                                                                                                                  954
                                                                                                                                  +
                                                                                                                                  955 /// Short-hand for #m_snd_flying_pkts_by_seq_num iterator type.
                                                                                                                                  +
                                                                                                                                  956 using Sent_pkt_ordered_by_seq_iter = Sent_pkt_by_seq_num_map::iterator;
                                                                                                                                  +
                                                                                                                                  957
                                                                                                                                  +
                                                                                                                                  958 struct Received_packet;
                                                                                                                                  +
                                                                                                                                  959
                                                                                                                                  +
                                                                                                                                  960 /**
                                                                                                                                  +
                                                                                                                                  961 * Short-hand for #m_rcv_packets_with_gaps type; see that data member. `struct`s are stored via
                                                                                                                                  +
                                                                                                                                  962 * shared pointers instead of as direct objects to minimize copying of potentially heavy-weight
                                                                                                                                  +
                                                                                                                                  963 * data. They are stored as shared pointers instead of as raw pointers to avoid having to
                                                                                                                                  +
                                                                                                                                  964 * worry about `delete`.
                                                                                                                                  +
                                                                                                                                  965 */
                                                                                                                                  +
                                                                                                                                  966 using Recvd_pkt_map = std::map<Sequence_number, boost::shared_ptr<Received_packet>>;
                                                                                                                                  +
                                                                                                                                  967
                                                                                                                                  +
                                                                                                                                  968 /// Short-hand for #m_rcv_packets_with_gaps `const` iterator type.
                                                                                                                                  +
                                                                                                                                  969 using Recvd_pkt_const_iter = Recvd_pkt_map::const_iterator;
                                                                                                                                  +
                                                                                                                                  970
                                                                                                                                  +
                                                                                                                                  971 /// Short-hand for #m_rcv_packets_with_gaps iterator type.
                                                                                                                                  +
                                                                                                                                  972 using Recvd_pkt_iter = Recvd_pkt_map::iterator;
                                                                                                                                  +
                                                                                                                                  973
                                                                                                                                  +
                                                                                                                                  974 struct Individual_ack;
                                                                                                                                  +
                                                                                                                                  975
                                                                                                                                  +
                                                                                                                                  976 /**
                                                                                                                                  +
                                                                                                                                  977 * Type used for #m_rcv_syn_rcvd_data_q. Using `vector` because we only need `push_back()` and
                                                                                                                                  +
                                                                                                                                  978 * iteration at the moment. Using pointer to non-`const` instead of `const` because when we actually handle the
                                                                                                                                  +
                                                                                                                                  979 * packet as received we will need to be able to modify the packet for performance (see
                                                                                                                                  +
                                                                                                                                  980 * Node::handle_data_to_established(), when it transfers data to Receive buffer).
                                                                                                                                  +
                                                                                                                                  981 */
                                                                                                                                  +
                                                                                                                                  982 using Rcv_syn_rcvd_data_q = std::vector<boost::shared_ptr<Data_packet>>;
                                                                                                                                  +
                                                                                                                                  983
                                                                                                                                  +
                                                                                                                                  984 /* Methods: as few as possible. Logic should reside in class Node as discussed (though
                                                                                                                                  +
                                                                                                                                  985 * implementation may be in peer_socket.cpp). See rationale in class Peer_socket
                                                                                                                                  +
                                                                                                                                  986 * documentation header. */
                                                                                                                                  +
                                                                                                                                  987
                                                                                                                                  +
                                                                                                                                  988 /**
                                                                                                                                  +
                                                                                                                                  989 * Non-template helper for template send() that forwards the send() logic to Node::send(). Would
                                                                                                                                  +
                                                                                                                                  990 * be pointless to try to explain more here; see code and how it's used. Anyway, this has to be
                                                                                                                                  +
                                                                                                                                  991 * in this class.
                                                                                                                                  +
                                                                                                                                  992 *
                                                                                                                                  +
                                                                                                                                  993 * @param snd_buf_feed_func
                                                                                                                                  +
                                                                                                                                  994 * Function that will perform and return `m_snd_buf->feed(...)`. See send().
                                                                                                                                  +
                                                                                                                                  995 * @param err_code
                                                                                                                                  +
                                                                                                                                  996 * See send().
                                                                                                                                  +
                                                                                                                                  997 * @return Value to be returned by calling Node::send().
                                                                                                                                  +
                                                                                                                                  998 */
                                                                                                                                  +
                                                                                                                                  999 size_t node_send(const Function<size_t (size_t max_data_size)>& snd_buf_feed_func,
                                                                                                                                  +
                                                                                                                                  1000 Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1001
                                                                                                                                  +
                                                                                                                                  1002 /**
                                                                                                                                  +
                                                                                                                                  1003 * Same as sync_send() but uses a #Fine_clock-based #Fine_duration non-template type for
                                                                                                                                  +
                                                                                                                                  1004 * implementation convenience and to avoid code bloat to specify timeout.
                                                                                                                                  +
                                                                                                                                  1005 *
                                                                                                                                  +
                                                                                                                                  1006 * @tparam Const_buffer_sequence
                                                                                                                                  +
                                                                                                                                  1007 * See sync_send().
                                                                                                                                  +
                                                                                                                                  1008 * @param data
                                                                                                                                  +
                                                                                                                                  1009 * See sync_send().
                                                                                                                                  +
                                                                                                                                  1010 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1011 * See `sync_send(timeout)`. This is the absolute time point corresponding to that.
                                                                                                                                  +
                                                                                                                                  1012 * `"duration<Rep, Period>::max()"` maps to the value `Fine_time_pt()` (Epoch) for this argument.
                                                                                                                                  +
                                                                                                                                  1013 * @param err_code
                                                                                                                                  +
                                                                                                                                  1014 * See sync_send().
                                                                                                                                  +
                                                                                                                                  1015 * @return See sync_send().
                                                                                                                                  +
                                                                                                                                  1016 */
                                                                                                                                  +
                                                                                                                                  1017 template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  1018 size_t sync_send_impl(const Const_buffer_sequence& data, const Fine_time_pt& wait_until,
                                                                                                                                  +
                                                                                                                                  1019 Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1020
                                                                                                                                  +
                                                                                                                                  1021 /**
                                                                                                                                  +
                                                                                                                                  1022 * Helper similar to sync_send_impl() but for the `null_buffers` versions of `sync_send()`.
                                                                                                                                  +
                                                                                                                                  1023 *
                                                                                                                                  +
                                                                                                                                  1024 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1025 * See sync_send_impl().
                                                                                                                                  +
                                                                                                                                  1026 * @param err_code
                                                                                                                                  +
                                                                                                                                  1027 * See sync_send_impl().
                                                                                                                                  +
                                                                                                                                  1028 * @return See `sync_send(null_buffers)`. `true` if and only if Writable status successfuly reached in time.
                                                                                                                                  +
                                                                                                                                  1029 */
                                                                                                                                  +
                                                                                                                                  1030 bool sync_send_reactor_pattern_impl(const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1031
                                                                                                                                  +
                                                                                                                                  1032 /**
                                                                                                                                  +
                                                                                                                                  1033 * This is to sync_send() as node_send() is to send().
                                                                                                                                  +
                                                                                                                                  1034 *
                                                                                                                                  +
                                                                                                                                  1035 * @param snd_buf_feed_func_or_empty
                                                                                                                                  +
                                                                                                                                  1036 * See node_send(). Additionally, if this is `.empty()` then `null_buffers` a/k/a "reactor pattern" mode is
                                                                                                                                  +
                                                                                                                                  1037 * engaged.
                                                                                                                                  +
                                                                                                                                  1038 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1039 * See sync_send_impl().
                                                                                                                                  +
                                                                                                                                  1040 * @param err_code
                                                                                                                                  +
                                                                                                                                  1041 * See sync_send().
                                                                                                                                  +
                                                                                                                                  1042 * @return See sync_send().
                                                                                                                                  +
                                                                                                                                  1043 */
                                                                                                                                  +
                                                                                                                                  1044 size_t node_sync_send(const Function<size_t (size_t max_data_size)>& snd_buf_feed_func_or_empty,
                                                                                                                                  +
                                                                                                                                  1045 const Fine_time_pt& wait_until,
                                                                                                                                  +
                                                                                                                                  1046 Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1047
                                                                                                                                  +
                                                                                                                                  1048 /**
                                                                                                                                  +
                                                                                                                                  1049 * Non-template helper for template receive() that forwards the receive() logic to
                                                                                                                                  +
                                                                                                                                  1050 * Node::receive(). Would be pointless to try to explain more here; see code and how it's used.
                                                                                                                                  +
                                                                                                                                  1051 * Anyway, this has to be in this class.
                                                                                                                                  +
                                                                                                                                  1052 *
                                                                                                                                  +
                                                                                                                                  1053 * @param rcv_buf_consume_func
                                                                                                                                  +
                                                                                                                                  1054 * Function that will perform and return `m_rcv_buf->consume(...)`. See receive().
                                                                                                                                  +
                                                                                                                                  1055 * @param err_code
                                                                                                                                  +
                                                                                                                                  1056 * See receive().
                                                                                                                                  +
                                                                                                                                  1057 * @return Value to be returned by calling Node::receive().
                                                                                                                                  +
                                                                                                                                  1058 */
                                                                                                                                  +
                                                                                                                                  1059 size_t node_receive(const Function<size_t ()>& rcv_buf_consume_func,
                                                                                                                                  +
                                                                                                                                  1060 Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1061
                                                                                                                                  +
                                                                                                                                  1062 /**
                                                                                                                                  +
                                                                                                                                  1063 * Same as sync_receive() but uses a #Fine_clock-based #Fine_duration non-template type
                                                                                                                                  +
                                                                                                                                  1064 * for implementation convenience and to avoid code bloat to specify timeout.
                                                                                                                                  +
                                                                                                                                  1065 *
                                                                                                                                  +
                                                                                                                                  1066 * @tparam Block_sequence
                                                                                                                                  +
                                                                                                                                  1067 * See sync_receive().
                                                                                                                                  +
                                                                                                                                  1068 * @param target
                                                                                                                                  +
                                                                                                                                  1069 * See sync_receive().
                                                                                                                                  +
                                                                                                                                  1070 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1071 * See `sync_receive(timeout)`. This is the absolute time point corresponding to that.
                                                                                                                                  +
                                                                                                                                  1072 * `"duration<Rep, Period>::max()"` maps to the value `Fine_time_pt()` (Epoch) for this argument.
                                                                                                                                  +
                                                                                                                                  1073 * @param err_code
                                                                                                                                  +
                                                                                                                                  1074 * See sync_receive().
                                                                                                                                  +
                                                                                                                                  1075 * @return See sync_receive().
                                                                                                                                  +
                                                                                                                                  1076 */
                                                                                                                                  +
                                                                                                                                  1077 template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  1078 size_t sync_receive_impl(const Mutable_buffer_sequence& target,
                                                                                                                                  +
                                                                                                                                  1079 const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1080
                                                                                                                                  +
                                                                                                                                  1081 /**
                                                                                                                                  +
                                                                                                                                  1082 * Helper similar to sync_receive_impl() but for the `null_buffers` versions of `sync_receive()`.
                                                                                                                                  +
                                                                                                                                  1083 *
                                                                                                                                  +
                                                                                                                                  1084 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1085 * See sync_receive_impl().
                                                                                                                                  +
                                                                                                                                  1086 * @param err_code
                                                                                                                                  +
                                                                                                                                  1087 * See sync_receive_impl().
                                                                                                                                  +
                                                                                                                                  1088 * @return See `sync_receive(null_buffers)`. `true` if and only if Readable status successfuly reached in time.
                                                                                                                                  +
                                                                                                                                  1089 */
                                                                                                                                  +
                                                                                                                                  1090 bool sync_receive_reactor_pattern_impl(const Fine_time_pt& wait_until, Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1091
                                                                                                                                  +
                                                                                                                                  1092 /**
                                                                                                                                  +
                                                                                                                                  1093 * This is to sync_receive() as node_receive() is to receive().
                                                                                                                                  +
                                                                                                                                  1094 *
                                                                                                                                  +
                                                                                                                                  1095 * @param rcv_buf_consume_func_or_empty
                                                                                                                                  +
                                                                                                                                  1096 * See node_receive(). Additionally, if this is `.empty()` then `null_buffers` a/k/a "reactor pattern" mode is
                                                                                                                                  +
                                                                                                                                  1097 * engaged.
                                                                                                                                  +
                                                                                                                                  1098 * @param wait_until
                                                                                                                                  +
                                                                                                                                  1099 * See sync_receive_impl().
                                                                                                                                  +
                                                                                                                                  1100 * @param err_code
                                                                                                                                  +
                                                                                                                                  1101 * See sync_receive().
                                                                                                                                  +
                                                                                                                                  1102 * @return See sync_receive().
                                                                                                                                  +
                                                                                                                                  1103 */
                                                                                                                                  +
                                                                                                                                  1104 size_t node_sync_receive(const Function<size_t ()>& rcv_buf_consume_func_or_empty,
                                                                                                                                  +
                                                                                                                                  1105 const Fine_time_pt& wait_until,
                                                                                                                                  +
                                                                                                                                  1106 Error_code* err_code);
                                                                                                                                  +
                                                                                                                                  1107
                                                                                                                                  +
                                                                                                                                  1108 /**
                                                                                                                                  +
                                                                                                                                  1109 * Analogous to Node::opt() but for per-socket options. See that method.
                                                                                                                                  +
                                                                                                                                  1110 *
                                                                                                                                  +
                                                                                                                                  1111 * Do NOT read option values without opt().
                                                                                                                                  +
                                                                                                                                  1112 *
                                                                                                                                  +
                                                                                                                                  1113 * @tparam Opt_type
                                                                                                                                  +
                                                                                                                                  1114 * The type of the option data member.
                                                                                                                                  +
                                                                                                                                  1115 * @param opt_val_ref
                                                                                                                                  +
                                                                                                                                  1116 * A reference (important!) to the value you want; this may be either a data member of
                                                                                                                                  +
                                                                                                                                  1117 * this->m_opts or the entire this->m_opts itself.
                                                                                                                                  +
                                                                                                                                  1118 * @return A copy of the value at the given reference.
                                                                                                                                  +
                                                                                                                                  1119 */
                                                                                                                                  +
                                                                                                                                  1120 template<typename Opt_type>
                                                                                                                                  +
                                                                                                                                  1121 Opt_type opt(const Opt_type& opt_val_ref) const;
                                                                                                                                  +
                                                                                                                                  1122
                                                                                                                                  +
                                                                                                                                  1123 /**
                                                                                                                                  +
                                                                                                                                  1124 * Returns the smallest multiple of max_block_size() that is >= the given option value, optionally
                                                                                                                                  +
                                                                                                                                  1125 * first inflated by a certain %. The intended use case is to obtain a Send of Receive buffer max
                                                                                                                                  +
                                                                                                                                  1126 * size that is about equal to the user-specified (or otherwise obtained) value, in bytes, but is
                                                                                                                                  +
                                                                                                                                  1127 * a multiple of max-block-size -- to prevent fragmenting max-block-size-sized chunks of data unnecessarily -- and
                                                                                                                                  +
                                                                                                                                  1128 * to possibly inflate that value by a certain percentage for subtle flow control reasons.
                                                                                                                                  +
                                                                                                                                  1129 *
                                                                                                                                  +
                                                                                                                                  1130 * @param opt_val_ref
                                                                                                                                  +
                                                                                                                                  1131 * A reference to a `size_t`-sized socket option, as would be passed to opt(). See opt().
                                                                                                                                  +
                                                                                                                                  1132 * This is the starting value.
                                                                                                                                  +
                                                                                                                                  1133 * @param inflate_pct_val_ptr
                                                                                                                                  +
                                                                                                                                  1134 * A pointer to an `unsigned int`-sized socket option, as would be passed to opt(). See
                                                                                                                                  +
                                                                                                                                  1135 * opt(). This is the % by which to inflate opt_val_ref before rounding up to nearest
                                                                                                                                  +
                                                                                                                                  1136 * max_block_size() multiple. If null, the % is assumed to be 0.
                                                                                                                                  +
                                                                                                                                  1137 * @return See above.
                                                                                                                                  +
                                                                                                                                  1138 */
                                                                                                                                  +
                                                                                                                                  1139 size_t max_block_size_multiple(const size_t& opt_val_ref,
                                                                                                                                  +
                                                                                                                                  1140 const unsigned int* inflate_pct_val_ptr = 0) const;
                                                                                                                                  +
                                                                                                                                  1141
                                                                                                                                  +
                                                                                                                                  1142 /**
                                                                                                                                  +
                                                                                                                                  1143 * Whether retransmission is enabled on this connection. Short-hand for appropriate opt() call.
                                                                                                                                  +
                                                                                                                                  1144 * Note this always returns the same value for a given object.
                                                                                                                                  +
                                                                                                                                  1145 *
                                                                                                                                  +
                                                                                                                                  1146 * @return Ditto.
                                                                                                                                  +
                                                                                                                                  1147 */
                                                                                                                                  +
                                                                                                                                  1148 bool rexmit_on() const;
                                                                                                                                  +
                                                                                                                                  1149
                                                                                                                                  +
                                                                                                                                  1150 /**
                                                                                                                                  +
                                                                                                                                  1151 * Helper that is equivalent to Node::ensure_sock_open(this, err_code). Used by templated
                                                                                                                                  +
                                                                                                                                  1152 * methods which must be defined in this header file, which means they cannot access Node members
                                                                                                                                  +
                                                                                                                                  1153 * directly, as Node is an incomplete type.
                                                                                                                                  +
                                                                                                                                  1154 *
                                                                                                                                  +
                                                                                                                                  1155 * @param err_code
                                                                                                                                  +
                                                                                                                                  1156 * See Node::ensure_sock_open().
                                                                                                                                  +
                                                                                                                                  1157 * @return See Node::ensure_sock_open().
                                                                                                                                  +
                                                                                                                                  1158 */
                                                                                                                                  +
                                                                                                                                  1159 bool ensure_open(Error_code* err_code) const;
                                                                                                                                  +
                                                                                                                                  1160
                                                                                                                                  +
                                                                                                                                  1161 /**
                                                                                                                                  +
                                                                                                                                  1162 * Helper that, given a byte count, returns a string with that byte count and the number of
                                                                                                                                  +
                                                                                                                                  1163 * max_block_size()-size blocks that can fit within it (rounded down).
                                                                                                                                  +
                                                                                                                                  1164 *
                                                                                                                                  +
                                                                                                                                  1165 * @param bytes
                                                                                                                                  +
                                                                                                                                  1166 * @return See above.
                                                                                                                                  +
                                                                                                                                  1167 */
                                                                                                                                  +
                                                                                                                                  1168 std::string bytes_blocks_str(size_t bytes) const;
                                                                                                                                  +
                                                                                                                                  1169
                                                                                                                                  +
                                                                                                                                  1170 // Data.
                                                                                                                                  +
                                                                                                                                  1171
                                                                                                                                  +
                                                                                                                                  1172 /**
                                                                                                                                  +
                                                                                                                                  1173 * This socket's per-socket set of options. Initialized at construction; can be subsequently
                                                                                                                                  +
                                                                                                                                  1174 * modified by set_options(), although only the dynamic members of this may be modified.
                                                                                                                                  +
                                                                                                                                  1175 *
                                                                                                                                  +
                                                                                                                                  1176 * Accessed from thread W and user thread U != W. Protected by #m_opts_mutex. When reading, do
                                                                                                                                  +
                                                                                                                                  1177 * NOT access without locking (which is encapsulated in opt()).
                                                                                                                                  +
                                                                                                                                  1178 */
                                                                                                                                  + +
                                                                                                                                  1180
                                                                                                                                  +
                                                                                                                                  1181 /// The mutex protecting #m_opts.
                                                                                                                                  + +
                                                                                                                                  1183
                                                                                                                                  +
                                                                                                                                  1184 /// `true` if we connect() to server; `false` if we are to be/are `accept()`ed. Should be set once and not modified.
                                                                                                                                  + +
                                                                                                                                  1186
                                                                                                                                  +
                                                                                                                                  1187 /**
                                                                                                                                  +
                                                                                                                                  1188 * See state(). Should be set before user gets access to `*this`. Must not be modified by non-W threads after that.
                                                                                                                                  +
                                                                                                                                  1189 *
                                                                                                                                  +
                                                                                                                                  1190 * Accessed from thread W and user threads U != W (in state() and others). Must be protected
                                                                                                                                  +
                                                                                                                                  1191 * by mutex.
                                                                                                                                  +
                                                                                                                                  1192 */
                                                                                                                                  + +
                                                                                                                                  1194
                                                                                                                                  +
                                                                                                                                  1195 /**
                                                                                                                                  +
                                                                                                                                  1196 * See state(). Should be set before user gets access to `*this`. Must not be modified by non-W
                                                                                                                                  +
                                                                                                                                  1197 * threads after that.
                                                                                                                                  +
                                                                                                                                  1198 *
                                                                                                                                  +
                                                                                                                                  1199 * Accessed from thread W and user threads U != W (in state() and others). Must be protected by
                                                                                                                                  +
                                                                                                                                  1200 * mutex.
                                                                                                                                  +
                                                                                                                                  1201 */
                                                                                                                                  + +
                                                                                                                                  1203
                                                                                                                                  +
                                                                                                                                  1204 /**
                                                                                                                                  +
                                                                                                                                  1205 * See node(). Should be set before user gets access to `*this` and not changed, except to null when
                                                                                                                                  +
                                                                                                                                  1206 * state is State::S_CLOSED. Must not be modified by non-W threads.
                                                                                                                                  +
                                                                                                                                  1207 *
                                                                                                                                  +
                                                                                                                                  1208 * Invariant: `x->node() == y` if and only if `y->m_socks` contains `x`; otherwise `!x->node()`.
                                                                                                                                  +
                                                                                                                                  1209 * The invariant must hold by the end of the execution of any thread W boost.asio handler (but
                                                                                                                                  +
                                                                                                                                  1210 * not necessarily at all points within that handler, or generally).
                                                                                                                                  +
                                                                                                                                  1211 *
                                                                                                                                  +
                                                                                                                                  1212 * Accessed from thread W and user threads U != W (in node() and others). Must be protected by
                                                                                                                                  +
                                                                                                                                  1213 * mutex.
                                                                                                                                  +
                                                                                                                                  1214 *
                                                                                                                                  +
                                                                                                                                  1215 * @todo `boost::weak_ptr<Node>` would be ideal for this, but of course then Node would have to
                                                                                                                                  +
                                                                                                                                  1216 * (only?) be available via shared_ptr<>.
                                                                                                                                  +
                                                                                                                                  1217 */
                                                                                                                                  + +
                                                                                                                                  1219
                                                                                                                                  +
                                                                                                                                  1220 /**
                                                                                                                                  +
                                                                                                                                  1221 * For sockets that come a Server_socket, this is the inverse of Server_socket::m_connecting_socks: it is
                                                                                                                                  +
                                                                                                                                  1222 * the Server_socket from which this Peer_socket will be Server_socket::accept()ed (if that succeeds); or null if
                                                                                                                                  +
                                                                                                                                  1223 * this is an actively-connecting Peer_socket or has already been `accept()`ed.
                                                                                                                                  +
                                                                                                                                  1224 *
                                                                                                                                  +
                                                                                                                                  1225 * More formally, this is null if #m_active_connect; null if not the case but already accept()ed; and otherwise:
                                                                                                                                  +
                                                                                                                                  1226 * `((y->m_connecting_socks contains x) || (y->m_unaccepted_socks contains x))` if and only if
                                                                                                                                  +
                                                                                                                                  1227 * `x->m_originating_serv == y`. That is, for a socket in state Int_state::S_SYN_RCVD, or in state
                                                                                                                                  +
                                                                                                                                  1228 * Int_state::S_ESTABLISHED, but before being accept()ed by the user, this is the server socket that spawned this
                                                                                                                                  +
                                                                                                                                  1229 * peer socket.
                                                                                                                                  +
                                                                                                                                  1230 *
                                                                                                                                  +
                                                                                                                                  1231 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1232 * This can be write-accessed simultaneously by thread W (e.g., when closing a
                                                                                                                                  +
                                                                                                                                  1233 * socket before it is accepted) and a user thread U != W (in Server_socket::accept()). It is
                                                                                                                                  +
                                                                                                                                  1234 * thus protected by a mutex -- but it's Server_socket::m_mutex, not Peer_socket::m_mutex. I
                                                                                                                                  +
                                                                                                                                  1235 * know it's weird, but it makes sense. Basically Server_socket::m_unaccepted_socks and
                                                                                                                                  +
                                                                                                                                  1236 * Server_socket::m_originating_serv -- for each element of `m_unaccepted_socks` -- are modified together
                                                                                                                                  +
                                                                                                                                  1237 * in a synchronized way.
                                                                                                                                  +
                                                                                                                                  1238 *
                                                                                                                                  +
                                                                                                                                  1239 * @see Server_socket::m_connecting_socks and Server_socket::m_unaccepted_socks for the closely
                                                                                                                                  +
                                                                                                                                  1240 * related inverse.
                                                                                                                                  +
                                                                                                                                  1241 */
                                                                                                                                  + +
                                                                                                                                  1243
                                                                                                                                  +
                                                                                                                                  1244 /**
                                                                                                                                  +
                                                                                                                                  1245 * The Receive buffer; Node feeds data at the back; user consumes data at the front. Contains
                                                                                                                                  +
                                                                                                                                  1246 * application-layer data received from the other side, to be read by user via receive() and
                                                                                                                                  +
                                                                                                                                  1247 * similar.
                                                                                                                                  +
                                                                                                                                  1248 *
                                                                                                                                  +
                                                                                                                                  1249 * A maximum cumulative byte count is maintained. If data are received that would exceed this max
                                                                                                                                  +
                                                                                                                                  1250 * (i.e., the user is not retrieving the data fast enough to keep up), these data are dropped (and
                                                                                                                                  +
                                                                                                                                  1251 * if we use ACKs would be eventually treated as dropped by the other side).
                                                                                                                                  +
                                                                                                                                  1252 *
                                                                                                                                  +
                                                                                                                                  1253 * Note that this is a high-level structure, near the application layer. This does not store any
                                                                                                                                  +
                                                                                                                                  1254 * metadata, like sequence numbers, or data not ready to be consumed by the user (such as
                                                                                                                                  +
                                                                                                                                  1255 * out-of-order packets, if we implement that). Such packets and data should be stored elsewhere.
                                                                                                                                  +
                                                                                                                                  1256 *
                                                                                                                                  +
                                                                                                                                  1257 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1258 * This can be write-accessed simultaneously by thread W (when receiving by Node)
                                                                                                                                  +
                                                                                                                                  1259 * and a user thread U != W (in receive(), etc.). It is thus protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1260 */
                                                                                                                                  + +
                                                                                                                                  1262
                                                                                                                                  +
                                                                                                                                  1263 /**
                                                                                                                                  +
                                                                                                                                  1264 * The Send buffer; user feeds data at the back; Node consumes data at the front. Contains
                                                                                                                                  +
                                                                                                                                  1265 * application-layer data to be sent to the other side as supplied by user via send() and friends.
                                                                                                                                  +
                                                                                                                                  1266 *
                                                                                                                                  +
                                                                                                                                  1267 * A maximum cumulative byte count is maintained. If data are supplied that would exceed
                                                                                                                                  +
                                                                                                                                  1268 * this max (i.e., the Node is not sending the data fast enough to keep up), send() will
                                                                                                                                  +
                                                                                                                                  1269 * inform the caller that fewer bytes than intended have been buffered. Typically this happens if
                                                                                                                                  +
                                                                                                                                  1270 * the congestion control window is full, so data are getting buffered in #m_snd_buf instead of
                                                                                                                                  +
                                                                                                                                  1271 * being immediately consumed and sent.
                                                                                                                                  +
                                                                                                                                  1272 *
                                                                                                                                  +
                                                                                                                                  1273 * Note that this is a high-level structure, near the application layer. This does not store any
                                                                                                                                  +
                                                                                                                                  1274 * metadata, like sequence numbers, or data not ready to be consumed by the user (such as
                                                                                                                                  +
                                                                                                                                  1275 * out-of-order packets, if we implement that). Such packets and data should be stored elsewhere.
                                                                                                                                  +
                                                                                                                                  1276 *
                                                                                                                                  +
                                                                                                                                  1277 * Thread safety: Analogous to #m_rcv_buf.
                                                                                                                                  +
                                                                                                                                  1278 */
                                                                                                                                  + +
                                                                                                                                  1280
                                                                                                                                  +
                                                                                                                                  1281 /**
                                                                                                                                  +
                                                                                                                                  1282 * The #Error_code causing disconnection (if one has occurred or is occurring)
                                                                                                                                  +
                                                                                                                                  1283 * on this socket; otherwise a clear (success) #Error_code. This starts as success
                                                                                                                                  +
                                                                                                                                  1284 * and may move to one non-success value and then never change after that. Graceful connection
                                                                                                                                  +
                                                                                                                                  1285 * termination is (unlike in BSD sockets, where this is indicated with receive() returning 0, not an
                                                                                                                                  +
                                                                                                                                  1286 * error) indeed counted as a non-success value for #m_disconnect_cause.
                                                                                                                                  +
                                                                                                                                  1287 *
                                                                                                                                  +
                                                                                                                                  1288 * Exception: if, during graceful close, the connection must be closed abruptly (due to error,
                                                                                                                                  +
                                                                                                                                  1289 * including error::Code::S_USER_CLOSED_ABRUPTLY), #m_disconnect_cause may change a second time (from "graceful close"
                                                                                                                                  +
                                                                                                                                  1290 * to "abrupt closure").
                                                                                                                                  +
                                                                                                                                  1291 *
                                                                                                                                  +
                                                                                                                                  1292 * As in TCP net-stacks, one cannot recover from a transmission error or termination on the socket
                                                                                                                                  +
                                                                                                                                  1293 * (fake "error" `EWOULDBLOCK`/`EAGAIN` excepted), which is why this can only go success ->
                                                                                                                                  +
                                                                                                                                  1294 * non-success and never change after that.
                                                                                                                                  +
                                                                                                                                  1295 *
                                                                                                                                  +
                                                                                                                                  1296 * How to report this to the user: attempting to `*receive()` when not Readable while
                                                                                                                                  +
                                                                                                                                  1297 * #m_disconnect_cause is not success => `*receive()` returns this #Error_code to the user; and
                                                                                                                                  +
                                                                                                                                  1298 * similarly for `*send()` and Writable.
                                                                                                                                  +
                                                                                                                                  1299 *
                                                                                                                                  +
                                                                                                                                  1300 * I emphasize that this should happen only after Receive buffer has been emptied; otherwise user
                                                                                                                                  +
                                                                                                                                  1301 * will not be able to read queued up received data after the Node internally detects connection
                                                                                                                                  +
                                                                                                                                  1302 * termination. By the same token, if the Node can still reasonably send data to the other side,
                                                                                                                                  +
                                                                                                                                  1303 * and Send buffer is not empty, and #m_disconnect_cause is not success, the Node should only halt
                                                                                                                                  +
                                                                                                                                  1304 * the packet sending once Send buffer has been emptied.
                                                                                                                                  +
                                                                                                                                  1305 *
                                                                                                                                  +
                                                                                                                                  1306 * This should be success in all states except State::S_CLOSED and
                                                                                                                                  +
                                                                                                                                  1307 * State::S_OPEN + Open_sub_state::S_DISCONNECTING.
                                                                                                                                  +
                                                                                                                                  1308 *
                                                                                                                                  +
                                                                                                                                  1309 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1310 * Since user threads will access this at least via receive() and send(), while
                                                                                                                                  +
                                                                                                                                  1311 * thread W may set it having detected disconnection, this must be protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1312 */
                                                                                                                                  + +
                                                                                                                                  1314
                                                                                                                                  +
                                                                                                                                  1315 /**
                                                                                                                                  +
                                                                                                                                  1316 * If `!m_active_connect`, this contains the serialized metadata that the user supplied on
                                                                                                                                  +
                                                                                                                                  1317 * the other side when initiating the connect; otherwise this is the serialized metadata that the user
                                                                                                                                  +
                                                                                                                                  1318 * supplied on this side when initiating the connect. In either case (though obviously more
                                                                                                                                  +
                                                                                                                                  1319 * useful in the `!m_active_connect` case) it can be obtained via get_connect_metadata().
                                                                                                                                  +
                                                                                                                                  1320 * In the `m_active_connect` case, this is also needed if we must re-send the original SYN
                                                                                                                                  +
                                                                                                                                  1321 * (retransmission).
                                                                                                                                  +
                                                                                                                                  1322 *
                                                                                                                                  +
                                                                                                                                  1323 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1324 * Same as #m_snd_buf and #m_rcv_buf (protected by #m_mutex). This would not be
                                                                                                                                  +
                                                                                                                                  1325 * necessary, since this value is immutable once user gets access to `*this`, and threads other than
                                                                                                                                  +
                                                                                                                                  1326 * W can access it, but sock_free_memory() does clear it while the user may be accessing it. Due
                                                                                                                                  +
                                                                                                                                  1327 * to that caveat, we have to lock it.
                                                                                                                                  +
                                                                                                                                  1328 */
                                                                                                                                  + +
                                                                                                                                  1330
                                                                                                                                  +
                                                                                                                                  1331 /**
                                                                                                                                  +
                                                                                                                                  1332 * This object's mutex. The protected items are #m_state, #m_open_sub_state, #m_disconnect_cause,
                                                                                                                                  +
                                                                                                                                  1333 * #m_node, #m_rcv_buf, #m_snd_buf, #m_serialized_metadata.
                                                                                                                                  +
                                                                                                                                  1334 *
                                                                                                                                  +
                                                                                                                                  1335 * Generally speaking, if 2 or more of the protected variables must be changed in the same
                                                                                                                                  +
                                                                                                                                  1336 * non-blocking "operation" (for some reasonable definition of "operation"), they should probably
                                                                                                                                  +
                                                                                                                                  1337 * be changed within the same #m_mutex-locking critical section. For example, if closing the
                                                                                                                                  +
                                                                                                                                  1338 * socket in thread W due to an incoming RST, one should lock #m_mutex, clear both buffers, set
                                                                                                                                  +
                                                                                                                                  1339 * #m_disconnect_cause, change `m_state = State::S_CLOSED`, and then unlock #m_mutex. Then thread U != W
                                                                                                                                  +
                                                                                                                                  1340 * will observe all this state changed at the "same time," which is desirable.
                                                                                                                                  +
                                                                                                                                  1341 */
                                                                                                                                  + +
                                                                                                                                  1343
                                                                                                                                  +
                                                                                                                                  1344 /// See remote_endpoint(). Should be set before user gets access to `*this` and not changed afterwards.
                                                                                                                                  + +
                                                                                                                                  1346
                                                                                                                                  +
                                                                                                                                  1347 /// See local_port(). Should be set before user gets access to `*this` and not changed afterwards.
                                                                                                                                  + +
                                                                                                                                  1349
                                                                                                                                  +
                                                                                                                                  1350 /**
                                                                                                                                  +
                                                                                                                                  1351 * Current internal state of the socket. Note this is a very central piece of information and is analogous
                                                                                                                                  +
                                                                                                                                  1352 * to TCP's "state" (ESTABLISHED, etc. etc.).
                                                                                                                                  +
                                                                                                                                  1353 *
                                                                                                                                  +
                                                                                                                                  1354 * This gains meaning only in thread W. This should NOT be
                                                                                                                                  +
                                                                                                                                  1355 * accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1356 */
                                                                                                                                  + +
                                                                                                                                  1358
                                                                                                                                  +
                                                                                                                                  1359 /**
                                                                                                                                  +
                                                                                                                                  1360 * The queue of DATA packets received while in Int_state::S_SYN_RCVD state before the
                                                                                                                                  +
                                                                                                                                  1361 * Syn_ack_ack_packet arrives to move us to Int_state::S_ESTABLISHED
                                                                                                                                  +
                                                                                                                                  1362 * state, at which point these packets can be processed normally. Such
                                                                                                                                  +
                                                                                                                                  1363 * DATA packets would not normally exist, but they can exist if the SYN_ACK_ACK is lost or DATA
                                                                                                                                  +
                                                                                                                                  1364 * packets are re-ordered to go ahead of it. See Node::handle_data_to_syn_rcvd() for more
                                                                                                                                  +
                                                                                                                                  1365 * detail.
                                                                                                                                  +
                                                                                                                                  1366 *
                                                                                                                                  +
                                                                                                                                  1367 * This gains meaning only in thread W. This should NOT be accessed outside of thread W
                                                                                                                                  +
                                                                                                                                  1368 * and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1369 */
                                                                                                                                  + +
                                                                                                                                  1371
                                                                                                                                  +
                                                                                                                                  1372 /**
                                                                                                                                  +
                                                                                                                                  1373 * The running total count of bytes in the `m_data` fields of #m_rcv_syn_rcvd_data_q. Undefined
                                                                                                                                  +
                                                                                                                                  1374 * when the latter is empty. Used to limit its size. This gains meaning only in thread W. This
                                                                                                                                  +
                                                                                                                                  1375 * should NOT be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1376 */
                                                                                                                                  + +
                                                                                                                                  1378
                                                                                                                                  +
                                                                                                                                  1379 /**
                                                                                                                                  +
                                                                                                                                  1380 * The Initial Sequence Number (ISN) contained in the original Syn_packet or
                                                                                                                                  +
                                                                                                                                  1381 * Syn_ack_packet we received.
                                                                                                                                  +
                                                                                                                                  1382 *
                                                                                                                                  +
                                                                                                                                  1383 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1384 * not protected by a mutex. Useful at least in verifying the validity of duplicate SYNs and
                                                                                                                                  +
                                                                                                                                  1385 * SYN_ACKs.
                                                                                                                                  +
                                                                                                                                  1386 */
                                                                                                                                  + +
                                                                                                                                  1388
                                                                                                                                  +
                                                                                                                                  1389 /**
                                                                                                                                  +
                                                                                                                                  1390 * The maximal sequence number R from the remote side such that all data with sequence numbers
                                                                                                                                  +
                                                                                                                                  1391 * strictly less than R in this connection have been received by us and placed into the Receive
                                                                                                                                  +
                                                                                                                                  1392 * buffer. This first gains meaning upon receiving SYN and is the sequence number of that SYN,
                                                                                                                                  +
                                                                                                                                  1393 * plus one (as in TCP); or upon receiving SYN_ACK (similarly). Note that received packets past
                                                                                                                                  +
                                                                                                                                  1394 * this sequence number may exist, but if so there is at least one missing packet (the one at
                                                                                                                                  +
                                                                                                                                  1395 * #m_rcv_next_seq_num) preceding all of them.
                                                                                                                                  +
                                                                                                                                  1396 *
                                                                                                                                  +
                                                                                                                                  1397 * @see #m_rcv_packets_with_gaps.
                                                                                                                                  +
                                                                                                                                  1398 *
                                                                                                                                  +
                                                                                                                                  1399 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1400 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1401 */
                                                                                                                                  + +
                                                                                                                                  1403
                                                                                                                                  +
                                                                                                                                  1404 /**
                                                                                                                                  +
                                                                                                                                  1405 * The sequence-number-ordered collection of all
                                                                                                                                  +
                                                                                                                                  1406 * received-and-not-dropped-due-to-buffer-overflow packets such that at least
                                                                                                                                  +
                                                                                                                                  1407 * one unreceived-or-otherwise-unknown datum precedes all sequence numbers in this collection;
                                                                                                                                  +
                                                                                                                                  1408 * a/k/a the reassembly queue if retransmission is enabled.
                                                                                                                                  +
                                                                                                                                  1409 * With retransmission off, the only purpose of keeping this structure at all is to detect any
                                                                                                                                  +
                                                                                                                                  1410 * already-received-and-given-to-Receive-buffer packet coming in again; such a packet should be
                                                                                                                                  +
                                                                                                                                  1411 * ACKed but NOT given to the Receive buffer again (avoid data duplication). With retransmission
                                                                                                                                  +
                                                                                                                                  1412 * on, this is additionally used as the reassembly queue (storing the non-contiguous data until
                                                                                                                                  +
                                                                                                                                  1413 * the gaps are filled in).
                                                                                                                                  +
                                                                                                                                  1414 *
                                                                                                                                  +
                                                                                                                                  1415 * The structure is best explained by breaking down the sequence number space. I list the
                                                                                                                                  +
                                                                                                                                  1416 * sequence number ranges in increasing order starting with the ISN. Let `last_rcv_seq_num` be the
                                                                                                                                  +
                                                                                                                                  1417 * sequence number of the last datum to have been received (and not dropped due to insufficient
                                                                                                                                  +
                                                                                                                                  1418 * Receive buffer space), for exposition purposes.
                                                                                                                                  +
                                                                                                                                  1419 *
                                                                                                                                  +
                                                                                                                                  1420 * - #m_rcv_init_seq_num =
                                                                                                                                  +
                                                                                                                                  1421 * - SYN or SYN_ACK
                                                                                                                                  +
                                                                                                                                  1422 *
                                                                                                                                  +
                                                                                                                                  1423 * - [`m_rcv_init_seq_num + 1`, `m_rcv_next_seq_num - 1`] =
                                                                                                                                  +
                                                                                                                                  1424 * - Largest possible range of sequence numbers such that each datum represented by this range
                                                                                                                                  +
                                                                                                                                  1425 * has been received (and not dropped due to insufficient Receive buffer space) and copied to
                                                                                                                                  +
                                                                                                                                  1426 * the Receive buffer for user retrieval.
                                                                                                                                  +
                                                                                                                                  1427 *
                                                                                                                                  +
                                                                                                                                  1428 * - [#m_rcv_next_seq_num, `m_rcv_next_seq_num + N - 1`] =
                                                                                                                                  +
                                                                                                                                  1429 * - The first packet after the ISN that has not yet been received (or has been received but has
                                                                                                                                  +
                                                                                                                                  1430 * been dropped due to insufficient Receive buffer space). `N` is the (unknown to us) length of
                                                                                                                                  +
                                                                                                                                  1431 * that packet. `N` > 0. This can be seen as the first "gap" in the received sequence number
                                                                                                                                  +
                                                                                                                                  1432 * space.
                                                                                                                                  +
                                                                                                                                  1433 *
                                                                                                                                  +
                                                                                                                                  1434 * - [`m_rcv_next_seq_num + N`, `last_rcv_seq_num`] =
                                                                                                                                  +
                                                                                                                                  1435 * - The remaining packets up to and including the last byte that has been received (and not
                                                                                                                                  +
                                                                                                                                  1436 * dropped due to insufficient Receive buffer space). Each packet in this range is one of the
                                                                                                                                  +
                                                                                                                                  1437 * following:
                                                                                                                                  +
                                                                                                                                  1438 * - received (and not dropped due to insufficient Receive buffer space);
                                                                                                                                  +
                                                                                                                                  1439 * - not received (or received and dropped due to insufficient Receive buffer space).
                                                                                                                                  +
                                                                                                                                  1440 *
                                                                                                                                  +
                                                                                                                                  1441 * - [`last_rcv_seq_num + 1`, ...] =
                                                                                                                                  +
                                                                                                                                  1442 * - All remaining not-yet-received (or received but dropped due to insufficient Receive buffer
                                                                                                                                  +
                                                                                                                                  1443 * space) packets.
                                                                                                                                  +
                                                                                                                                  1444 *
                                                                                                                                  +
                                                                                                                                  1445 * #m_rcv_packets_with_gaps contains all Received_packets in the range [`m_rcv_next_seq_num + N`,
                                                                                                                                  +
                                                                                                                                  1446 * `last_rcv_seq_num`], with each particular Received_packet's first sequence number as its key. If
                                                                                                                                  +
                                                                                                                                  1447 * there are no gaps -- all received sequence numbers are followed by unreceived sequence numbers
                                                                                                                                  +
                                                                                                                                  1448 * -- then that range is empty and so is #m_rcv_packets_with_gaps. All the other ranges can be
                                                                                                                                  +
                                                                                                                                  1449 * null (empty) as well. If there are no received-and-undropped packets, then `m_rcv_init_seq_num
                                                                                                                                  +
                                                                                                                                  1450 * == m_rcv_next_seq_num`, which is the initial situation.
                                                                                                                                  +
                                                                                                                                  1451 *
                                                                                                                                  +
                                                                                                                                  1452 * The above is an invariant, to be true at the end of each boost.asio handler in thread W, at
                                                                                                                                  +
                                                                                                                                  1453 * least.
                                                                                                                                  +
                                                                                                                                  1454 *
                                                                                                                                  +
                                                                                                                                  1455 * Each received-and-undropped packet therefore is placed into #m_rcv_packets_with_gaps, anywhere
                                                                                                                                  +
                                                                                                                                  1456 * in the middle. If retransmission is off, the data in the packet is added to Receive buffer.
                                                                                                                                  +
                                                                                                                                  1457 * If retransmission is on, the data in the packet is NOT added to Receive buffer but instead
                                                                                                                                  +
                                                                                                                                  1458 * saved within the structure for later reassembly (see next paragraph).
                                                                                                                                  +
                                                                                                                                  1459 *
                                                                                                                                  +
                                                                                                                                  1460 * If the [#m_rcv_next_seq_num, ...] (first gap) packet is received-and-not-dropped, then
                                                                                                                                  +
                                                                                                                                  1461 * #m_rcv_next_seq_num is incremented by N (the length of that packet), filling the gap. Moreover,
                                                                                                                                  +
                                                                                                                                  1462 * any contiguous packets at the front of #m_rcv_packets_with_gaps, assuming the first packet's
                                                                                                                                  +
                                                                                                                                  1463 * sequence number equals #m_rcv_next_seq_num, must be removed from #m_rcv_packets_with_gaps, and
                                                                                                                                  +
                                                                                                                                  1464 * #m_rcv_next_seq_num should be incremented accordingly. All of this maintains the invariant. If
                                                                                                                                  +
                                                                                                                                  1465 * retransmission is on, the data in the byte sequence formed by this operation is to be placed
                                                                                                                                  +
                                                                                                                                  1466 * (in sequence number order) into the Receive buffer (a/k/a reassembly).
                                                                                                                                  +
                                                                                                                                  1467 *
                                                                                                                                  +
                                                                                                                                  1468 * Conceptually, this is the action of receiving a gap packet which links up following
                                                                                                                                  +
                                                                                                                                  1469 * already-received packets to previous already-received packets, which means all of these can go
                                                                                                                                  +
                                                                                                                                  1470 * away, as the window slides forward beyond them.
                                                                                                                                  +
                                                                                                                                  1471 *
                                                                                                                                  +
                                                                                                                                  1472 * If a packet arrives and is already in #m_rcv_packets_with_gaps, then it is a duplicate and is
                                                                                                                                  +
                                                                                                                                  1473 * NOT placed on the Receive buffer. The same holds for any packet with sequence numbers
                                                                                                                                  +
                                                                                                                                  1474 * preceding #m_rcv_next_seq_num.
                                                                                                                                  +
                                                                                                                                  1475 *
                                                                                                                                  +
                                                                                                                                  1476 * The type used is a map sorted by starting sequence number of each packet. Why? We need pretty
                                                                                                                                  +
                                                                                                                                  1477 * fast middle operations, inserting and checking for existence of arriving packet. We need fast
                                                                                                                                  +
                                                                                                                                  1478 * access to the earliest (smallest sequence number) packet, for when the first gap is filled.
                                                                                                                                  +
                                                                                                                                  1479 * `std::map` satisfies these needs: `insert()` and `lower_bound()` are <em>O(log n)</em>; `begin()` gives the
                                                                                                                                  +
                                                                                                                                  1480 * smallest element and is @em O(1). Iteration is @em O(1) as well. (All amortized.)
                                                                                                                                  +
                                                                                                                                  1481 *
                                                                                                                                  +
                                                                                                                                  1482 * ### Memory use ###
                                                                                                                                  +
                                                                                                                                  1483 * The above scheme allows for unbounded memory use given certain behavior from the
                                                                                                                                  +
                                                                                                                                  1484 * other side, when retransmission is off. Suppose packets 1, 2, 3 are received; then packets 5,
                                                                                                                                  +
                                                                                                                                  1485 * 6, ..., 1000 are received. Retransmission is off, so eventually the sender
                                                                                                                                  +
                                                                                                                                  1486 * may give up on packet 4 and consider it Dropped. So the gap will forever exist; hence
                                                                                                                                  +
                                                                                                                                  1487 * #m_rcv_packets_with_gaps will always hold per-packet data for 5, 6, ..., 1000 (and any
                                                                                                                                  +
                                                                                                                                  1488 * subsequent packets). With retransmission, packet 4 would eventually arrive, or the connection
                                                                                                                                  +
                                                                                                                                  1489 * would get RSTed, but without retransmission that doesn't happen. Thus memory use will just
                                                                                                                                  +
                                                                                                                                  1490 * grow and grow. Solution: come up with some heuristic that would quite conservatively declare
                                                                                                                                  +
                                                                                                                                  1491 * that packet 4 has been "received," even though it hasn't. This will plug the hole (packet 4)
                                                                                                                                  +
                                                                                                                                  1492 * and clear #m_rcv_packets_with_gaps in this example. Then if packet 4 does somehow come in, it
                                                                                                                                  +
                                                                                                                                  1493 * will get ACKed (like any valid received packet) but will NOT be saved into the Receive buffer,
                                                                                                                                  +
                                                                                                                                  1494 * since it will be considered "duplicate" due to already being "received." Of course, the
                                                                                                                                  +
                                                                                                                                  1495 * heuristic must be such that few if any packets considered "received" this way will actually get
                                                                                                                                  +
                                                                                                                                  1496 * delivered eventually, otherwise we may lose a lot of data. Here is one such heuristic, that is
                                                                                                                                  +
                                                                                                                                  1497 * both simple and conservative: let N be some constant (e.g., N = 100). If
                                                                                                                                  +
                                                                                                                                  1498 * `m_rcv_packets_with_gaps.size()` exceeds N (i.e., equals (N + 1)), consider all gap packets
                                                                                                                                  +
                                                                                                                                  1499 * preceding #m_rcv_packets_with_gaps's first sequence number as "received." This will, through
                                                                                                                                  +
                                                                                                                                  1500 * gap filling logic described above, reduce `m_rcv_packets_with_gaps.size()` to N or less. Thus it
                                                                                                                                  +
                                                                                                                                  1501 * puts a simple upper bound on #m_rcv_packets_with_gaps's memory; if N = 100 the memory used by
                                                                                                                                  +
                                                                                                                                  1502 * the structure is not much (since we don't store the actual packet data there [but this can get
                                                                                                                                  +
                                                                                                                                  1503 * non-trivial with 100,000 sockets all filled up]). Is it conservative? Yes. 100 packets
                                                                                                                                  +
                                                                                                                                  1504 * arriving after a gap are a near-guarantee those gap packets will never arrive (especially
                                                                                                                                  +
                                                                                                                                  1505 * without retransmission, which is the predicate for this entire problem). Besides, the Drop
                                                                                                                                  +
                                                                                                                                  1506 * heuristics on the Sender side almost certainly will consider gap packets with 100 or near 100
                                                                                                                                  +
                                                                                                                                  1507 * Acknowledged packets after them as Dropped a long time ago; if the receiving side's heuristics
                                                                                                                                  +
                                                                                                                                  1508 * are far more conservative, then that is good enough.
                                                                                                                                  +
                                                                                                                                  1509 *
                                                                                                                                  +
                                                                                                                                  1510 * If retransmission is on, then (as noted) the sender's CWND and retransmission logic will ensure
                                                                                                                                  +
                                                                                                                                  1511 * that gaps are filled before more future data are sent, so the above situation will not occur.
                                                                                                                                  +
                                                                                                                                  1512 * However if the sender is a bad boy and for some reason sends new data and ignores gaps
                                                                                                                                  +
                                                                                                                                  1513 * (possibly malicious behavior), then it would still be a problem. Since in retransmission mode
                                                                                                                                  +
                                                                                                                                  1514 * it's not OK to just ignore lost packets, we have no choice but to drop received packets when
                                                                                                                                  +
                                                                                                                                  1515 * the above situation occurs (similarly to when Receive buffer is exceeded). This is basically a
                                                                                                                                  +
                                                                                                                                  1516 * security measure and should not matter assuming well-behaved operation from the other side.
                                                                                                                                  +
                                                                                                                                  1517 * Update: With retransmission on, this structure is now subject to overflow protection with a tighter
                                                                                                                                  +
                                                                                                                                  1518 * limit than with rexmit-off; namely, the limit controlling #m_rcv_buf overflow actually applies to
                                                                                                                                  +
                                                                                                                                  1519 * the sum of data being stored in #m_rcv_buf and this structure, together. I.e., a packet is dropped
                                                                                                                                  +
                                                                                                                                  1520 * if the total data stored in #m_rcv_buf and #m_rcv_packets_with_gaps equal or exceed the configured
                                                                                                                                  +
                                                                                                                                  1521 * limit. Accordingly, rcv-wnd advertised to other side is based on this sum also.
                                                                                                                                  +
                                                                                                                                  1522 *
                                                                                                                                  +
                                                                                                                                  1523 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1524 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1525 *
                                                                                                                                  +
                                                                                                                                  1526 * @see #m_rcv_reassembly_q_data_size.
                                                                                                                                  +
                                                                                                                                  1527 *
                                                                                                                                  +
                                                                                                                                  1528 * @todo The memory use of this structure could be greatly optimized if, instead of storing each
                                                                                                                                  +
                                                                                                                                  1529 * individual received packet's metadata separately, we always merged contiguous sequence number
                                                                                                                                  +
                                                                                                                                  1530 * ranges. So for example if packet P1, P2, P3 (contiguous) all arrived in sequence, after
                                                                                                                                  +
                                                                                                                                  1531 * missing packet P0, then we'd store P1's first sequence number and the total data size of
                                                                                                                                  +
                                                                                                                                  1532 * P1+P2+P3, in a single `struct` instance. Since a typical pattern might include 1 lost packet
                                                                                                                                  +
                                                                                                                                  1533 * followed by 100 received packets, we'd be able to cut down memory use by a factor of about 100
                                                                                                                                  +
                                                                                                                                  1534 * in that case (and thus worry much less about the limit). Of course the code would get more
                                                                                                                                  +
                                                                                                                                  1535 * complex and potentially slower (but not necessarily significantly).
                                                                                                                                  +
                                                                                                                                  1536 */
                                                                                                                                  + +
                                                                                                                                  1538
                                                                                                                                  +
                                                                                                                                  1539 /**
                                                                                                                                  +
                                                                                                                                  1540 * With retransmission enabled, the sum of Received_packet::m_size over all packets stored in the
                                                                                                                                  +
                                                                                                                                  1541 * reassembly queue, #m_rcv_packets_with_gaps. Stored for performance.
                                                                                                                                  +
                                                                                                                                  1542 *
                                                                                                                                  +
                                                                                                                                  1543 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1544 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1545 */
                                                                                                                                  + +
                                                                                                                                  1547
                                                                                                                                  +
                                                                                                                                  1548 /**
                                                                                                                                  +
                                                                                                                                  1549 * The received packets to be acknowledged in the next low-level ACK packet to be sent to the
                                                                                                                                  +
                                                                                                                                  1550 * other side, ordered in the chronological order they were received. They are accumulated in a
                                                                                                                                  +
                                                                                                                                  1551 * data structure because we may not send each desired acknowledgment right away, combining
                                                                                                                                  +
                                                                                                                                  1552 * several together, thus reducing overhead at the cost of short delays (or even nearly
                                                                                                                                  +
                                                                                                                                  1553 * non-existent delays, as in the case of several DATA packets handled in one
                                                                                                                                  +
                                                                                                                                  1554 * NodeLLlow_lvl_recv_and_handle() invocation, i.e., having arrived at nearly at the same time).
                                                                                                                                  +
                                                                                                                                  1555 *
                                                                                                                                  +
                                                                                                                                  1556 * Any two packets represented by these Individual_ack objects may be duplicates of each other (same
                                                                                                                                  +
                                                                                                                                  1557 * Sequence_number, possibly different Individual_ack::m_received_when values). It's up to the sender (receiver
                                                                                                                                  +
                                                                                                                                  1558 * of ACK) to sort it out. However, again, they MUST be ordered chronologicaly based on the time
                                                                                                                                  +
                                                                                                                                  1559 * when they were received; from earliest to latest.
                                                                                                                                  +
                                                                                                                                  1560 *
                                                                                                                                  +
                                                                                                                                  1561 * Storing shared pointers to avoid copying of structs (however small) during internal
                                                                                                                                  +
                                                                                                                                  1562 * reshuffling; shared instead of raw pointers to not worry about delete.
                                                                                                                                  +
                                                                                                                                  1563 *
                                                                                                                                  +
                                                                                                                                  1564 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1565 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1566 */
                                                                                                                                  +
                                                                                                                                  1567 std::vector<boost::shared_ptr<Individual_ack>> m_rcv_pending_acks;
                                                                                                                                  +
                                                                                                                                  1568
                                                                                                                                  +
                                                                                                                                  1569 /**
                                                                                                                                  +
                                                                                                                                  1570 * Helper state, to be used while inside either Node::low_lvl_recv_and_handle() or
                                                                                                                                  +
                                                                                                                                  1571 * async part of Node::async_wait_latency_then_handle_incoming(), set only at the beginning of either and equal to
                                                                                                                                  +
                                                                                                                                  1572 * `m_rcv_pending_acks.size()` at that time. Because, for efficiency, individual acknowledgements are
                                                                                                                                  +
                                                                                                                                  1573 * accumulated over the course of those two methods, and an ACK with those acknowledgments is
                                                                                                                                  +
                                                                                                                                  1574 * sent at the end of that method (in perform_accumulated_on_recv_tasks()) at the earliest, this
                                                                                                                                  +
                                                                                                                                  1575 * member is used to determine whether we should start a delayed ACK timer at that point.
                                                                                                                                  +
                                                                                                                                  1576 *
                                                                                                                                  +
                                                                                                                                  1577 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  +
                                                                                                                                  1578 * and loses meaning after either method exits. This should NOT
                                                                                                                                  +
                                                                                                                                  1579 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1580 */
                                                                                                                                  + +
                                                                                                                                  1582
                                                                                                                                  +
                                                                                                                                  1583 /**
                                                                                                                                  +
                                                                                                                                  1584 * While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming() is running,
                                                                                                                                  +
                                                                                                                                  1585 * accumulates the individual acknowledgments contained in all incoming ACK low-level packets
                                                                                                                                  +
                                                                                                                                  1586 * received in those methods. More precisely, this accumulates the elements of
                                                                                                                                  +
                                                                                                                                  1587 * `packet.m_rcv_acked_packets` for all packets such that `packet` is an Ack_packet. They are accumulated
                                                                                                                                  +
                                                                                                                                  1588 * in this data structure for a similar reason that outgoing acknowledgments are accumulated in
                                                                                                                                  +
                                                                                                                                  1589 * `Peer_socket::m_rcv_pending_acks`. The situation here is simpler, however, since the present
                                                                                                                                  +
                                                                                                                                  1590 * structure is always scanned and cleared at the end of the current handler and never carried
                                                                                                                                  +
                                                                                                                                  1591 * over to the next, as we always want to scan all individual acks received within a non-blocking
                                                                                                                                  +
                                                                                                                                  1592 * amount of time from receipt. See Node::handle_ack_to_established() for details.
                                                                                                                                  +
                                                                                                                                  1593 *
                                                                                                                                  +
                                                                                                                                  1594 * This structure is empty, accumulated over the course of those methods, is used to finally scan
                                                                                                                                  +
                                                                                                                                  1595 * all individual acknowledgments (in the exact order received), and then cleared for the next
                                                                                                                                  +
                                                                                                                                  1596 * run.
                                                                                                                                  +
                                                                                                                                  1597 *
                                                                                                                                  +
                                                                                                                                  1598 * Storing shared pointers to avoid copying of structs (however small) during internal
                                                                                                                                  +
                                                                                                                                  1599 * reshuffling; shared instead of raw pointers to not worry about delete.
                                                                                                                                  +
                                                                                                                                  1600 *
                                                                                                                                  +
                                                                                                                                  1601 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  +
                                                                                                                                  1602 * and loses meaning after either method exits. This should NOT
                                                                                                                                  +
                                                                                                                                  1603 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1604 */
                                                                                                                                  +
                                                                                                                                  1605 std::vector<Ack_packet::Individual_ack::Ptr> m_rcv_acked_packets;
                                                                                                                                  +
                                                                                                                                  1606
                                                                                                                                  +
                                                                                                                                  1607 /**
                                                                                                                                  +
                                                                                                                                  1608 * While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming() is running,
                                                                                                                                  +
                                                                                                                                  1609 * contains the rcv_wnd (eventual #m_snd_remote_rcv_wnd) value in the last observed ACK low-level
                                                                                                                                  +
                                                                                                                                  1610 * packet received in those methods. The reasoning is similar to #m_rcv_acked_packets. See
                                                                                                                                  +
                                                                                                                                  1611 * Node::handle_ack_to_established() for details.
                                                                                                                                  +
                                                                                                                                  1612 *
                                                                                                                                  +
                                                                                                                                  1613 * This gains meaning only in thread W and only within Node::low_lvl_recv_and_handle()/etc.
                                                                                                                                  +
                                                                                                                                  1614 * and loses meaning after either method exits. This should NOT
                                                                                                                                  +
                                                                                                                                  1615 * be accessed outside of thread W and is not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1616 */
                                                                                                                                  + +
                                                                                                                                  1618
                                                                                                                                  +
                                                                                                                                  1619 /**
                                                                                                                                  +
                                                                                                                                  1620 * The last rcv_wnd value sent to the other side (in an ACK). This is used to gauge how much the
                                                                                                                                  +
                                                                                                                                  1621 * true rcv_wnd has increased since the value that the sender probably (assuming ACK was not lost)
                                                                                                                                  +
                                                                                                                                  1622 * knows.
                                                                                                                                  +
                                                                                                                                  1623 *
                                                                                                                                  +
                                                                                                                                  1624 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1625 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1626 */
                                                                                                                                  + +
                                                                                                                                  1628
                                                                                                                                  +
                                                                                                                                  1629 /**
                                                                                                                                  +
                                                                                                                                  1630 * `true` indicates we are in a state where we've decided other side needs to be informed that
                                                                                                                                  +
                                                                                                                                  1631 * our receive window has increased substantially, so that it can resume sending data (probably
                                                                                                                                  +
                                                                                                                                  1632 * after a zero window being advertised).
                                                                                                                                  +
                                                                                                                                  1633 *
                                                                                                                                  +
                                                                                                                                  1634 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1635 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1636 */
                                                                                                                                  + +
                                                                                                                                  1638
                                                                                                                                  +
                                                                                                                                  1639 /**
                                                                                                                                  +
                                                                                                                                  1640 * Time point at which #m_rcv_in_rcv_wnd_recovery was last set to true. It is only used when the
                                                                                                                                  +
                                                                                                                                  1641 * latter is indeed true.
                                                                                                                                  +
                                                                                                                                  1642 *
                                                                                                                                  +
                                                                                                                                  1643 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1644 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1645 */
                                                                                                                                  + +
                                                                                                                                  1647
                                                                                                                                  +
                                                                                                                                  1648 /**
                                                                                                                                  +
                                                                                                                                  1649 * When #m_rcv_in_rcv_wnd_recovery is `true`, this is the scheduled task to possibly
                                                                                                                                  +
                                                                                                                                  1650 * send another unsolicited rcv_wnd-advertising ACK to the other side.
                                                                                                                                  +
                                                                                                                                  1651 *
                                                                                                                                  +
                                                                                                                                  1652 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1653 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1654 */
                                                                                                                                  + +
                                                                                                                                  1656
                                                                                                                                  +
                                                                                                                                  1657 /**
                                                                                                                                  +
                                                                                                                                  1658 * Timer started, assuming delayed ACKs are enabled, when the first Individual_ack is placed onto
                                                                                                                                  +
                                                                                                                                  1659 * an empty #m_rcv_pending_acks; when it triggers, the pending individual acknowledgments are packed
                                                                                                                                  +
                                                                                                                                  1660 * into as few as possible ACKs and sent to the other side. After the handler exits
                                                                                                                                  +
                                                                                                                                  1661 * #m_rcv_pending_acks is again empty and the process can repeat starting with the next received valid
                                                                                                                                  +
                                                                                                                                  1662 * packet.
                                                                                                                                  +
                                                                                                                                  1663 *
                                                                                                                                  +
                                                                                                                                  1664 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1665 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1666 *
                                                                                                                                  +
                                                                                                                                  1667 * ### Implementation notes ###
                                                                                                                                  +
                                                                                                                                  1668 * In other places we have tended to replace a `Timer` with the far simpler util::schedule_task_from_now() (etc.)
                                                                                                                                  +
                                                                                                                                  1669 * facility (which internally uses a `Timer` but hides its various annoyances and caveats). Why not here?
                                                                                                                                  +
                                                                                                                                  1670 * Answer: This timer is scheduled and fires often (could be on the order of every 1-500 milliseconds) and throughout
                                                                                                                                  +
                                                                                                                                  1671 * a given socket's existence; hence the potential performance effects aren't worth the risk (or at least mental
                                                                                                                                  +
                                                                                                                                  1672 * energy spent on evaluating that risk, originally and over time). The conservative thing to do is reuse a single
                                                                                                                                  +
                                                                                                                                  1673 * `Timer` repeatedly, as we do here.
                                                                                                                                  +
                                                                                                                                  1674 */
                                                                                                                                  + +
                                                                                                                                  1676
                                                                                                                                  +
                                                                                                                                  1677 /// Stats regarding incoming traffic (and resulting outgoing ACKs) for this connection so far.
                                                                                                                                  + +
                                                                                                                                  1679
                                                                                                                                  +
                                                                                                                                  1680 /**
                                                                                                                                  +
                                                                                                                                  1681 * The Initial Sequence Number (ISN) used in our original SYN or SYN_ACK. Useful at least in re-sending the
                                                                                                                                  +
                                                                                                                                  1682 * original SYN or SYN_ACK if unacknowledged for too long.
                                                                                                                                  +
                                                                                                                                  1683 *
                                                                                                                                  +
                                                                                                                                  1684 * @see #m_snd_flying_pkts_by_seq_num and #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  +
                                                                                                                                  1685 *
                                                                                                                                  +
                                                                                                                                  1686 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1687 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1688 */
                                                                                                                                  + +
                                                                                                                                  1690
                                                                                                                                  +
                                                                                                                                  1691 /**
                                                                                                                                  +
                                                                                                                                  1692 * The sequence number for the start of the data in the next new DATA packet to be sent out. By
                                                                                                                                  +
                                                                                                                                  1693 * "new" I mean not-retransmitted (assuming retransmission is even enabled).
                                                                                                                                  +
                                                                                                                                  1694 *
                                                                                                                                  +
                                                                                                                                  1695 * @todo Possibly #m_snd_next_seq_num will apply to other packet types than DATA, probably anything to do with
                                                                                                                                  +
                                                                                                                                  1696 * connection termination.
                                                                                                                                  +
                                                                                                                                  1697 *
                                                                                                                                  +
                                                                                                                                  1698 * @see #m_snd_flying_pkts_by_seq_num and #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  +
                                                                                                                                  1699 *
                                                                                                                                  +
                                                                                                                                  1700 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1701 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1702 */
                                                                                                                                  + +
                                                                                                                                  1704
                                                                                                                                  +
                                                                                                                                  1705 /**
                                                                                                                                  +
                                                                                                                                  1706 * The collection of all In-flight packets, indexed by sequence number and ordered from most to
                                                                                                                                  +
                                                                                                                                  1707 * least recently sent (including those queued up to wire-send in pacing module). See also
                                                                                                                                  +
                                                                                                                                  1708 * #m_snd_flying_pkts_by_seq_num which is a similar map but in order of sequence number.
                                                                                                                                  +
                                                                                                                                  1709 * That map's keys are again sequence numbers, but its values are iterators into the present map
                                                                                                                                  +
                                                                                                                                  1710 * to save memory and avoid having to sync up data between the two (the only thing we must sync between them
                                                                                                                                  +
                                                                                                                                  1711 * are their key sets). The two maps together can be considered to be the sender-side "scoreboard."
                                                                                                                                  +
                                                                                                                                  1712 *
                                                                                                                                  +
                                                                                                                                  1713 * These are all the packets that have been sent but not Acknowledged that we have not yet considered
                                                                                                                                  +
                                                                                                                                  1714 * Dropped. (With retransmission on, packets are never considered
                                                                                                                                  +
                                                                                                                                  1715 * permanently Dropped, but they are considered Dropped until retransmitted.) With retransmission
                                                                                                                                  +
                                                                                                                                  1716 * off, the ultimate goal of having this structure at all is to handle ACKs, the ultimate goal of
                                                                                                                                  +
                                                                                                                                  1717 * which is, in turn, for the In-flight vs. Congestion Window comparison for congestion control.
                                                                                                                                  +
                                                                                                                                  1718 * With retransmission on, the structure additionally stores the data in the In-flight packets, so
                                                                                                                                  +
                                                                                                                                  1719 * that they can be retransmitted if we determine they were probably dropped.
                                                                                                                                  +
                                                                                                                                  1720 *
                                                                                                                                  +
                                                                                                                                  1721 * With retransmission on, this is NOT the retransmission queue itself -- i.e., this does NOT
                                                                                                                                  +
                                                                                                                                  1722 * store packet data that we know should be retransmitted when possible but rather only the data
                                                                                                                                  +
                                                                                                                                  1723 * already In-flight (whether from first attempt or from retransmission).
                                                                                                                                  +
                                                                                                                                  1724 *
                                                                                                                                  +
                                                                                                                                  1725 * Please see #m_snd_flying_pkts_by_seq_num for a breakdown of the sequence number space.
                                                                                                                                  +
                                                                                                                                  1726 * Since that structure contains iterators to exactly the values in the present map, that comment will
                                                                                                                                  +
                                                                                                                                  1727 * explain which packets are in the present map.
                                                                                                                                  +
                                                                                                                                  1728 *
                                                                                                                                  +
                                                                                                                                  1729 * #m_snd_flying_pkts_by_sent_when contains In-flight Sent_packet objects as values, with each particular
                                                                                                                                  +
                                                                                                                                  1730 * Sent_packet's first sequence number as its key. If there are no In-flight Sent_packet objects, then
                                                                                                                                  +
                                                                                                                                  1731 * `m_snd_flying_pkts_by_sent_when.empty()`.
                                                                                                                                  +
                                                                                                                                  1732 *
                                                                                                                                  +
                                                                                                                                  1733 * The above is an invariant, to be true at the end of each boost.asio handler in thread W, at
                                                                                                                                  +
                                                                                                                                  1734 * least.
                                                                                                                                  +
                                                                                                                                  1735 *
                                                                                                                                  +
                                                                                                                                  1736 * Each sent packet therefore is placed into #m_snd_flying_pkts_by_sent_when, at the front (as is standard
                                                                                                                                  +
                                                                                                                                  1737 * for a Linked_hash_map, and as is expected, since they are ordered by send time). (Note, however,
                                                                                                                                  +
                                                                                                                                  1738 * that being in this map does not mean it has been sent; it may only be queued up to be sent and
                                                                                                                                  +
                                                                                                                                  1739 * waiting in the pacing module; however, pacing does not change the order of packets but merely
                                                                                                                                  +
                                                                                                                                  1740 * the exact send moment, which cannot change the position in this queue.)
                                                                                                                                  +
                                                                                                                                  1741 * When a packet is Acknowledged, it is removed from #m_snd_flying_pkts_by_sent_when -- could be from anywhere
                                                                                                                                  +
                                                                                                                                  1742 * in the ordering. Similarly to Acknowledged packets, Dropped ones are also removed.
                                                                                                                                  +
                                                                                                                                  1743 *
                                                                                                                                  +
                                                                                                                                  1744 * The type used is a map indexed by starting sequence number of each packet but also in order of
                                                                                                                                  +
                                                                                                                                  1745 * being sent out. Lookup by sequence number is near constant time; insertion near the end is
                                                                                                                                  +
                                                                                                                                  1746 * near constant time; and iteration by order of when it was sent out is easy/fast, with iterators
                                                                                                                                  +
                                                                                                                                  1747 * remaining valid as long as the underlying elements are not erased. Why use this particular
                                                                                                                                  +
                                                                                                                                  1748 * structure? Well, the lookup by sequence number occurs all the time, such as when matching up
                                                                                                                                  +
                                                                                                                                  1749 * an arriving acknowledgment against a packet that we'd sent out. We'd prefer it to not invalidate
                                                                                                                                  +
                                                                                                                                  1750 * iterators when something is erased, so Linked_hash_map is good in that way
                                                                                                                                  +
                                                                                                                                  1751 * also. So finally, why order by time it was queued up for sending (as opposed to by sequence
                                                                                                                                  +
                                                                                                                                  1752 * number, as would be the case if this were an std::map)? In truth, both are needed, which is why
                                                                                                                                  +
                                                                                                                                  1753 * #m_snd_flying_pkts_by_seq_num exists. This ordering is needed particularly for the
                                                                                                                                  +
                                                                                                                                  1754 * `m_acks_after_me` logic, wherein we count how many times packets that were sent after a given packet
                                                                                                                                  +
                                                                                                                                  1755 * have been acknowledged so far; by arranging the packets in that same order, that value can be
                                                                                                                                  +
                                                                                                                                  1756 * easily and quickly accumulated by walking back from the most recently sent packet. On the other
                                                                                                                                  +
                                                                                                                                  1757 * hand, some operations need sequence number ordering, which is why we have #m_snd_flying_pkts_by_seq_num;
                                                                                                                                  +
                                                                                                                                  1758 * note (again) that the two maps have the same key set, with one's values being iterators pointing into
                                                                                                                                  +
                                                                                                                                  1759 * the other.
                                                                                                                                  +
                                                                                                                                  1760 *
                                                                                                                                  +
                                                                                                                                  1761 * Whenever a packet with `m_sent_when.back().m_sent_time == T` is acknowledged, we need to (by definition of
                                                                                                                                  +
                                                                                                                                  1762 * Sent_packet::m_acks_after_me) increment `m_acks_after_me` for each packet with
                                                                                                                                  +
                                                                                                                                  1763 * `m_sent_when.back().m_sent_time < T`. So, if we
                                                                                                                                  +
                                                                                                                                  1764 * find the latest-sent element that satisfies that, then all packets appearing to the right
                                                                                                                                  +
                                                                                                                                  1765 * (i.e., "sent less recently than") and including that one, in this ordering, should have `m_acks_after_me`
                                                                                                                                  +
                                                                                                                                  1766 * incremented. Using a certain priority queue-using algorithm (see Node::handle_accumulated_acks())
                                                                                                                                  +
                                                                                                                                  1767 * we can do this quite efficiently.
                                                                                                                                  +
                                                                                                                                  1768 *
                                                                                                                                  +
                                                                                                                                  1769 * Note that this means Sent_packet::m_acks_after_me is strictly increasing as one walks this map.
                                                                                                                                  +
                                                                                                                                  1770 *
                                                                                                                                  +
                                                                                                                                  1771 * Since any packet with `m_acks_after_me >= C`, where `C` is some constant, is considered Dropped and
                                                                                                                                  +
                                                                                                                                  1772 * removed from #m_snd_flying_pkts_by_seq_num and therefore this map also, we also get the property that
                                                                                                                                  +
                                                                                                                                  1773 * if we find a packet in this map for which that is true, then it is also true for all packets
                                                                                                                                  +
                                                                                                                                  1774 * following it ("sent less recently" than it) in this map. This allows us to more quickly determine which
                                                                                                                                  +
                                                                                                                                  1775 * packets should be removed from #m_snd_flying_pkts_by_sent_when, without having to walk the entire structure(s).
                                                                                                                                  +
                                                                                                                                  1776 *
                                                                                                                                  +
                                                                                                                                  1777 * ### Memory use ###
                                                                                                                                  +
                                                                                                                                  1778 * This structure's memory use is naturally bounded by the Congestion Window.
                                                                                                                                  +
                                                                                                                                  1779 * Congestion control will not let it grow beyond that many packets (bytes really, but you get the point).
                                                                                                                                  +
                                                                                                                                  1780 * At that point blocks will stay on the Send buffer, until that fills up too. Then send() will refuse to enqueue
                                                                                                                                  +
                                                                                                                                  1781 * any more packets (telling the user as much).
                                                                                                                                  +
                                                                                                                                  1782 *
                                                                                                                                  +
                                                                                                                                  1783 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1784 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1785 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1786 *
                                                                                                                                  +
                                                                                                                                  1787 * @see Sent_when and Sent_packet::m_sent_when, where if `X` is the the last element of the latter sequence, then
                                                                                                                                  +
                                                                                                                                  1788 * `X.m_sent_time` is the value by which elements in the present map are ordered. However, this only
                                                                                                                                  +
                                                                                                                                  1789 * happens to be the case, because by definition an element
                                                                                                                                  +
                                                                                                                                  1790 * is always placed at the front of the present map (Linked_hash_map), and this order is inductively maintained;
                                                                                                                                  +
                                                                                                                                  1791 * AND MEANWHILE A Sent_when::m_sent_time's constructed value can only increase over time (which is a guaranteed
                                                                                                                                  +
                                                                                                                                  1792 * property of the clock we use (::Fine_clock)).
                                                                                                                                  +
                                                                                                                                  1793 * @see #m_snd_flying_bytes, which must always be updated to be accurate w/r/t
                                                                                                                                  +
                                                                                                                                  1794 * #m_snd_flying_pkts_by_sent_when. Use Node::snd_flying_pkts_updated() whenever
                                                                                                                                  +
                                                                                                                                  1795 * #m_snd_flying_pkts_by_sent_when is changed.
                                                                                                                                  +
                                                                                                                                  1796 * @see #m_snd_flying_pkts_by_seq_num, which provides an ordering of the elements of
                                                                                                                                  +
                                                                                                                                  1797 * #m_snd_flying_pkts_by_sent_when by sequence number. Whereas the present structure is used to
                                                                                                                                  +
                                                                                                                                  1798 * determine `m_acks_after_me` (since logically "after" means "sent after"), `..._by_seq_num`
                                                                                                                                  +
                                                                                                                                  1799 * is akin to the more classic TCP scoreboard, which is used to subdivide the sequence number
                                                                                                                                  +
                                                                                                                                  1800 * space (closely related to #m_snd_next_seq_num and such). With
                                                                                                                                  +
                                                                                                                                  1801 * retransmission off, "after" would simply mean "having higher sequence number," so
                                                                                                                                  +
                                                                                                                                  1802 * #m_snd_flying_pkts_by_sent_when would already provide this ordering, but with retransmission on
                                                                                                                                  +
                                                                                                                                  1803 * a retransmitted packet with a lower number could be sent after one with a higher number.
                                                                                                                                  +
                                                                                                                                  1804 * To make the code simpler, we therefore rely on a separate structure in either situation.
                                                                                                                                  +
                                                                                                                                  1805 */
                                                                                                                                  + +
                                                                                                                                  1807
                                                                                                                                  +
                                                                                                                                  1808 /**
                                                                                                                                  +
                                                                                                                                  1809 * The collection of all In-flight packets (including those queued up to send in pacing module),
                                                                                                                                  +
                                                                                                                                  1810 * indexed AND ordered by sequence number. See also #m_snd_flying_pkts_by_sent_when which is a similar map
                                                                                                                                  +
                                                                                                                                  1811 * but in order of time sent. Our map's keys are sequence numbers again, but its values are iterators
                                                                                                                                  +
                                                                                                                                  1812 * into #m_snd_flying_pkts_by_sent_when to save memory and avoid having to sync up data between the two
                                                                                                                                  +
                                                                                                                                  1813 * (only keys are in sync). The two maps together can be considered to be the "scoreboard," though in fact
                                                                                                                                  +
                                                                                                                                  1814 * the present structure alone is closer to a classic TCP scoreboard.
                                                                                                                                  +
                                                                                                                                  1815 *
                                                                                                                                  +
                                                                                                                                  1816 * The key sets of the two maps are identical. The values in this map are iterators to exactly all
                                                                                                                                  +
                                                                                                                                  1817 * elements of #m_snd_flying_pkts_by_sent_when. One can think of the present map as essentially achieving an
                                                                                                                                  +
                                                                                                                                  1818 * alternate ordering of the values in the other map.
                                                                                                                                  +
                                                                                                                                  1819 *
                                                                                                                                  +
                                                                                                                                  1820 * That said, the structure's contents and ordering are closely related to a breakdown of the sequence
                                                                                                                                  +
                                                                                                                                  1821 * number space. I provide this breakdown here. I list the
                                                                                                                                  +
                                                                                                                                  1822 * sequence number ranges in increasing order starting with the ISN. Let `first_flying_seq_num
                                                                                                                                  +
                                                                                                                                  1823 * = m_snd_flying_pkts_by_seq_num.begin()->first` (i.e., the first key Sequence_number in
                                                                                                                                  +
                                                                                                                                  1824 * #m_snd_flying_pkts_by_seq_num) for exposition purposes.
                                                                                                                                  +
                                                                                                                                  1825 *
                                                                                                                                  +
                                                                                                                                  1826 * - #m_snd_init_seq_num =
                                                                                                                                  +
                                                                                                                                  1827 * - SYN or SYN_ACK
                                                                                                                                  +
                                                                                                                                  1828 *
                                                                                                                                  +
                                                                                                                                  1829 * - [`m_snd_init_seq_num + 1`, `first_flying_seq_num - 1`] =
                                                                                                                                  +
                                                                                                                                  1830 * - Largest possible range of sequence numbers such that each datum represented by this range
                                                                                                                                  +
                                                                                                                                  1831 * has been sent and either:
                                                                                                                                  +
                                                                                                                                  1832 * - Acknowledged (ACK received for it); or
                                                                                                                                  +
                                                                                                                                  1833 * - Dropped (ACK not received; we consider it dropped due to some factor like timeout or
                                                                                                                                  +
                                                                                                                                  1834 * duplicate ACKs);
                                                                                                                                  +
                                                                                                                                  1835 *
                                                                                                                                  +
                                                                                                                                  1836 * - [`first_flying_seq_num`, `first_flying_seq_num + N - 1`] =
                                                                                                                                  +
                                                                                                                                  1837 * - The first packet that has been sent that is neither Acknowledged nor Dropped. `N` is length
                                                                                                                                  +
                                                                                                                                  1838 * of that packet. This is always the first packet, if any, to be considered Dropped in the
                                                                                                                                  +
                                                                                                                                  1839 * future. This packet is categorized In-flight.
                                                                                                                                  +
                                                                                                                                  1840 *
                                                                                                                                  +
                                                                                                                                  1841 * - [`first_flying_seq_num + N`, `m_snd_next_seq_num - 1`] =
                                                                                                                                  +
                                                                                                                                  1842 * - All remaining sent packets. Each packet in this range is one of the following:
                                                                                                                                  +
                                                                                                                                  1843 * - Acknowledged;
                                                                                                                                  +
                                                                                                                                  1844 * - not Acknowledged and not Dropped = categorized In-flight.
                                                                                                                                  +
                                                                                                                                  1845 *
                                                                                                                                  +
                                                                                                                                  1846 * - [#m_snd_next_seq_num, ...] =
                                                                                                                                  +
                                                                                                                                  1847 * - Unsent packets, if any.
                                                                                                                                  +
                                                                                                                                  1848 *
                                                                                                                                  +
                                                                                                                                  1849 * #m_snd_flying_pkts_by_sent_when and #m_snd_flying_pkts_by_seq_num contain In-flight Sent_packet objects as values
                                                                                                                                  +
                                                                                                                                  1850 * (though the latter indirectly via iterator into the former) with each particular Sent_packet's first sequence
                                                                                                                                  +
                                                                                                                                  1851 * number as its key in either structure. If there are no In-flight Sent_packet objects, then
                                                                                                                                  +
                                                                                                                                  1852 * `m_snd_flying_pkts_by_{sent_when|seq_num}.empty()` and hence `first_flying_seq_num` above does not
                                                                                                                                  +
                                                                                                                                  1853 * exist. Each of the [ranges] above can be null (empty).
                                                                                                                                  +
                                                                                                                                  1854 *
                                                                                                                                  +
                                                                                                                                  1855 * Each sent packet therefore is placed into #m_snd_flying_pkts_by_seq_num, at the back (if it's a new packet) or
                                                                                                                                  +
                                                                                                                                  1856 * possibly elsewhere (if it's retransmitted) -- while it is also placed into #m_snd_flying_pkts_by_sent_when but
                                                                                                                                  +
                                                                                                                                  1857 * always at the front (as, regardless of retransmission or anything else, it is the latest packet to be SENT). When
                                                                                                                                  +
                                                                                                                                  1858 * packet is Acknowledged, it is removed from `m_snd_flying_pkts_by_*` -- could be from anywhere in
                                                                                                                                  +
                                                                                                                                  1859 * the ordering. Similarly to Acknowledged packets, Dropped ones are also removed.
                                                                                                                                  +
                                                                                                                                  1860 *
                                                                                                                                  +
                                                                                                                                  1861 * Why do we need this map type in addition to `Linked_hash_map m_snd_flying_pkts_by_sent_when`? Answer: Essentially,
                                                                                                                                  +
                                                                                                                                  1862 * when an acknowledgment comes in, we need to be able to determine where in the sequence number space this is.
                                                                                                                                  +
                                                                                                                                  1863 * If packets are ordered by send time -- not sequence number -- and the sequence number does not match
                                                                                                                                  +
                                                                                                                                  1864 * exactly one of the elements here (e.g., it erroneously straddles one, or it is a duplicate acknowledgement,
                                                                                                                                  +
                                                                                                                                  1865 * which means that element isn't in the map any longer), then a tree-sorted-by-key map is invaluable
                                                                                                                                  +
                                                                                                                                  1866 * (in particular: to get `upper_bound()`, and also to travel to the previous-by-sequence-number packet
                                                                                                                                  +
                                                                                                                                  1867 * from the latter). So logarithmic-time upper-bound searches and iteration by sequence number are what we want and
                                                                                                                                  +
                                                                                                                                  1868 * get with this added ordering on top of #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  +
                                                                                                                                  1869 *
                                                                                                                                  +
                                                                                                                                  1870 * ### Memory use ###
                                                                                                                                  +
                                                                                                                                  1871 * This structure's memory use is naturally bounded the same as #m_snd_flying_pkts_by_sent_when.
                                                                                                                                  +
                                                                                                                                  1872 *
                                                                                                                                  +
                                                                                                                                  1873 * ### Thread safety ###
                                                                                                                                  +
                                                                                                                                  1874 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1875 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1876 *
                                                                                                                                  +
                                                                                                                                  1877 * @see #m_snd_flying_pkts_by_sent_when. There's a "see also" comment there that contrasts these two
                                                                                                                                  +
                                                                                                                                  1878 * important structures.
                                                                                                                                  +
                                                                                                                                  1879 */
                                                                                                                                  + +
                                                                                                                                  1881
                                                                                                                                  +
                                                                                                                                  1882 /**
                                                                                                                                  +
                                                                                                                                  1883 * The number of bytes contained in all In-flight packets, used at least for comparison against
                                                                                                                                  +
                                                                                                                                  1884 * the congestion window (CWND). More formally, this is the sum of all Sent_packet::m_size values
                                                                                                                                  +
                                                                                                                                  1885 * in #m_snd_flying_pkts_by_sent_when. We keep this, instead of computing it whenever needed, for
                                                                                                                                  +
                                                                                                                                  1886 * performance. In various TCP and related RFCs this value (or something spiritually similar, if
                                                                                                                                  +
                                                                                                                                  1887 * only cumulative ACKs are used) is called "pipe" or "FlightSize."
                                                                                                                                  +
                                                                                                                                  1888 *
                                                                                                                                  +
                                                                                                                                  1889 * Though in protocols like DCCP, where CWND is stored in packets, instead of bytes, "pipe" is
                                                                                                                                  +
                                                                                                                                  1890 * actually just `m_snd_flying_pkts_by_sent_when.size()`. Not for us though.
                                                                                                                                  +
                                                                                                                                  1891 *
                                                                                                                                  +
                                                                                                                                  1892 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1893 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1894 *
                                                                                                                                  +
                                                                                                                                  1895 * @see #m_snd_flying_pkts_by_sent_when, which must always be updated to be accurate w/r/t
                                                                                                                                  +
                                                                                                                                  1896 * #m_snd_flying_bytes. Use Node::snd_flying_pkts_updated() whenever #m_snd_flying_pkts_by_sent_when
                                                                                                                                  +
                                                                                                                                  1897 * is changed.
                                                                                                                                  +
                                                                                                                                  1898 */
                                                                                                                                  + +
                                                                                                                                  1900
                                                                                                                                  +
                                                                                                                                  1901 /**
                                                                                                                                  +
                                                                                                                                  1902 * Helper data structure to store the packet IDs of packets that are marked Dropped during a single run
                                                                                                                                  +
                                                                                                                                  1903 * through accumulated ACKs; it is a data member instead of local variable for performance only. The pattern is
                                                                                                                                  +
                                                                                                                                  1904 * to simply `clear()` it just before use, then load it up with stuff in that same round of ACK handling;
                                                                                                                                  +
                                                                                                                                  1905 * and the same thing each time we need to handle accumulated ACKs. Normally one would just create one
                                                                                                                                  +
                                                                                                                                  1906 * of these locally within the code `{` block `}` each time instead.
                                                                                                                                  +
                                                                                                                                  1907 * Not doing so avoids unnecessary various internal-to-`vector` buffer
                                                                                                                                  +
                                                                                                                                  1908 * allocations. Instead the internal buffer will grow as large as it needs to and not go down from there, so
                                                                                                                                  +
                                                                                                                                  1909 * that it can be reused in subsequent operations. (Even `clear()` does not internally shrink the buffer.)
                                                                                                                                  +
                                                                                                                                  1910 * Of course some memory is held unnecessarily, but it's a small amount; on the other hand the performance
                                                                                                                                  +
                                                                                                                                  1911 * gain may be non-trivial due to the frequency of the ACK-handling code being invoked.
                                                                                                                                  +
                                                                                                                                  1912 *
                                                                                                                                  +
                                                                                                                                  1913 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1914 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1915 */
                                                                                                                                  +
                                                                                                                                  1916 std::vector<order_num_t> m_snd_temp_pkts_marked_to_drop;
                                                                                                                                  +
                                                                                                                                  1917
                                                                                                                                  +
                                                                                                                                  1918 /**
                                                                                                                                  +
                                                                                                                                  1919 * For the Sent_packet representing the next packet to be sent, this is the value to assign to
                                                                                                                                  +
                                                                                                                                  1920 * `m_sent_when.back().first`. In other words it's an ever-increasing number that is sort of like
                                                                                                                                  +
                                                                                                                                  1921 * a sequence number but one per packet and represents time at which sent, not order in the byte stream.
                                                                                                                                  +
                                                                                                                                  1922 * In particular the same packet retransmitted will have the same sequence number the 2nd time but
                                                                                                                                  +
                                                                                                                                  1923 * an increased order number. Starts at 0.
                                                                                                                                  +
                                                                                                                                  1924 *
                                                                                                                                  +
                                                                                                                                  1925 * This is only used for book-keeping locally and never transmitted over network.
                                                                                                                                  +
                                                                                                                                  1926 *
                                                                                                                                  +
                                                                                                                                  1927 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1928 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1929 */
                                                                                                                                  + +
                                                                                                                                  1931
                                                                                                                                  +
                                                                                                                                  1932 /**
                                                                                                                                  +
                                                                                                                                  1933 * If retransmission is on, this is the retransmission queue. It's the queue of packets determined to have
                                                                                                                                  +
                                                                                                                                  1934 * been dropped and thus to be retransmitted, when Congestion Window allows this. Packet in Sent_packet::m_packet
                                                                                                                                  +
                                                                                                                                  1935 * field of element at top of the queue is to be retransmitted next; and the element itself is to be inserted into
                                                                                                                                  +
                                                                                                                                  1936 * #m_snd_flying_pkts_by_sent_when while popped from the present structure. The packet's Data_packet::m_rexmit_id
                                                                                                                                  +
                                                                                                                                  1937 * should be incremented before sending; and the Sent_packet::m_sent_when `vector` should be appended with the
                                                                                                                                  +
                                                                                                                                  1938 * then-current time (for future RTT calculation).
                                                                                                                                  +
                                                                                                                                  1939 *
                                                                                                                                  +
                                                                                                                                  1940 * If retransmission is off, this is empty.
                                                                                                                                  +
                                                                                                                                  1941 *
                                                                                                                                  +
                                                                                                                                  1942 * Why use `list<>` and not `queue<>` or `deque<>`? Answer: I'd like to use `list::splice()`.
                                                                                                                                  +
                                                                                                                                  1943 *
                                                                                                                                  +
                                                                                                                                  1944 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1945 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1946 */
                                                                                                                                  +
                                                                                                                                  1947 std::list<boost::shared_ptr<Sent_packet>> m_snd_rexmit_q;
                                                                                                                                  +
                                                                                                                                  1948
                                                                                                                                  +
                                                                                                                                  1949 /// Equals `m_snd_rexmit_q.size().` Kept since `m_snd_rexmit_q.size()` may be @em O(n) depending on implementation.
                                                                                                                                  + +
                                                                                                                                  1951
                                                                                                                                  +
                                                                                                                                  1952 /**
                                                                                                                                  +
                                                                                                                                  1953 * The congestion control strategy in use for this connection on this side. Node informs
                                                                                                                                  +
                                                                                                                                  1954 * this object of events, such as acknowedgments and loss events; conversely this object informs
                                                                                                                                  +
                                                                                                                                  1955 * (or can inform if asked) the Node whether or not DATA packets can be sent, by means of
                                                                                                                                  +
                                                                                                                                  1956 * providing the Node with the socket's current Congestion Window (CWND) computed based on the
                                                                                                                                  +
                                                                                                                                  1957 * particular Congestion_control_strategy implementation's algorithm (e.g., Reno or Westwood+).
                                                                                                                                  +
                                                                                                                                  1958 * Node then determines whether data can be sent by comparing #m_snd_flying_bytes (# of bytes we think
                                                                                                                                  +
                                                                                                                                  1959 * are currently In-flight) to CWND (# of bytes the strategy allows to be In-flight currently).
                                                                                                                                  +
                                                                                                                                  1960 *
                                                                                                                                  +
                                                                                                                                  1961 * ### Life cycle ###
                                                                                                                                  +
                                                                                                                                  1962 * #m_snd_cong_ctl must be initialized to an instance before user gains access to this
                                                                                                                                  +
                                                                                                                                  1963 * socket; the pointer must never change subsequently except back to null (permanently). The
                                                                                                                                  +
                                                                                                                                  1964 * Peer_socket destructor, at the latest, will delete the underlying object, as #m_snd_cong_ctl
                                                                                                                                  +
                                                                                                                                  1965 * will be destructed. (Note `unique_ptr` has no copy operator or
                                                                                                                                  +
                                                                                                                                  1966 * constructor.) There is a 1-to-1 relationship between `*this` and #m_snd_cong_ctl.
                                                                                                                                  +
                                                                                                                                  1967 *
                                                                                                                                  +
                                                                                                                                  1968 * ### Visibility between Congestion_control_strategy and Peer_socket ###
                                                                                                                                  +
                                                                                                                                  1969 * #m_snd_cong_ctl gets read-only (`const`!) but otherwise complete
                                                                                                                                  +
                                                                                                                                  1970 * private access (via `friend`) to the contents of `*this` Peer_socket. For example, it can
                                                                                                                                  +
                                                                                                                                  1971 * read `this->m_snd_smoothed_round_trip_time` (the SRTT) and use it
                                                                                                                                  +
                                                                                                                                  1972 * for computations if needed. Node and Peer_socket get only strict public API access to
                                                                                                                                  +
                                                                                                                                  1973 * #m_snd_cong_ctl, which is a black box to it.
                                                                                                                                  +
                                                                                                                                  1974 *
                                                                                                                                  +
                                                                                                                                  1975 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1976 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1977 */
                                                                                                                                  +
                                                                                                                                  1978 boost::movelib::unique_ptr<Congestion_control_strategy> m_snd_cong_ctl;
                                                                                                                                  +
                                                                                                                                  1979
                                                                                                                                  +
                                                                                                                                  1980 /**
                                                                                                                                  +
                                                                                                                                  1981 * The receive window: the maximum number of bytes the other side has advertised it would be
                                                                                                                                  +
                                                                                                                                  1982 * willing to accept into its Receive buffer if they'd arrived at the moment that advertisement
                                                                                                                                  +
                                                                                                                                  1983 * was generated by the other side. This starts as 0 (undefined) and is originally set at SYN_ACK
                                                                                                                                  +
                                                                                                                                  1984 * or SYN_ACK_ACK receipt and then subsequently updated upon each ACK received. Each such update
                                                                                                                                  +
                                                                                                                                  1985 * is called a "rcv_wnd update" or "window update."
                                                                                                                                  +
                                                                                                                                  1986 *
                                                                                                                                  +
                                                                                                                                  1987 * #m_snd_cong_ctl provides congestion control; this value provides flow control. The socket's
                                                                                                                                  +
                                                                                                                                  1988 * state machine must be extremely careful whenever either this value or
                                                                                                                                  +
                                                                                                                                  1989 * `m_snd_cong_ctl->congestion_window_bytes()` may increase, as when that occurs it should call
                                                                                                                                  +
                                                                                                                                  1990 * Node::send_worker() in order to possibly send data over the network.
                                                                                                                                  +
                                                                                                                                  1991 *
                                                                                                                                  +
                                                                                                                                  1992 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  1993 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  1994 */
                                                                                                                                  + +
                                                                                                                                  1996
                                                                                                                                  +
                                                                                                                                  1997 /**
                                                                                                                                  +
                                                                                                                                  1998 * The outgoing available bandwidth estimator for this connection on this side. Node informs
                                                                                                                                  +
                                                                                                                                  1999 * this object of events, namely as acknowedgments; conversely this object informs
                                                                                                                                  +
                                                                                                                                  2000 * (or can inform if asked) the Node what it thinks is the current available bandwidth for
                                                                                                                                  +
                                                                                                                                  2001 * user data in DATA packets. This can be useful at least for some forms of congestion control
                                                                                                                                  +
                                                                                                                                  2002 * but possibly as information for the user, which is why it's an independent object and not
                                                                                                                                  +
                                                                                                                                  2003 * part of a specific congestion control strategy (I only mention this because the mechanics of such
                                                                                                                                  +
                                                                                                                                  2004 * a bandwidth estimator typically originate in service of a congestion control algorithm like Westwood+).
                                                                                                                                  +
                                                                                                                                  2005 *
                                                                                                                                  +
                                                                                                                                  2006 * ### Life cycle ###
                                                                                                                                  +
                                                                                                                                  2007 * It must be initialized to an instance before user gains access to this
                                                                                                                                  +
                                                                                                                                  2008 * socket; the pointer must never change subsequently except back to null (permanently). The
                                                                                                                                  +
                                                                                                                                  2009 * Peer_socket destructor, at the latest, will delete the underlying object, as #m_snd_bandwidth_estimator
                                                                                                                                  +
                                                                                                                                  2010 * is destroyed along with `*this`. The only reason it's a pointer is that it takes a Const_ptr in the constructor,
                                                                                                                                  +
                                                                                                                                  2011 * and that's not available during Peer_socket construction yet. (Note `unique_ptr` has no copy operator or
                                                                                                                                  +
                                                                                                                                  2012 * constructor.) There is a 1-to-1 relationship between `*this` and #m_snd_bandwidth_estimator.
                                                                                                                                  +
                                                                                                                                  2013 *
                                                                                                                                  +
                                                                                                                                  2014 * ### Visibility between Send_bandwidth_estimator and Peer_socket ###
                                                                                                                                  +
                                                                                                                                  2015 * The former gets read-only (`const`!) but otherwise complete private access (via `friend`) to the contents of
                                                                                                                                  +
                                                                                                                                  2016 * `*this` Peer_socket. For example, it can read #m_snd_smoothed_round_trip_time (the SRTT) and use it
                                                                                                                                  +
                                                                                                                                  2017 * for computations if needed. Node and Peer_socket get only strict public API access to
                                                                                                                                  +
                                                                                                                                  2018 * #m_snd_bandwidth_estimator, which is a black box to it.
                                                                                                                                  +
                                                                                                                                  2019 *
                                                                                                                                  +
                                                                                                                                  2020 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2021 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2022 */
                                                                                                                                  +
                                                                                                                                  2023 boost::movelib::unique_ptr<Send_bandwidth_estimator> m_snd_bandwidth_estimator;
                                                                                                                                  +
                                                                                                                                  2024
                                                                                                                                  +
                                                                                                                                  2025 /**
                                                                                                                                  +
                                                                                                                                  2026 * Estimated current round trip time of packets, computed as a smooth value over the
                                                                                                                                  +
                                                                                                                                  2027 * past individual RTT measurements. This is updated each time we make an RTT measurement (i.e.,
                                                                                                                                  +
                                                                                                                                  2028 * receive a valid, non-duplicate acknowledgment of a packet we'd sent). The algorithm to compute
                                                                                                                                  +
                                                                                                                                  2029 * it is taken from RFC 6298. The value is 0 (not a legal value otherwise) until the first RTT
                                                                                                                                  +
                                                                                                                                  2030 * measurement is made.
                                                                                                                                  +
                                                                                                                                  2031 *
                                                                                                                                  +
                                                                                                                                  2032 * We use #Fine_duration (the high fine-grainedness and large bit width corresponding to #Fine_clock) to
                                                                                                                                  +
                                                                                                                                  2033 * store this, and the algorithm we use to compute it avoids losing digits via unnecessary
                                                                                                                                  +
                                                                                                                                  2034 * conversions between units (e.g., nanoseconds -> milliseconds).
                                                                                                                                  +
                                                                                                                                  2035 *
                                                                                                                                  +
                                                                                                                                  2036 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2037 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2038 */
                                                                                                                                  + +
                                                                                                                                  2040
                                                                                                                                  +
                                                                                                                                  2041 /// RTTVAR used for #m_snd_smoothed_round_trip_time calculation. @see #m_snd_smoothed_round_trip_time.
                                                                                                                                  + +
                                                                                                                                  2043
                                                                                                                                  +
                                                                                                                                  2044 /**
                                                                                                                                  +
                                                                                                                                  2045 * The Drop Timer engine, which controls how In-flight (#m_snd_flying_pkts_by_sent_when) packets are
                                                                                                                                  +
                                                                                                                                  2046 * considered Dropped due to being unacknowledged for too long. Used while #m_int_state is
                                                                                                                                  +
                                                                                                                                  2047 * Int_state::S_ESTABLISHED.
                                                                                                                                  +
                                                                                                                                  2048 *
                                                                                                                                  +
                                                                                                                                  2049 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2050 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2051 */
                                                                                                                                  + +
                                                                                                                                  2053
                                                                                                                                  +
                                                                                                                                  2054 /**
                                                                                                                                  +
                                                                                                                                  2055 * The Drop Timeout: Time period between the next time #m_snd_drop_timer schedules a Drop Timer and that timer
                                                                                                                                  +
                                                                                                                                  2056 * expiring. This is updated each time #m_snd_smoothed_round_trip_time is updated, and the Drop_timer
                                                                                                                                  +
                                                                                                                                  2057 * itself may change it under certain circumstances.
                                                                                                                                  +
                                                                                                                                  2058 *
                                                                                                                                  +
                                                                                                                                  2059 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2060 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2061 */
                                                                                                                                  + +
                                                                                                                                  2063
                                                                                                                                  +
                                                                                                                                  2064 /**
                                                                                                                                  +
                                                                                                                                  2065 * The state of outgoing packet pacing for this socket; segregated into a simple `struct` to keep
                                                                                                                                  +
                                                                                                                                  2066 * Peer_socket shorter and easier to understand. Packet pacing tries to combat the burstiness of
                                                                                                                                  +
                                                                                                                                  2067 * outgoing low-level packet stream.
                                                                                                                                  +
                                                                                                                                  2068 *
                                                                                                                                  +
                                                                                                                                  2069 * @see `struct Send_pacing_data` doc header for much detail.
                                                                                                                                  +
                                                                                                                                  2070 */
                                                                                                                                  + +
                                                                                                                                  2072
                                                                                                                                  +
                                                                                                                                  2073 /**
                                                                                                                                  +
                                                                                                                                  2074 * The last time that Node has detected a packet loss event and so informed #m_snd_cong_ctl by calling
                                                                                                                                  +
                                                                                                                                  2075 * the appropriate method of class Congestion_control_strategy. Roughly speaking, this is used to
                                                                                                                                  +
                                                                                                                                  2076 * determine whether the detection of a given dropped packet is part of the same loss event as the
                                                                                                                                  +
                                                                                                                                  2077 * previous one; if so then #m_snd_cong_ctl is not informed again (presumably to avoid dropping CWND
                                                                                                                                  +
                                                                                                                                  2078 * too fast); if not it is informed of the new loss event. Even more roughly speaking, if the new
                                                                                                                                  +
                                                                                                                                  2079 * event is within a certain time frame of #m_snd_last_loss_event_when, then they're considered in the
                                                                                                                                  +
                                                                                                                                  2080 * same loss event. You can find detailed discussion in a giant comment in
                                                                                                                                  +
                                                                                                                                  2081 * Node::handle_accumulated_acks().
                                                                                                                                  +
                                                                                                                                  2082 *
                                                                                                                                  +
                                                                                                                                  2083 * Before any loss events, this is set to its default value (zero time since epoch).
                                                                                                                                  +
                                                                                                                                  2084 *
                                                                                                                                  +
                                                                                                                                  2085 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2086 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2087 */
                                                                                                                                  + +
                                                                                                                                  2089
                                                                                                                                  +
                                                                                                                                  2090 /**
                                                                                                                                  +
                                                                                                                                  2091 * Time at which the last Data_packet low-level packet for this connection was sent. We
                                                                                                                                  +
                                                                                                                                  2092 * use this when determining whether the connection is in Idle Timeout (i.e., has sent no traffic
                                                                                                                                  +
                                                                                                                                  2093 * for a while, which means there has been no data to send). It's used for congestion control.
                                                                                                                                  +
                                                                                                                                  2094 *
                                                                                                                                  +
                                                                                                                                  2095 * Before any packets are sent, this is set to its default value (zero time since epoch).
                                                                                                                                  +
                                                                                                                                  2096 *
                                                                                                                                  +
                                                                                                                                  2097 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2098 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2099 *
                                                                                                                                  +
                                                                                                                                  2100 * ### Pacing ###
                                                                                                                                  +
                                                                                                                                  2101 * See Send_packet_pacing #m_snd_pacing_data. See pacing-relevant note on Sent_packet::m_sent_when
                                                                                                                                  +
                                                                                                                                  2102 * which applies equally to this data member.
                                                                                                                                  +
                                                                                                                                  2103 */
                                                                                                                                  + +
                                                                                                                                  2105
                                                                                                                                  +
                                                                                                                                  2106 /// Stats regarding outgoing traffic (and resulting incoming ACKs) for this connection so far.
                                                                                                                                  + +
                                                                                                                                  2108
                                                                                                                                  +
                                                                                                                                  2109 /**
                                                                                                                                  +
                                                                                                                                  2110 * Random security token used during SYN_ACK-SYN_ACK_ACK. For a given connection handshake, the
                                                                                                                                  +
                                                                                                                                  2111 * SYN_ACK_ACK receiver ensures that #m_security_token it received is equal to the original one it
                                                                                                                                  +
                                                                                                                                  2112 * had sent in SYN_ACK. This first gains meaning upong sending SYN_ACK and it does not change afterwards.
                                                                                                                                  +
                                                                                                                                  2113 * It is not used unless `!m_active_connect`. See #m_active_connect.
                                                                                                                                  +
                                                                                                                                  2114 *
                                                                                                                                  +
                                                                                                                                  2115 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2116 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2117 */
                                                                                                                                  + +
                                                                                                                                  2119
                                                                                                                                  +
                                                                                                                                  2120 /**
                                                                                                                                  +
                                                                                                                                  2121 * Connection attempt scheduled task; fires if an individual connection request packet is not answered with a reply
                                                                                                                                  +
                                                                                                                                  2122 * packet in time. It is readied when *any* SYN or SYN_ACK packet is sent, and fired if that packet has gone
                                                                                                                                  +
                                                                                                                                  2123 * unacknowledged with a SYN_ACK or SYN_ACK_ACK (respectively), long enough to be retransmitted.
                                                                                                                                  +
                                                                                                                                  2124 *
                                                                                                                                  +
                                                                                                                                  2125 * Connection establishment is aborted if it fires too many times, but #m_connection_timeout_scheduled_task is how
                                                                                                                                  +
                                                                                                                                  2126 * "too many times" is determined.
                                                                                                                                  +
                                                                                                                                  2127 *
                                                                                                                                  +
                                                                                                                                  2128 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2129 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2130 *
                                                                                                                                  +
                                                                                                                                  2131 * @see #m_connection_timeout_scheduled_task which keeps track of the entire process timing out, as opposed to the
                                                                                                                                  +
                                                                                                                                  2132 * individual attempts.
                                                                                                                                  +
                                                                                                                                  2133 */
                                                                                                                                  + +
                                                                                                                                  2135
                                                                                                                                  +
                                                                                                                                  2136 /**
                                                                                                                                  +
                                                                                                                                  2137 * If currently using #m_init_rexmit_scheduled_task, this is the number of times the timer has already fired
                                                                                                                                  +
                                                                                                                                  2138 * in this session. So when the timer is readied the first time it's zero; if it fires and is
                                                                                                                                  +
                                                                                                                                  2139 * thus readied again it's one; again => two; etc., until timer is canceled or connection is
                                                                                                                                  +
                                                                                                                                  2140 * aborted due to too many retries.
                                                                                                                                  +
                                                                                                                                  2141 *
                                                                                                                                  +
                                                                                                                                  2142 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2143 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2144 */
                                                                                                                                  + +
                                                                                                                                  2146
                                                                                                                                  +
                                                                                                                                  2147 /**
                                                                                                                                  +
                                                                                                                                  2148 * Connection timeout scheduled task; fires if the entire initial connection process does not complete within a
                                                                                                                                  +
                                                                                                                                  2149 * certain amount of time. It is started when the SYN or SYN_ACK is sent the very first time (NOT counting
                                                                                                                                  +
                                                                                                                                  2150 * resends), canceled when SYN_ACK or SYN_ACK_ACK (respectively) is received in response to ANY SYN or
                                                                                                                                  +
                                                                                                                                  2151 * SYN_ACK (respevtively), and fired if the the latter does not occur in time.
                                                                                                                                  +
                                                                                                                                  2152 *
                                                                                                                                  +
                                                                                                                                  2153 * This gains meaning only in thread W. This should NOT be accessed outside of thread W and is
                                                                                                                                  +
                                                                                                                                  2154 * not protected by a mutex.
                                                                                                                                  +
                                                                                                                                  2155 *
                                                                                                                                  +
                                                                                                                                  2156 * @see #m_init_rexmit_scheduled_task which keeps track of *individual* attempts timing out, as opposed to the
                                                                                                                                  +
                                                                                                                                  2157 * entire process.
                                                                                                                                  +
                                                                                                                                  2158 */
                                                                                                                                  + +
                                                                                                                                  2160
                                                                                                                                  +
                                                                                                                                  2161 /**
                                                                                                                                  +
                                                                                                                                  2162 * This is the final set of stats collected at the time the socket was moved to S_CLOSED #m_state.
                                                                                                                                  +
                                                                                                                                  2163 * If it has not yet moved to that state, this is not applicable (but equals Peer_socket_info()).
                                                                                                                                  +
                                                                                                                                  2164 * It's used by info() to get at the final set of stats, before the source info is purged by the
                                                                                                                                  +
                                                                                                                                  2165 * resource cleanup in sock_free_memory().
                                                                                                                                  +
                                                                                                                                  2166 */
                                                                                                                                  + +
                                                                                                                                  2168}; // class Peer_socket
                                                                                                                                  +
                                                                                                                                  2169
                                                                                                                                  +
                                                                                                                                  2170
                                                                                                                                  +
                                                                                                                                  2171/**
                                                                                                                                  +
                                                                                                                                  2172 * @private
                                                                                                                                  +
                                                                                                                                  2173 *
                                                                                                                                  +
                                                                                                                                  2174 * Metadata (and data, if retransmission is on) for a packet that has been sent one (if
                                                                                                                                  +
                                                                                                                                  2175 * retransmission is off) or possibly more (if on) times. This is purely a data store, not a
                                                                                                                                  +
                                                                                                                                  2176 * class. It is not copyable, and moving them around by smart Sent_packet::Ptr is encouraged.
                                                                                                                                  +
                                                                                                                                  2177 */
                                                                                                                                  + +
                                                                                                                                  2179 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  +
                                                                                                                                  2180 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket::Sent_packet>>,
                                                                                                                                  +
                                                                                                                                  2181 private boost::noncopyable
                                                                                                                                  +
                                                                                                                                  2182{
                                                                                                                                  +
                                                                                                                                  2183 // Types.
                                                                                                                                  +
                                                                                                                                  2184
                                                                                                                                  +
                                                                                                                                  2185 struct Sent_when;
                                                                                                                                  +
                                                                                                                                  2186
                                                                                                                                  +
                                                                                                                                  2187 /**
                                                                                                                                  +
                                                                                                                                  2188 * Type used for #m_acks_after_me. Use a small type to save memory; this is easily large enough,
                                                                                                                                  +
                                                                                                                                  2189 * given that that we drop a packet after #m_acks_after_me exceeds a very small value (< 10), and
                                                                                                                                  +
                                                                                                                                  2190 * a given ACK can *conceivably* hold a few thousand individual acknowledgments (most likely many
                                                                                                                                  +
                                                                                                                                  2191 * fewer). In fact `uint8_t` is probably enough, but it seemed easier to not worry about
                                                                                                                                  +
                                                                                                                                  2192 * overflows when doing arithmetic with these.
                                                                                                                                  +
                                                                                                                                  2193 */
                                                                                                                                  +
                                                                                                                                  2194 using ack_count_t = uint16_t;
                                                                                                                                  +
                                                                                                                                  2195
                                                                                                                                  +
                                                                                                                                  2196 // Data.
                                                                                                                                  +
                                                                                                                                  2197
                                                                                                                                  +
                                                                                                                                  2198 /// Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  +
                                                                                                                                  2199 const size_t m_size;
                                                                                                                                  +
                                                                                                                                  2200
                                                                                                                                  +
                                                                                                                                  2201 /**
                                                                                                                                  +
                                                                                                                                  2202 * Time stamps, order numbers, and other info at the times when the different attempts (including
                                                                                                                                  +
                                                                                                                                  2203 * original sending and retransmissions) to send the packet were given to the UDP net-stack. These are
                                                                                                                                  +
                                                                                                                                  2204 * arranged in the order they were sent (0 = original transmission, 1 = first retransmission, 2 = second
                                                                                                                                  +
                                                                                                                                  2205 * retransmission, ...). If retransmission is off, this only ever has 1 element (set via
                                                                                                                                  +
                                                                                                                                  2206 * constructor).
                                                                                                                                  +
                                                                                                                                  2207 *
                                                                                                                                  +
                                                                                                                                  2208 * Along with each time stamp, we also store an order number. It is much like a sequence
                                                                                                                                  +
                                                                                                                                  2209 * number, except (a) we never send it anywhere (internal bookkeeping only), (b) it specifies
                                                                                                                                  +
                                                                                                                                  2210 * the order in which the packets were sent off. Why use that and not a `m_sent_time` timestamp? Because
                                                                                                                                  +
                                                                                                                                  2211 * `m_sent_time` can, in theory, have ties (i.e., it's kind of possible for 2 packets to be sent
                                                                                                                                  +
                                                                                                                                  2212 * within the same high-resolution clock tick). This gives us a solid way to order packets by send time
                                                                                                                                  +
                                                                                                                                  2213 * in certain key algorithms.
                                                                                                                                  +
                                                                                                                                  2214 *
                                                                                                                                  +
                                                                                                                                  2215 * Note: for reasons explained in the pacing module this should be the time stamp when we
                                                                                                                                  +
                                                                                                                                  2216 * actually send it off to boost.asio UDP net-stack, not when we queue it into the pacing module (which can be
                                                                                                                                  +
                                                                                                                                  2217 * quite a bit earlier, if pacing is enabled). Subtlety: Note that "time stamp when we actually send it off
                                                                                                                                  +
                                                                                                                                  2218 * to boost.asio UDP net-stack" IS the same as "time stamp when boost.asio UDP net-stack actually performs the
                                                                                                                                  +
                                                                                                                                  2219 * `sendto()` call" in practice -- a good thing for accurate RTT measurements.
                                                                                                                                  +
                                                                                                                                  2220 */
                                                                                                                                  +
                                                                                                                                  2221 std::vector<Sent_when> m_sent_when;
                                                                                                                                  +
                                                                                                                                  2222
                                                                                                                                  +
                                                                                                                                  2223 /**
                                                                                                                                  +
                                                                                                                                  2224 * The number of times any packet with `m_sent_when.back().m_order_num > this->m_sent_when.back().m_order_num`
                                                                                                                                  +
                                                                                                                                  2225 * has been acknowledged. Reworded slightly: start at 0; *IF* a packet, other than this one, is In-flight and then
                                                                                                                                  +
                                                                                                                                  2226 * acknowledged, and that packet was sent out (or, equivalently, scheduled to be sent out -- packets do not
                                                                                                                                  +
                                                                                                                                  2227 * change order once marked for sending -- a/k/a became In-flight) chronologically AFTER same happened to
                                                                                                                                  +
                                                                                                                                  2228 * `*this` packet *THEN* add 1. After adding up all such acks, the resulting value = this member.
                                                                                                                                  +
                                                                                                                                  2229 *
                                                                                                                                  +
                                                                                                                                  2230 * This is used to determine when `*this` packet should be considered Dropped,
                                                                                                                                  +
                                                                                                                                  2231 * as in TCP's Fast Retransmit heuristic (but better, since time-when-sent -- not sequence number, which has
                                                                                                                                  +
                                                                                                                                  2232 * retransmission ambiguities -- is used to order packets).
                                                                                                                                  +
                                                                                                                                  2233 *
                                                                                                                                  +
                                                                                                                                  2234 * Note, again, that "after" has little to do with *sequence* number but rather with send time, as ordered via
                                                                                                                                  +
                                                                                                                                  2235 * the *order* number. E.g., due to retransmission, `*this` may have sequence number greater than another
                                                                                                                                  +
                                                                                                                                  2236 * packet yet have the lesser order number. (This dichotomy is mentioned a lot, everywhere, and if I'm overdoing
                                                                                                                                  +
                                                                                                                                  2237 * it, it's only because sometimes TCP cumulative-ack habits die hard, so I have to keep reminding myself.)
                                                                                                                                  +
                                                                                                                                  2238 * (If retransmission is disabled, however, then sequence number order = order number order.)
                                                                                                                                  +
                                                                                                                                  2239 */
                                                                                                                                  + +
                                                                                                                                  2241
                                                                                                                                  +
                                                                                                                                  2242 /**
                                                                                                                                  +
                                                                                                                                  2243 * If retransmission is on, this is the DATA packet itself that was sent; otherwise null. It is
                                                                                                                                  +
                                                                                                                                  2244 * stored in case we need to retransmit it. If we don't (it is acknowledged), the entire
                                                                                                                                  +
                                                                                                                                  2245 * Sent_packet is erased and goes away, so #m_packet's ref-count decreases to zero, and it
                                                                                                                                  +
                                                                                                                                  2246 * disappears. If we do, all we need to do to retransmit it is increment its Data_packet::m_rexmit_id and
                                                                                                                                  +
                                                                                                                                  2247 * place it into the retransmission queue for sending, when CWND space is available.
                                                                                                                                  +
                                                                                                                                  2248 *
                                                                                                                                  +
                                                                                                                                  2249 * Why store the entire packet and not just its Data_packet::m_data? There's a small bit of memory overhead, but
                                                                                                                                  +
                                                                                                                                  2250 * we get Data_packet::m_rexmit_id for free and don't have to spend time re-creating the packet to retransmit.
                                                                                                                                  +
                                                                                                                                  2251 * So it's just convenient.
                                                                                                                                  +
                                                                                                                                  2252 *
                                                                                                                                  +
                                                                                                                                  2253 * If retransmission is off, there is no need to store this, as it will not be re-sent.
                                                                                                                                  +
                                                                                                                                  2254 */
                                                                                                                                  +
                                                                                                                                  2255 const boost::shared_ptr<Data_packet> m_packet;
                                                                                                                                  +
                                                                                                                                  2256
                                                                                                                                  +
                                                                                                                                  2257 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  2258
                                                                                                                                  +
                                                                                                                                  2259 /**
                                                                                                                                  +
                                                                                                                                  2260 * Constructs object with the given values and #m_acks_after_me at zero. If rexmit-on option enabled, the
                                                                                                                                  +
                                                                                                                                  2261 * packet is stored in #m_packet; otherwise #m_packet is initialized to null. Regardless, #m_size
                                                                                                                                  +
                                                                                                                                  2262 * is set to `packet.m_data.size()`.
                                                                                                                                  +
                                                                                                                                  2263 *
                                                                                                                                  +
                                                                                                                                  2264 * @param rexmit_on
                                                                                                                                  +
                                                                                                                                  2265 * True if and only if `sock->rexmit_on()` for the containing socket.
                                                                                                                                  +
                                                                                                                                  2266 * @param packet
                                                                                                                                  +
                                                                                                                                  2267 * The packet that will be sent. Used for #m_size and, if `sock->rexmit_on()`, saved in #m_packet.
                                                                                                                                  +
                                                                                                                                  2268 * @param sent_when
                                                                                                                                  +
                                                                                                                                  2269 * #m_sent_when is set to contain one element equalling this argument.
                                                                                                                                  +
                                                                                                                                  2270 */
                                                                                                                                  +
                                                                                                                                  2271 explicit Sent_packet(bool rexmit_on, boost::shared_ptr<Data_packet> packet, const Sent_when& sent_when);
                                                                                                                                  +
                                                                                                                                  2272}; // struct Peer_socket::Sent_packet
                                                                                                                                  +
                                                                                                                                  2273
                                                                                                                                  +
                                                                                                                                  2274/**
                                                                                                                                  +
                                                                                                                                  2275 * @private
                                                                                                                                  +
                                                                                                                                  2276 *
                                                                                                                                  +
                                                                                                                                  2277 * Data store to keep timing related info when a packet is sent out. Construct via direct member initialization.
                                                                                                                                  +
                                                                                                                                  2278 * It is copy-constructible (for initially copying into containers and such) but not assignable to discourage
                                                                                                                                  +
                                                                                                                                  2279 * unneeded copying (though it is not a heavy structure). Update: A later version of clang does not like
                                                                                                                                  +
                                                                                                                                  2280 * this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff;
                                                                                                                                  +
                                                                                                                                  2281 * it's internal code; we should be fine.
                                                                                                                                  +
                                                                                                                                  2282 */
                                                                                                                                  + +
                                                                                                                                  2284{
                                                                                                                                  +
                                                                                                                                  2285 // Data.
                                                                                                                                  +
                                                                                                                                  2286
                                                                                                                                  +
                                                                                                                                  2287 /**
                                                                                                                                  +
                                                                                                                                  2288 * Order number of the packet. This can be used to compare two packets sent out; the one with the
                                                                                                                                  +
                                                                                                                                  2289 * higher order number was sent out later. See Peer_socket::m_snd_last_order_num. The per-socket next-value
                                                                                                                                  +
                                                                                                                                  2290 * for this is incremented each time another packet is sent out.
                                                                                                                                  +
                                                                                                                                  2291 *
                                                                                                                                  +
                                                                                                                                  2292 * @see Peer_socket::Sent_packet::m_sent_when for more discussion.
                                                                                                                                  +
                                                                                                                                  2293 *
                                                                                                                                  +
                                                                                                                                  2294 * @internal
                                                                                                                                  +
                                                                                                                                  2295 * @todo Can we make Sent_when::m_order_num and some of its peers const?
                                                                                                                                  +
                                                                                                                                  2296 */
                                                                                                                                  +
                                                                                                                                  2297 // That @internal should not be necessary to hide the @todo in public generated docs -- Doxygen bug?
                                                                                                                                  + +
                                                                                                                                  2299
                                                                                                                                  +
                                                                                                                                  2300 /**
                                                                                                                                  +
                                                                                                                                  2301 * The timestamp when the packet is sent out. This may be "corrected" when actually sent *after* pacing delay
                                                                                                                                  +
                                                                                                                                  2302 * (hence not `const`).
                                                                                                                                  +
                                                                                                                                  2303 *
                                                                                                                                  +
                                                                                                                                  2304 * @see Fine_clock. Recall that, due to latter's properties, `Fine_clock::now()` results monotonically increase
                                                                                                                                  +
                                                                                                                                  2305 * over time -- a property on which we rely on, particularly since this data member is only assigned
                                                                                                                                  +
                                                                                                                                  2306 * `Fine_clock::now()` at various times.
                                                                                                                                  +
                                                                                                                                  2307 *
                                                                                                                                  +
                                                                                                                                  2308 * @see Peer_socket::Sent_packet::m_sent_when for more discussion.
                                                                                                                                  +
                                                                                                                                  2309 */
                                                                                                                                  + +
                                                                                                                                  2311
                                                                                                                                  +
                                                                                                                                  2312 /**
                                                                                                                                  +
                                                                                                                                  2313 * The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  +
                                                                                                                                  2314 * We store this to pass to the congestion control module when this packet is acked in the future.
                                                                                                                                  +
                                                                                                                                  2315 * Some congestion control algorithms compute CWND based on an earlier CWND value.
                                                                                                                                  +
                                                                                                                                  2316 * Not `const` for similar reason as #m_sent_time.
                                                                                                                                  +
                                                                                                                                  2317 *
                                                                                                                                  +
                                                                                                                                  2318 * @internal
                                                                                                                                  +
                                                                                                                                  2319 * @todo Why is #m_sent_cwnd_bytes in Sent_when `struct` and not directly in `Sent_packet`? Or maybe it should
                                                                                                                                  +
                                                                                                                                  2320 * stay here, but Sent_when should be renamed `Send_attempt` (or `Send_try` for brevity)? Yeah, I think that's
                                                                                                                                  +
                                                                                                                                  2321 * it. Then Sent_packet::m_sent_when -- a container of Sent_when objects -- would become `m_send_tries`, a
                                                                                                                                  +
                                                                                                                                  2322 * container of `Send_try` objects. That makes more sense (sentce?!) than the status quo which involves the
                                                                                                                                  +
                                                                                                                                  2323 * singular-means-plural strangeness.
                                                                                                                                  +
                                                                                                                                  2324 *
                                                                                                                                  +
                                                                                                                                  2325 * @todo Can we make #m_sent_cwnd_bytes and some of its peers `const`?
                                                                                                                                  +
                                                                                                                                  2326 */
                                                                                                                                  +
                                                                                                                                  2327 // That @internal should not be necessary to hide the @todo in public generated docs -- Doxygen bug?
                                                                                                                                  + +
                                                                                                                                  2329}; // struct Peer_socket::Sent_packet::Sent_when
                                                                                                                                  +
                                                                                                                                  2330
                                                                                                                                  +
                                                                                                                                  2331/**
                                                                                                                                  +
                                                                                                                                  2332 * @private
                                                                                                                                  +
                                                                                                                                  2333 *
                                                                                                                                  +
                                                                                                                                  2334 * Metadata (and data, if retransmission is on) for a packet that has been received (and, if
                                                                                                                                  +
                                                                                                                                  2335 * retransmission is off, copied to Receive buffer). This is purely a data store, not a class.
                                                                                                                                  +
                                                                                                                                  2336 * It is not copyable, and moving them around by smart Received_packet::Ptr is encouraged.
                                                                                                                                  +
                                                                                                                                  2337 */
                                                                                                                                  + +
                                                                                                                                  2339 // Endow us with shared_ptr<>s ::Ptr and ::Const_ptr (syntactic sugar).
                                                                                                                                  +
                                                                                                                                  2340 public util::Shared_ptr_alias_holder<boost::shared_ptr<Peer_socket::Received_packet>>,
                                                                                                                                  +
                                                                                                                                  2341 private boost::noncopyable
                                                                                                                                  +
                                                                                                                                  2342{
                                                                                                                                  +
                                                                                                                                  2343 // Data.
                                                                                                                                  +
                                                                                                                                  2344
                                                                                                                                  +
                                                                                                                                  2345 /// Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  +
                                                                                                                                  2346 const size_t m_size;
                                                                                                                                  +
                                                                                                                                  2347
                                                                                                                                  +
                                                                                                                                  2348 /**
                                                                                                                                  +
                                                                                                                                  2349 * Byte sequence equal to that of Data_packet::m_data of the packet. Kept `empty()` if retransmission is off,
                                                                                                                                  +
                                                                                                                                  2350 * since in that mode any received packet's `m_data` is immediately moved to Receive buffer. With
                                                                                                                                  +
                                                                                                                                  2351 * retransmission on, it is stored until all gaps before the packet are filled (a/k/a
                                                                                                                                  +
                                                                                                                                  2352 * reassembly).
                                                                                                                                  +
                                                                                                                                  2353 */
                                                                                                                                  + +
                                                                                                                                  2355
                                                                                                                                  +
                                                                                                                                  2356 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  2357
                                                                                                                                  +
                                                                                                                                  2358 /**
                                                                                                                                  +
                                                                                                                                  2359 * Constructs object by storing size of data and, if so instructed, the data themselves.
                                                                                                                                  +
                                                                                                                                  2360 *
                                                                                                                                  +
                                                                                                                                  2361 * @param logger_ptr
                                                                                                                                  +
                                                                                                                                  2362 * The Logger implementation to use subsequently.
                                                                                                                                  +
                                                                                                                                  2363 * @param size
                                                                                                                                  +
                                                                                                                                  2364 * #m_size.
                                                                                                                                  +
                                                                                                                                  2365 * @param src_data
                                                                                                                                  +
                                                                                                                                  2366 * Pointer to the packet data to be moved into #m_data; or null if we shouldn't store it.
                                                                                                                                  +
                                                                                                                                  2367 * This should be null if and only if retransmission is off. If not null, for
                                                                                                                                  +
                                                                                                                                  2368 * performance, `*src_data` is CLEARED by this constructor (its data moved, in constant
                                                                                                                                  +
                                                                                                                                  2369 * time, into #m_data). In that case, `src_data.size() == size` must be true at entrance to
                                                                                                                                  +
                                                                                                                                  2370 * constructor, or behavior is undefined.
                                                                                                                                  +
                                                                                                                                  2371 */
                                                                                                                                  +
                                                                                                                                  2372 explicit Received_packet(log::Logger* logger_ptr, size_t size, util::Blob* src_data);
                                                                                                                                  +
                                                                                                                                  2373};
                                                                                                                                  +
                                                                                                                                  2374
                                                                                                                                  +
                                                                                                                                  2375/**
                                                                                                                                  +
                                                                                                                                  2376 * @private
                                                                                                                                  +
                                                                                                                                  2377 *
                                                                                                                                  +
                                                                                                                                  2378 * Metadata describing the data sent in the acknowledgment of an individual received packet. (A
                                                                                                                                  +
                                                                                                                                  2379 * low-level ACK packet may include several sets of such data.) This is purely a data store, not
                                                                                                                                  +
                                                                                                                                  2380 * a class. It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged.
                                                                                                                                  +
                                                                                                                                  2381 * Construct this by direct member initialization.
                                                                                                                                  +
                                                                                                                                  2382 */
                                                                                                                                  + +
                                                                                                                                  2384 // Cannot use boost::noncopyable or Shared_ptr_alias_holder, because that turns off direct initialization.
                                                                                                                                  +
                                                                                                                                  2385{
                                                                                                                                  +
                                                                                                                                  2386 // Types.
                                                                                                                                  +
                                                                                                                                  2387
                                                                                                                                  +
                                                                                                                                  2388 /// Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  2389 using Ptr = boost::shared_ptr<Individual_ack>;
                                                                                                                                  +
                                                                                                                                  2390
                                                                                                                                  +
                                                                                                                                  2391 /// Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  2392 using Const_ptr = boost::shared_ptr<const Individual_ack>;
                                                                                                                                  +
                                                                                                                                  2393
                                                                                                                                  +
                                                                                                                                  2394 // Data.
                                                                                                                                  +
                                                                                                                                  2395
                                                                                                                                  +
                                                                                                                                  2396 /// Sequence number of first datum in packet.
                                                                                                                                  + +
                                                                                                                                  2398
                                                                                                                                  +
                                                                                                                                  2399 /**
                                                                                                                                  +
                                                                                                                                  2400 * Retransmit counter of the packet (as reported by sender). Identifies which attempt we are
                                                                                                                                  +
                                                                                                                                  2401 * acknowledging (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Always 0
                                                                                                                                  +
                                                                                                                                  2402 * unless retransmission is on.
                                                                                                                                  +
                                                                                                                                  2403 */
                                                                                                                                  +
                                                                                                                                  2404 const unsigned int m_rexmit_id;
                                                                                                                                  +
                                                                                                                                  2405
                                                                                                                                  +
                                                                                                                                  2406 /// When was it received? Used for supplying delay before acknowledging (for other side's RTT calculations).
                                                                                                                                  + +
                                                                                                                                  2408
                                                                                                                                  +
                                                                                                                                  2409 /// Number of bytes in the packet's user data.
                                                                                                                                  +
                                                                                                                                  2410 const size_t m_data_size;
                                                                                                                                  +
                                                                                                                                  2411
                                                                                                                                  +
                                                                                                                                  2412 /// Make us noncopyable without breaking aggregateness (direct-init).
                                                                                                                                  +
                                                                                                                                  2413 [[no_unique_address]] util::Noncopyable m_nc{};
                                                                                                                                  +
                                                                                                                                  2414}; // struct Peer_socket::Individual_ack
                                                                                                                                  +
                                                                                                                                  2415// Note: Some static_assert()s about it currently in peer_socket.cpp in a function {} (for boring reasons).
                                                                                                                                  +
                                                                                                                                  2416
                                                                                                                                  +
                                                                                                                                  2417// Free functions: in *_fwd.hpp.
                                                                                                                                  +
                                                                                                                                  2418
                                                                                                                                  +
                                                                                                                                  2419// However the following refer to inner type(s) and hence must be declared here and not _fwd.hpp.
                                                                                                                                  +
                                                                                                                                  2420
                                                                                                                                  +
                                                                                                                                  2421/**
                                                                                                                                  +
                                                                                                                                  2422 * @internal
                                                                                                                                  +
                                                                                                                                  2423 *
                                                                                                                                  +
                                                                                                                                  2424 * @todo There are a few guys like this which are marked `@internal` (Doxygen command) to hide from generated
                                                                                                                                  +
                                                                                                                                  2425 * public documentation, and that works, but really they should not be visible in the publicly-exported
                                                                                                                                  +
                                                                                                                                  2426 * (not in detail/) header source code; so this should be reorganized for cleanliness. The prototypes like this one
                                                                                                                                  +
                                                                                                                                  2427 * can be moved to a detail/ header or maybe directly into .cpp that uses them (for those where it's only one).
                                                                                                                                  2428 *
                                                                                                                                  -
                                                                                                                                  2429 * @todo There are a few guys like this which are marked `@internal` (Doxygen command) to hide from generated
                                                                                                                                  -
                                                                                                                                  2430 * public documentation, and that works, but really they should not be visible in the publicly-exported
                                                                                                                                  -
                                                                                                                                  2431 * (not in detail/) header source code; so this should be reorganized for cleanliness. The prototypes like this one
                                                                                                                                  -
                                                                                                                                  2432 * can be moved to a detail/ header or maybe directly into .cpp that uses them (for those where it's only one).
                                                                                                                                  -
                                                                                                                                  2433 *
                                                                                                                                  -
                                                                                                                                  2434 * Prints string representation of given socket state to given standard `ostream` and returns the
                                                                                                                                  -
                                                                                                                                  2435 * latter.
                                                                                                                                  -
                                                                                                                                  2436 *
                                                                                                                                  -
                                                                                                                                  2437 * @param os
                                                                                                                                  -
                                                                                                                                  2438 * Stream to print to.
                                                                                                                                  -
                                                                                                                                  2439 * @param state
                                                                                                                                  -
                                                                                                                                  2440 * Value to serialize.
                                                                                                                                  -
                                                                                                                                  2441 * @return `os`.
                                                                                                                                  -
                                                                                                                                  2442 */
                                                                                                                                  -
                                                                                                                                  2443std::ostream& operator<<(std::ostream& os, Peer_socket::Int_state state);
                                                                                                                                  -
                                                                                                                                  2444
                                                                                                                                  -
                                                                                                                                  2445// Template implementations.
                                                                                                                                  -
                                                                                                                                  2446
                                                                                                                                  -
                                                                                                                                  2447template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2448size_t Peer_socket::send(const Const_buffer_sequence& data, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2449{
                                                                                                                                  -
                                                                                                                                  2450 namespace bind_ns = util::bind_ns;
                                                                                                                                  -
                                                                                                                                  2451 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2429 * Prints string representation of given socket state to given standard `ostream` and returns the
                                                                                                                                  +
                                                                                                                                  2430 * latter.
                                                                                                                                  +
                                                                                                                                  2431 *
                                                                                                                                  +
                                                                                                                                  2432 * @param os
                                                                                                                                  +
                                                                                                                                  2433 * Stream to print to.
                                                                                                                                  +
                                                                                                                                  2434 * @param state
                                                                                                                                  +
                                                                                                                                  2435 * Value to serialize.
                                                                                                                                  +
                                                                                                                                  2436 * @return `os`.
                                                                                                                                  +
                                                                                                                                  2437 */
                                                                                                                                  +
                                                                                                                                  2438std::ostream& operator<<(std::ostream& os, Peer_socket::Int_state state);
                                                                                                                                  +
                                                                                                                                  2439
                                                                                                                                  +
                                                                                                                                  2440// Template implementations.
                                                                                                                                  +
                                                                                                                                  2441
                                                                                                                                  +
                                                                                                                                  2442template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2443size_t Peer_socket::send(const Const_buffer_sequence& data, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2444{
                                                                                                                                  +
                                                                                                                                  2445 namespace bind_ns = util::bind_ns;
                                                                                                                                  +
                                                                                                                                  2446 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2447
                                                                                                                                  +
                                                                                                                                  2448 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::send<Const_buffer_sequence>, bind_ns::cref(data), _1);
                                                                                                                                  +
                                                                                                                                  2449 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  2450
                                                                                                                                  +
                                                                                                                                  2451 // We are in user thread U != W.
                                                                                                                                  2452
                                                                                                                                  -
                                                                                                                                  2453 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::send<Const_buffer_sequence>, bind_ns::cref(data), _1);
                                                                                                                                  -
                                                                                                                                  2454 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  2455
                                                                                                                                  -
                                                                                                                                  2456 // We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  2457
                                                                                                                                  -
                                                                                                                                  2458 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  -
                                                                                                                                  2459
                                                                                                                                  -
                                                                                                                                  2460 /* Forward the rest of the logic to Node.
                                                                                                                                  -
                                                                                                                                  2461 * Now, what I really want to do here is simply:
                                                                                                                                  -
                                                                                                                                  2462 * m_node->send(this, data, err_code);
                                                                                                                                  -
                                                                                                                                  2463 * I cannot, however, due to C++'s circular reference BS (Node needs Peer_socket, Peer_socket needs Node,
                                                                                                                                  -
                                                                                                                                  2464 * and both send()s are templates so cannot be implemented in .cpp). So I perform the following
                                                                                                                                  -
                                                                                                                                  2465 * voodoo. The only part that must be defined in .hpp is the part that actually uses template
                                                                                                                                  -
                                                                                                                                  2466 * parameters. The only part that uses template parameters is m_snd_buf->feed_bufs_copy().
                                                                                                                                  -
                                                                                                                                  2467 * Therefore I prepare a canned call to m_snd_buf->feed_bufs_copy(data, ...) and save it in a
                                                                                                                                  -
                                                                                                                                  2468 * function pointer (Function) to an untemplated, regular function that makes this canned
                                                                                                                                  -
                                                                                                                                  2469 * call. Finally, I call an untemplated function in .cpp, which has full understanding of Node,
                                                                                                                                  -
                                                                                                                                  2470 * and pass the pre-canned thingie into that. That guy finally calls Node::send(), passing along
                                                                                                                                  -
                                                                                                                                  2471 * the precanned thingie. Node::send() can then call the latter when it needs to feed() to the
                                                                                                                                  -
                                                                                                                                  2472 * buffer. Therefore Node::send() does not need to be templated.
                                                                                                                                  -
                                                                                                                                  2473 *
                                                                                                                                  -
                                                                                                                                  2474 * Yeah, I know. I had to do it though. Logic should be in Node, not in Peer_socket.
                                                                                                                                  -
                                                                                                                                  2475 *
                                                                                                                                  -
                                                                                                                                  2476 * Update: As of this writing I've added a formal @todo into Node doc header. .inl tricks a-la-Boost might
                                                                                                                                  -
                                                                                                                                  2477 * help avoid this issue. */
                                                                                                                                  -
                                                                                                                                  2478 const auto snd_buf_feed_func = [this, &data](size_t max_data_size)
                                                                                                                                  -
                                                                                                                                  2479 {
                                                                                                                                  -
                                                                                                                                  2480 return m_snd_buf.feed_bufs_copy(data, max_data_size);
                                                                                                                                  -
                                                                                                                                  2481 };
                                                                                                                                  -
                                                                                                                                  2482 // ^-- Important to capture `&data`, not `data`; else `data` (albeit not actual payload) will be copied!
                                                                                                                                  -
                                                                                                                                  2483
                                                                                                                                  -
                                                                                                                                  2484 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  -
                                                                                                                                  2485 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  -
                                                                                                                                  2486 * an appropriate signature that node_send() expects, seen in the above explanatory comment. */
                                                                                                                                  -
                                                                                                                                  2487 return node_send(snd_buf_feed_func, err_code);
                                                                                                                                  -
                                                                                                                                  2488} // Peer_socket::send()
                                                                                                                                  -
                                                                                                                                  2489
                                                                                                                                  -
                                                                                                                                  2490template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2491size_t Peer_socket::sync_send(const Const_buffer_sequence& data, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2492{
                                                                                                                                  -
                                                                                                                                  2493 return sync_send_impl(data, Fine_time_pt(), err_code); // sync_send() with infinite timeout.
                                                                                                                                  -
                                                                                                                                  2494}
                                                                                                                                  -
                                                                                                                                  2495
                                                                                                                                  -
                                                                                                                                  2496template<typename Rep, typename Period, typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2497size_t Peer_socket::sync_send(const Const_buffer_sequence& data,
                                                                                                                                  -
                                                                                                                                  2498 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  -
                                                                                                                                  2499 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2500{
                                                                                                                                  -
                                                                                                                                  2501 assert(max_wait.count() > 0);
                                                                                                                                  -
                                                                                                                                  2502 return sync_send_impl(data,
                                                                                                                                  - -
                                                                                                                                  2504 err_code);
                                                                                                                                  -
                                                                                                                                  2505}
                                                                                                                                  -
                                                                                                                                  2506
                                                                                                                                  -
                                                                                                                                  2507template<typename Rep, typename Period>
                                                                                                                                  -
                                                                                                                                  2508bool Peer_socket::sync_send(const boost::asio::null_buffers&,
                                                                                                                                  -
                                                                                                                                  2509 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  -
                                                                                                                                  2510 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2511{
                                                                                                                                  -
                                                                                                                                  2512 assert(max_wait.count() > 0);
                                                                                                                                  - -
                                                                                                                                  2514 err_code);
                                                                                                                                  -
                                                                                                                                  2515}
                                                                                                                                  -
                                                                                                                                  2516
                                                                                                                                  -
                                                                                                                                  2517template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2518size_t Peer_socket::sync_send_impl(const Const_buffer_sequence& data, const Fine_time_pt& wait_until,
                                                                                                                                  -
                                                                                                                                  2519 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2520{
                                                                                                                                  -
                                                                                                                                  2521 namespace bind_ns = util::bind_ns;
                                                                                                                                  -
                                                                                                                                  2522 using bind_ns::bind;
                                                                                                                                  -
                                                                                                                                  2523
                                                                                                                                  -
                                                                                                                                  2524 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::sync_send_impl<Const_buffer_sequence>,
                                                                                                                                  -
                                                                                                                                  2525 bind_ns::cref(data), bind_ns::cref(wait_until), _1);
                                                                                                                                  -
                                                                                                                                  2526 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  2527
                                                                                                                                  -
                                                                                                                                  2528 // We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  2529
                                                                                                                                  -
                                                                                                                                  2530 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  -
                                                                                                                                  2531
                                                                                                                                  -
                                                                                                                                  2532 /* Forward the rest of the logic to Node.
                                                                                                                                  -
                                                                                                                                  2533 * Now, what I really want to do here is simply:
                                                                                                                                  -
                                                                                                                                  2534 * m_node->sync_send(...args...);
                                                                                                                                  -
                                                                                                                                  2535 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  -
                                                                                                                                  2536 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  -
                                                                                                                                  2537
                                                                                                                                  -
                                                                                                                                  2538 const auto snd_buf_feed_func = [this, &data](size_t max_data_size)
                                                                                                                                  -
                                                                                                                                  2539 {
                                                                                                                                  -
                                                                                                                                  2540 return m_snd_buf.feed_bufs_copy(data, max_data_size);
                                                                                                                                  -
                                                                                                                                  2541 };
                                                                                                                                  -
                                                                                                                                  2542 // ^-- Important to capture `&data`, not `data`; else `data` (albeit not actual payload) will be copied!
                                                                                                                                  -
                                                                                                                                  2543
                                                                                                                                  -
                                                                                                                                  2544 lock.release(); // Let go of the mutex (mutex is still LOCKED).
                                                                                                                                  -
                                                                                                                                  2545 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  -
                                                                                                                                  2546 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  -
                                                                                                                                  2547 * an appropriate signature that node_sync_send() expects, seen in the above explanatory comment. */
                                                                                                                                  -
                                                                                                                                  2548 return node_sync_send(snd_buf_feed_func, wait_until, err_code);
                                                                                                                                  -
                                                                                                                                  2549} // Peer_socket::sync_send_impl()
                                                                                                                                  -
                                                                                                                                  2550
                                                                                                                                  -
                                                                                                                                  2551template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2552size_t Peer_socket::receive(const Mutable_buffer_sequence& target, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2553{
                                                                                                                                  -
                                                                                                                                  2554 namespace bind_ns = util::bind_ns;
                                                                                                                                  -
                                                                                                                                  2555 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2453 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  +
                                                                                                                                  2454
                                                                                                                                  +
                                                                                                                                  2455 /* Forward the rest of the logic to Node.
                                                                                                                                  +
                                                                                                                                  2456 * Now, what I really want to do here is simply:
                                                                                                                                  +
                                                                                                                                  2457 * m_node->send(this, data, err_code);
                                                                                                                                  +
                                                                                                                                  2458 * I cannot, however, due to C++'s circular reference BS (Node needs Peer_socket, Peer_socket needs Node,
                                                                                                                                  +
                                                                                                                                  2459 * and both send()s are templates so cannot be implemented in .cpp). So I perform the following
                                                                                                                                  +
                                                                                                                                  2460 * voodoo. The only part that must be defined in .hpp is the part that actually uses template
                                                                                                                                  +
                                                                                                                                  2461 * parameters. The only part that uses template parameters is m_snd_buf->feed_bufs_copy().
                                                                                                                                  +
                                                                                                                                  2462 * Therefore I prepare a canned call to m_snd_buf->feed_bufs_copy(data, ...) and save it in a
                                                                                                                                  +
                                                                                                                                  2463 * function pointer (Function) to an untemplated, regular function that makes this canned
                                                                                                                                  +
                                                                                                                                  2464 * call. Finally, I call an untemplated function in .cpp, which has full understanding of Node,
                                                                                                                                  +
                                                                                                                                  2465 * and pass the pre-canned thingie into that. That guy finally calls Node::send(), passing along
                                                                                                                                  +
                                                                                                                                  2466 * the precanned thingie. Node::send() can then call the latter when it needs to feed() to the
                                                                                                                                  +
                                                                                                                                  2467 * buffer. Therefore Node::send() does not need to be templated.
                                                                                                                                  +
                                                                                                                                  2468 *
                                                                                                                                  +
                                                                                                                                  2469 * Yeah, I know. I had to do it though. Logic should be in Node, not in Peer_socket.
                                                                                                                                  +
                                                                                                                                  2470 *
                                                                                                                                  +
                                                                                                                                  2471 * Update: As of this writing I've added a formal @todo into Node doc header. .inl tricks a-la-Boost might
                                                                                                                                  +
                                                                                                                                  2472 * help avoid this issue. */
                                                                                                                                  +
                                                                                                                                  2473 const auto snd_buf_feed_func = [this, &data](size_t max_data_size)
                                                                                                                                  +
                                                                                                                                  2474 {
                                                                                                                                  +
                                                                                                                                  2475 return m_snd_buf.feed_bufs_copy(data, max_data_size);
                                                                                                                                  +
                                                                                                                                  2476 };
                                                                                                                                  +
                                                                                                                                  2477 // ^-- Important to capture `&data`, not `data`; else `data` (albeit not actual payload) will be copied!
                                                                                                                                  +
                                                                                                                                  2478
                                                                                                                                  +
                                                                                                                                  2479 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  +
                                                                                                                                  2480 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  +
                                                                                                                                  2481 * an appropriate signature that node_send() expects, seen in the above explanatory comment. */
                                                                                                                                  +
                                                                                                                                  2482 return node_send(snd_buf_feed_func, err_code);
                                                                                                                                  +
                                                                                                                                  2483} // Peer_socket::send()
                                                                                                                                  +
                                                                                                                                  2484
                                                                                                                                  +
                                                                                                                                  2485template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2486size_t Peer_socket::sync_send(const Const_buffer_sequence& data, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2487{
                                                                                                                                  +
                                                                                                                                  2488 return sync_send_impl(data, Fine_time_pt(), err_code); // sync_send() with infinite timeout.
                                                                                                                                  +
                                                                                                                                  2489}
                                                                                                                                  +
                                                                                                                                  2490
                                                                                                                                  +
                                                                                                                                  2491template<typename Rep, typename Period, typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2492size_t Peer_socket::sync_send(const Const_buffer_sequence& data,
                                                                                                                                  +
                                                                                                                                  2493 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  +
                                                                                                                                  2494 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2495{
                                                                                                                                  +
                                                                                                                                  2496 assert(max_wait.count() > 0);
                                                                                                                                  +
                                                                                                                                  2497 return sync_send_impl(data,
                                                                                                                                  + +
                                                                                                                                  2499 err_code);
                                                                                                                                  +
                                                                                                                                  2500}
                                                                                                                                  +
                                                                                                                                  2501
                                                                                                                                  +
                                                                                                                                  2502template<typename Rep, typename Period>
                                                                                                                                  +
                                                                                                                                  2503bool Peer_socket::sync_send(const boost::asio::null_buffers&,
                                                                                                                                  +
                                                                                                                                  2504 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  +
                                                                                                                                  2505 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2506{
                                                                                                                                  +
                                                                                                                                  2507 assert(max_wait.count() > 0);
                                                                                                                                  + +
                                                                                                                                  2509 err_code);
                                                                                                                                  +
                                                                                                                                  2510}
                                                                                                                                  +
                                                                                                                                  2511
                                                                                                                                  +
                                                                                                                                  2512template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2513size_t Peer_socket::sync_send_impl(const Const_buffer_sequence& data, const Fine_time_pt& wait_until,
                                                                                                                                  +
                                                                                                                                  2514 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2515{
                                                                                                                                  +
                                                                                                                                  2516 namespace bind_ns = util::bind_ns;
                                                                                                                                  +
                                                                                                                                  2517 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2518
                                                                                                                                  +
                                                                                                                                  2519 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::sync_send_impl<Const_buffer_sequence>,
                                                                                                                                  +
                                                                                                                                  2520 bind_ns::cref(data), bind_ns::cref(wait_until), _1);
                                                                                                                                  +
                                                                                                                                  2521 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  2522
                                                                                                                                  +
                                                                                                                                  2523 // We are in user thread U != W.
                                                                                                                                  +
                                                                                                                                  2524
                                                                                                                                  +
                                                                                                                                  2525 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  +
                                                                                                                                  2526
                                                                                                                                  +
                                                                                                                                  2527 /* Forward the rest of the logic to Node.
                                                                                                                                  +
                                                                                                                                  2528 * Now, what I really want to do here is simply:
                                                                                                                                  +
                                                                                                                                  2529 * m_node->sync_send(...args...);
                                                                                                                                  +
                                                                                                                                  2530 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  +
                                                                                                                                  2531 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  +
                                                                                                                                  2532
                                                                                                                                  +
                                                                                                                                  2533 const auto snd_buf_feed_func = [this, &data](size_t max_data_size)
                                                                                                                                  +
                                                                                                                                  2534 {
                                                                                                                                  +
                                                                                                                                  2535 return m_snd_buf.feed_bufs_copy(data, max_data_size);
                                                                                                                                  +
                                                                                                                                  2536 };
                                                                                                                                  +
                                                                                                                                  2537 // ^-- Important to capture `&data`, not `data`; else `data` (albeit not actual payload) will be copied!
                                                                                                                                  +
                                                                                                                                  2538
                                                                                                                                  +
                                                                                                                                  2539 lock.release(); // Let go of the mutex (mutex is still LOCKED).
                                                                                                                                  +
                                                                                                                                  2540 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  +
                                                                                                                                  2541 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  +
                                                                                                                                  2542 * an appropriate signature that node_sync_send() expects, seen in the above explanatory comment. */
                                                                                                                                  +
                                                                                                                                  2543 return node_sync_send(snd_buf_feed_func, wait_until, err_code);
                                                                                                                                  +
                                                                                                                                  2544} // Peer_socket::sync_send_impl()
                                                                                                                                  +
                                                                                                                                  2545
                                                                                                                                  +
                                                                                                                                  2546template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2547size_t Peer_socket::receive(const Mutable_buffer_sequence& target, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2548{
                                                                                                                                  +
                                                                                                                                  2549 namespace bind_ns = util::bind_ns;
                                                                                                                                  +
                                                                                                                                  2550 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2551
                                                                                                                                  +
                                                                                                                                  2552 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::receive<Mutable_buffer_sequence>, bind_ns::cref(target), _1);
                                                                                                                                  +
                                                                                                                                  2553 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  2554
                                                                                                                                  +
                                                                                                                                  2555 // We are in user thread U != W.
                                                                                                                                  2556
                                                                                                                                  -
                                                                                                                                  2557 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::receive<Mutable_buffer_sequence>, bind_ns::cref(target), _1);
                                                                                                                                  -
                                                                                                                                  2558 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  2559
                                                                                                                                  -
                                                                                                                                  2560 // We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  2561
                                                                                                                                  -
                                                                                                                                  2562 Lock_guard lock(m_mutex); // Lock m_node/m_state; also it's a pre-condition for Node::receive().
                                                                                                                                  -
                                                                                                                                  2563
                                                                                                                                  -
                                                                                                                                  2564 /* Forward the rest of the logic to Node.
                                                                                                                                  -
                                                                                                                                  2565 * Now, what I really want to do here is simply:
                                                                                                                                  -
                                                                                                                                  2566 * m_node->receive(this, target), err_code);
                                                                                                                                  -
                                                                                                                                  2567 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  -
                                                                                                                                  2568 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  -
                                                                                                                                  2569
                                                                                                                                  -
                                                                                                                                  2570 const auto rcv_buf_consume_func = [this, &target]()
                                                                                                                                  -
                                                                                                                                  2571 {
                                                                                                                                  -
                                                                                                                                  2572 // Ensure that if there are data in Receive buffer, we will return at least 1 block as
                                                                                                                                  -
                                                                                                                                  2573 // advertised. @todo: I don't understand this comment now. What does it mean? Explain.
                                                                                                                                  -
                                                                                                                                  2574 return m_rcv_buf.consume_bufs_copy(target);
                                                                                                                                  -
                                                                                                                                  2575 };
                                                                                                                                  -
                                                                                                                                  2576 // ^-- Important to capture `&target`, not `target`; else `target` (albeit no actual buffers) will be copied!
                                                                                                                                  -
                                                                                                                                  2577
                                                                                                                                  -
                                                                                                                                  2578 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  -
                                                                                                                                  2579 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  -
                                                                                                                                  2580 * an appropriate signature that node_receive() expects, seen in the above explanatory comment. */
                                                                                                                                  -
                                                                                                                                  2581 return node_receive(rcv_buf_consume_func, err_code);
                                                                                                                                  -
                                                                                                                                  2582}
                                                                                                                                  -
                                                                                                                                  2583
                                                                                                                                  -
                                                                                                                                  2584template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2585size_t Peer_socket::sync_receive(const Mutable_buffer_sequence& target, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2586{
                                                                                                                                  -
                                                                                                                                  2587 return sync_receive_impl(target, Fine_time_pt(), err_code); // sync_receive() with infinite timeout.
                                                                                                                                  -
                                                                                                                                  2588}
                                                                                                                                  -
                                                                                                                                  2589
                                                                                                                                  -
                                                                                                                                  2590template<typename Rep, typename Period, typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2591size_t Peer_socket::sync_receive(const Mutable_buffer_sequence& target,
                                                                                                                                  -
                                                                                                                                  2592 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2593{
                                                                                                                                  -
                                                                                                                                  2594 assert(max_wait.count() > 0);
                                                                                                                                  -
                                                                                                                                  2595 return sync_receive_impl(target,
                                                                                                                                  - -
                                                                                                                                  2597 err_code);
                                                                                                                                  -
                                                                                                                                  2598}
                                                                                                                                  -
                                                                                                                                  2599
                                                                                                                                  -
                                                                                                                                  2600template<typename Rep, typename Period>
                                                                                                                                  -
                                                                                                                                  2601bool Peer_socket::sync_receive(const boost::asio::null_buffers&,
                                                                                                                                  -
                                                                                                                                  2602 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  -
                                                                                                                                  2603 Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2604{
                                                                                                                                  -
                                                                                                                                  2605 assert(max_wait.count() > 0);
                                                                                                                                  - -
                                                                                                                                  2607}
                                                                                                                                  -
                                                                                                                                  2608
                                                                                                                                  -
                                                                                                                                  2609template<typename Mutable_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  2610size_t Peer_socket::sync_receive_impl(const Mutable_buffer_sequence& target,
                                                                                                                                  -
                                                                                                                                  2611 const Fine_time_pt& wait_until, Error_code* err_code)
                                                                                                                                  -
                                                                                                                                  2612{
                                                                                                                                  -
                                                                                                                                  2613 namespace bind_ns = util::bind_ns;
                                                                                                                                  -
                                                                                                                                  2614 using bind_ns::bind;
                                                                                                                                  -
                                                                                                                                  2615
                                                                                                                                  -
                                                                                                                                  2616 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::sync_receive_impl<Mutable_buffer_sequence>,
                                                                                                                                  -
                                                                                                                                  2617 bind_ns::cref(target), bind_ns::cref(wait_until), _1);
                                                                                                                                  -
                                                                                                                                  2618 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  -
                                                                                                                                  2619
                                                                                                                                  -
                                                                                                                                  2620 // We are in user thread U != W.
                                                                                                                                  -
                                                                                                                                  2621
                                                                                                                                  -
                                                                                                                                  2622 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  -
                                                                                                                                  2623
                                                                                                                                  -
                                                                                                                                  2624 /* Forward the rest of the logic to Node.
                                                                                                                                  -
                                                                                                                                  2625 * Now, what I really want to do here is simply:
                                                                                                                                  -
                                                                                                                                  2626 * m_node->sync_receive(...args...);
                                                                                                                                  -
                                                                                                                                  2627 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  -
                                                                                                                                  2628 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  -
                                                                                                                                  2629
                                                                                                                                  -
                                                                                                                                  2630 const auto rcv_buf_consume_func = [this, &target]()
                                                                                                                                  -
                                                                                                                                  2631 {
                                                                                                                                  -
                                                                                                                                  2632 return m_rcv_buf.consume_bufs_copy(target);
                                                                                                                                  -
                                                                                                                                  2633 };
                                                                                                                                  -
                                                                                                                                  2634 // ^-- Important to capture `&target`, not `target`; else `target` (albeit no actual buffers) will be copied!
                                                                                                                                  -
                                                                                                                                  2635
                                                                                                                                  -
                                                                                                                                  2636 lock.release(); // Let go of the mutex (mutex is still LOCKED).
                                                                                                                                  -
                                                                                                                                  2637 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  -
                                                                                                                                  2638 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  -
                                                                                                                                  2639 * an appropriate signature that node_sync_receive() expects, seen in the above explanatory comment. */
                                                                                                                                  -
                                                                                                                                  2640 return node_sync_receive(rcv_buf_consume_func, wait_until, err_code);
                                                                                                                                  -
                                                                                                                                  2641} // Peer_socket::sync_receive()
                                                                                                                                  -
                                                                                                                                  2642
                                                                                                                                  -
                                                                                                                                  2643template<typename Opt_type>
                                                                                                                                  -
                                                                                                                                  2644Opt_type Peer_socket::opt(const Opt_type& opt_val_ref) const
                                                                                                                                  -
                                                                                                                                  2645{
                                                                                                                                  -
                                                                                                                                  2646 // Similar to Node::opt().
                                                                                                                                  - -
                                                                                                                                  2648 return opt_val_ref;
                                                                                                                                  -
                                                                                                                                  2649}
                                                                                                                                  -
                                                                                                                                  2650
                                                                                                                                  -
                                                                                                                                  2651} // namespace flow::net_flow
                                                                                                                                  -
                                                                                                                                  2652
                                                                                                                                  - +
                                                                                                                                  2557 Lock_guard lock(m_mutex); // Lock m_node/m_state; also it's a pre-condition for Node::receive().
                                                                                                                                  +
                                                                                                                                  2558
                                                                                                                                  +
                                                                                                                                  2559 /* Forward the rest of the logic to Node.
                                                                                                                                  +
                                                                                                                                  2560 * Now, what I really want to do here is simply:
                                                                                                                                  +
                                                                                                                                  2561 * m_node->receive(this, target), err_code);
                                                                                                                                  +
                                                                                                                                  2562 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  +
                                                                                                                                  2563 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  +
                                                                                                                                  2564
                                                                                                                                  +
                                                                                                                                  2565 const auto rcv_buf_consume_func = [this, &target]()
                                                                                                                                  +
                                                                                                                                  2566 {
                                                                                                                                  +
                                                                                                                                  2567 // Ensure that if there are data in Receive buffer, we will return at least 1 block as
                                                                                                                                  +
                                                                                                                                  2568 // advertised. @todo: I don't understand this comment now. What does it mean? Explain.
                                                                                                                                  +
                                                                                                                                  2569 return m_rcv_buf.consume_bufs_copy(target);
                                                                                                                                  +
                                                                                                                                  2570 };
                                                                                                                                  +
                                                                                                                                  2571 // ^-- Important to capture `&target`, not `target`; else `target` (albeit no actual buffers) will be copied!
                                                                                                                                  +
                                                                                                                                  2572
                                                                                                                                  +
                                                                                                                                  2573 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  +
                                                                                                                                  2574 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  +
                                                                                                                                  2575 * an appropriate signature that node_receive() expects, seen in the above explanatory comment. */
                                                                                                                                  +
                                                                                                                                  2576 return node_receive(rcv_buf_consume_func, err_code);
                                                                                                                                  +
                                                                                                                                  2577}
                                                                                                                                  +
                                                                                                                                  2578
                                                                                                                                  +
                                                                                                                                  2579template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2580size_t Peer_socket::sync_receive(const Mutable_buffer_sequence& target, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2581{
                                                                                                                                  +
                                                                                                                                  2582 return sync_receive_impl(target, Fine_time_pt(), err_code); // sync_receive() with infinite timeout.
                                                                                                                                  +
                                                                                                                                  2583}
                                                                                                                                  +
                                                                                                                                  2584
                                                                                                                                  +
                                                                                                                                  2585template<typename Rep, typename Period, typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2586size_t Peer_socket::sync_receive(const Mutable_buffer_sequence& target,
                                                                                                                                  +
                                                                                                                                  2587 const boost::chrono::duration<Rep, Period>& max_wait, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2588{
                                                                                                                                  +
                                                                                                                                  2589 assert(max_wait.count() > 0);
                                                                                                                                  +
                                                                                                                                  2590 return sync_receive_impl(target,
                                                                                                                                  + +
                                                                                                                                  2592 err_code);
                                                                                                                                  +
                                                                                                                                  2593}
                                                                                                                                  +
                                                                                                                                  2594
                                                                                                                                  +
                                                                                                                                  2595template<typename Rep, typename Period>
                                                                                                                                  +
                                                                                                                                  2596bool Peer_socket::sync_receive(const boost::asio::null_buffers&,
                                                                                                                                  +
                                                                                                                                  2597 const boost::chrono::duration<Rep, Period>& max_wait,
                                                                                                                                  +
                                                                                                                                  2598 Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2599{
                                                                                                                                  +
                                                                                                                                  2600 assert(max_wait.count() > 0);
                                                                                                                                  + +
                                                                                                                                  2602}
                                                                                                                                  +
                                                                                                                                  2603
                                                                                                                                  +
                                                                                                                                  2604template<typename Mutable_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  2605size_t Peer_socket::sync_receive_impl(const Mutable_buffer_sequence& target,
                                                                                                                                  +
                                                                                                                                  2606 const Fine_time_pt& wait_until, Error_code* err_code)
                                                                                                                                  +
                                                                                                                                  2607{
                                                                                                                                  +
                                                                                                                                  2608 namespace bind_ns = util::bind_ns;
                                                                                                                                  +
                                                                                                                                  2609 using bind_ns::bind;
                                                                                                                                  +
                                                                                                                                  2610
                                                                                                                                  +
                                                                                                                                  2611 FLOW_ERROR_EXEC_AND_THROW_ON_ERROR(size_t, Peer_socket::sync_receive_impl<Mutable_buffer_sequence>,
                                                                                                                                  +
                                                                                                                                  2612 bind_ns::cref(target), bind_ns::cref(wait_until), _1);
                                                                                                                                  +
                                                                                                                                  2613 // ^-- Call ourselves and return if err_code is null. If got to present line, err_code is not null.
                                                                                                                                  +
                                                                                                                                  2614
                                                                                                                                  +
                                                                                                                                  2615 // We are in user thread U != W.
                                                                                                                                  +
                                                                                                                                  2616
                                                                                                                                  +
                                                                                                                                  2617 Lock_guard lock(m_mutex); // Lock m_node; also it's a pre-condition for Node::send().
                                                                                                                                  +
                                                                                                                                  2618
                                                                                                                                  +
                                                                                                                                  2619 /* Forward the rest of the logic to Node.
                                                                                                                                  +
                                                                                                                                  2620 * Now, what I really want to do here is simply:
                                                                                                                                  +
                                                                                                                                  2621 * m_node->sync_receive(...args...);
                                                                                                                                  +
                                                                                                                                  2622 * I cannot, however, due to <see same situation explained in Peer_socket::send()>.
                                                                                                                                  +
                                                                                                                                  2623 * Therefore I do the following (<see Peer_socket::send() for more comments>). */
                                                                                                                                  +
                                                                                                                                  2624
                                                                                                                                  +
                                                                                                                                  2625 const auto rcv_buf_consume_func = [this, &target]()
                                                                                                                                  +
                                                                                                                                  2626 {
                                                                                                                                  +
                                                                                                                                  2627 return m_rcv_buf.consume_bufs_copy(target);
                                                                                                                                  +
                                                                                                                                  2628 };
                                                                                                                                  +
                                                                                                                                  2629 // ^-- Important to capture `&target`, not `target`; else `target` (albeit no actual buffers) will be copied!
                                                                                                                                  +
                                                                                                                                  2630
                                                                                                                                  +
                                                                                                                                  2631 lock.release(); // Let go of the mutex (mutex is still LOCKED).
                                                                                                                                  +
                                                                                                                                  2632 /* Let this untemplated function, in .cpp, deal with Node (since .cpp knows what *m_node really is).
                                                                                                                                  +
                                                                                                                                  2633 * Note: whatever contraption lambda generated above will be converted to a Function<...> with ... being
                                                                                                                                  +
                                                                                                                                  2634 * an appropriate signature that node_sync_receive() expects, seen in the above explanatory comment. */
                                                                                                                                  +
                                                                                                                                  2635 return node_sync_receive(rcv_buf_consume_func, wait_until, err_code);
                                                                                                                                  +
                                                                                                                                  2636} // Peer_socket::sync_receive()
                                                                                                                                  +
                                                                                                                                  2637
                                                                                                                                  +
                                                                                                                                  2638template<typename Opt_type>
                                                                                                                                  +
                                                                                                                                  2639Opt_type Peer_socket::opt(const Opt_type& opt_val_ref) const
                                                                                                                                  +
                                                                                                                                  2640{
                                                                                                                                  +
                                                                                                                                  2641 // Similar to Node::opt().
                                                                                                                                  + +
                                                                                                                                  2643 return opt_val_ref;
                                                                                                                                  +
                                                                                                                                  2644}
                                                                                                                                  +
                                                                                                                                  2645
                                                                                                                                  +
                                                                                                                                  2646} // namespace flow::net_flow
                                                                                                                                  +
                                                                                                                                  2647
                                                                                                                                  +
                                                                                                                                  Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
                                                                                                                                  Definition: log.hpp:1619
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  Utility class for use by Congestion_control_strategy implementations that implements congestion windo...
                                                                                                                                  @@ -2732,113 +2727,113 @@
                                                                                                                                  An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
                                                                                                                                  Definition: node.hpp:937
                                                                                                                                  A class that keeps a Peer_socket_receive_stats data store, includes methods to conveniently accumulat...
                                                                                                                                  A class that keeps a Peer_socket_send_stats data store, includes methods to conveniently accumulate d...
                                                                                                                                  -
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  -
                                                                                                                                  Drop_timer_ptr m_snd_drop_timer
                                                                                                                                  The Drop Timer engine, which controls how In-flight (m_snd_flying_pkts_by_sent_when) packets are cons...
                                                                                                                                  -
                                                                                                                                  friend std::ostream & operator<<(std::ostream &os, Int_state state)
                                                                                                                                  - -
                                                                                                                                  size_t m_snd_pending_rcv_wnd
                                                                                                                                  While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming(...
                                                                                                                                  +
                                                                                                                                  A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...
                                                                                                                                  +
                                                                                                                                  Drop_timer_ptr m_snd_drop_timer
                                                                                                                                  The Drop Timer engine, which controls how In-flight (m_snd_flying_pkts_by_sent_when) packets are cons...
                                                                                                                                  +
                                                                                                                                  friend std::ostream & operator<<(std::ostream &os, Int_state state)
                                                                                                                                  + +
                                                                                                                                  size_t m_snd_pending_rcv_wnd
                                                                                                                                  While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming(...
                                                                                                                                  size_t get_connect_metadata(const boost::asio::mutable_buffer &buffer, Error_code *err_code=0) const
                                                                                                                                  Obtains the serialized connect metadata, as supplied by the user during the connection handshake.
                                                                                                                                  -
                                                                                                                                  unsigned int m_init_rexmit_count
                                                                                                                                  If currently using m_init_rexmit_scheduled_task, this is the number of times the timer has already fi...
                                                                                                                                  +
                                                                                                                                  unsigned int m_init_rexmit_count
                                                                                                                                  If currently using m_init_rexmit_scheduled_task, this is the number of times the timer has already fi...
                                                                                                                                  size_t max_block_size_multiple(const size_t &opt_val_ref, const unsigned int *inflate_pct_val_ptr=0) const
                                                                                                                                  Returns the smallest multiple of max_block_size() that is >= the given option value,...
                                                                                                                                  -
                                                                                                                                  size_t m_snd_remote_rcv_wnd
                                                                                                                                  The receive window: the maximum number of bytes the other side has advertised it would be willing to ...
                                                                                                                                  -
                                                                                                                                  Sequence_number m_rcv_next_seq_num
                                                                                                                                  The maximal sequence number R from the remote side such that all data with sequence numbers strictly ...
                                                                                                                                  -
                                                                                                                                  size_t m_rcv_syn_rcvd_data_cumulative_size
                                                                                                                                  The running total count of bytes in the m_data fields of m_rcv_syn_rcvd_data_q.
                                                                                                                                  +
                                                                                                                                  size_t m_snd_remote_rcv_wnd
                                                                                                                                  The receive window: the maximum number of bytes the other side has advertised it would be willing to ...
                                                                                                                                  +
                                                                                                                                  Sequence_number m_rcv_next_seq_num
                                                                                                                                  The maximal sequence number R from the remote side such that all data with sequence numbers strictly ...
                                                                                                                                  +
                                                                                                                                  size_t m_rcv_syn_rcvd_data_cumulative_size
                                                                                                                                  The running total count of bytes in the m_data fields of m_rcv_syn_rcvd_data_q.
                                                                                                                                  bool sync_send_reactor_pattern_impl(const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Helper similar to sync_send_impl() but for the null_buffers versions of sync_send().
                                                                                                                                  -
                                                                                                                                  std::vector< boost::shared_ptr< Data_packet > > Rcv_syn_rcvd_data_q
                                                                                                                                  Type used for m_rcv_syn_rcvd_data_q.
                                                                                                                                  -
                                                                                                                                  std::map< Sequence_number, Sent_pkt_ordered_by_when_iter > Sent_pkt_by_seq_num_map
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  +
                                                                                                                                  std::vector< boost::shared_ptr< Data_packet > > Rcv_syn_rcvd_data_q
                                                                                                                                  Type used for m_rcv_syn_rcvd_data_q.
                                                                                                                                  +
                                                                                                                                  std::map< Sequence_number, Sent_pkt_ordered_by_when_iter > Sent_pkt_by_seq_num_map
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num type; see that data member.
                                                                                                                                  bool sync_receive_reactor_pattern_impl(const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Helper similar to sync_receive_impl() but for the null_buffers versions of sync_receive().
                                                                                                                                  -
                                                                                                                                  util::Mutex_non_recursive Options_mutex
                                                                                                                                  Short-hand for high-performance, non-reentrant, exclusive mutex used to lock m_opts.
                                                                                                                                  -
                                                                                                                                  order_num_t m_snd_last_order_num
                                                                                                                                  For the Sent_packet representing the next packet to be sent, this is the value to assign to m_sent_wh...
                                                                                                                                  -
                                                                                                                                  Sequence_number m_snd_next_seq_num
                                                                                                                                  The sequence number for the start of the data in the next new DATA packet to be sent out.
                                                                                                                                  -
                                                                                                                                  Remote_endpoint m_remote_endpoint
                                                                                                                                  See remote_endpoint(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  -
                                                                                                                                  size_t sync_receive(const Mutable_buffer_sequence &target, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of receive().
                                                                                                                                  -
                                                                                                                                  Fine_duration m_round_trip_time_variance
                                                                                                                                  RTTVAR used for m_snd_smoothed_round_trip_time calculation.
                                                                                                                                  -
                                                                                                                                  bool m_active_connect
                                                                                                                                  true if we connect() to server; false if we are to be/are accept()ed. Should be set once and not modi...
                                                                                                                                  -
                                                                                                                                  Int_state m_int_state
                                                                                                                                  Current internal state of the socket.
                                                                                                                                  -
                                                                                                                                  Fine_duration m_snd_drop_timeout
                                                                                                                                  The Drop Timeout: Time period between the next time m_snd_drop_timer schedules a Drop Timer and that ...
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_seq_num_map m_snd_flying_pkts_by_seq_num
                                                                                                                                  The collection of all In-flight packets (including those queued up to send in pacing module),...
                                                                                                                                  -
                                                                                                                                  boost::movelib::unique_ptr< Send_bandwidth_estimator > m_snd_bandwidth_estimator
                                                                                                                                  The outgoing available bandwidth estimator for this connection on this side.
                                                                                                                                  -
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  If !m_active_connect, this contains the serialized metadata that the user supplied on the other side ...
                                                                                                                                  -
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  Random security token used during SYN_ACK-SYN_ACK_ACK.
                                                                                                                                  +
                                                                                                                                  util::Mutex_non_recursive Options_mutex
                                                                                                                                  Short-hand for high-performance, non-reentrant, exclusive mutex used to lock m_opts.
                                                                                                                                  +
                                                                                                                                  order_num_t m_snd_last_order_num
                                                                                                                                  For the Sent_packet representing the next packet to be sent, this is the value to assign to m_sent_wh...
                                                                                                                                  +
                                                                                                                                  Sequence_number m_snd_next_seq_num
                                                                                                                                  The sequence number for the start of the data in the next new DATA packet to be sent out.
                                                                                                                                  +
                                                                                                                                  Remote_endpoint m_remote_endpoint
                                                                                                                                  See remote_endpoint(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  +
                                                                                                                                  size_t sync_receive(const Mutable_buffer_sequence &target, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of receive().
                                                                                                                                  +
                                                                                                                                  Fine_duration m_round_trip_time_variance
                                                                                                                                  RTTVAR used for m_snd_smoothed_round_trip_time calculation.
                                                                                                                                  +
                                                                                                                                  bool m_active_connect
                                                                                                                                  true if we connect() to server; false if we are to be/are accept()ed. Should be set once and not modi...
                                                                                                                                  +
                                                                                                                                  Int_state m_int_state
                                                                                                                                  Current internal state of the socket.
                                                                                                                                  +
                                                                                                                                  Fine_duration m_snd_drop_timeout
                                                                                                                                  The Drop Timeout: Time period between the next time m_snd_drop_timer schedules a Drop Timer and that ...
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_seq_num_map m_snd_flying_pkts_by_seq_num
                                                                                                                                  The collection of all In-flight packets (including those queued up to send in pacing module),...
                                                                                                                                  +
                                                                                                                                  boost::movelib::unique_ptr< Send_bandwidth_estimator > m_snd_bandwidth_estimator
                                                                                                                                  The outgoing available bandwidth estimator for this connection on this side.
                                                                                                                                  +
                                                                                                                                  util::Blob m_serialized_metadata
                                                                                                                                  If !m_active_connect, this contains the serialized metadata that the user supplied on the other side ...
                                                                                                                                  +
                                                                                                                                  security_token_t m_security_token
                                                                                                                                  Random security token used during SYN_ACK-SYN_ACK_ACK.
                                                                                                                                  size_t node_sync_send(const Function< size_t(size_t max_data_size)> &snd_buf_feed_func_or_empty, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  This is to sync_send() as node_send() is to send().
                                                                                                                                  -
                                                                                                                                  boost::movelib::unique_ptr< Congestion_control_strategy > m_snd_cong_ctl
                                                                                                                                  The congestion control strategy in use for this connection on this side.
                                                                                                                                  - -
                                                                                                                                  size_t sync_send_impl(const Const_buffer_sequence &data, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Same as sync_send() but uses a Fine_clock-based Fine_duration non-template type for implementation co...
                                                                                                                                  -
                                                                                                                                  Rcv_syn_rcvd_data_q m_rcv_syn_rcvd_data_q
                                                                                                                                  The queue of DATA packets received while in Int_state::S_SYN_RCVD state before the Syn_ack_ack_packet...
                                                                                                                                  -
                                                                                                                                  Error_code m_disconnect_cause
                                                                                                                                  The Error_code causing disconnection (if one has occurred or is occurring) on this socket; otherwise ...
                                                                                                                                  +
                                                                                                                                  boost::movelib::unique_ptr< Congestion_control_strategy > m_snd_cong_ctl
                                                                                                                                  The congestion control strategy in use for this connection on this side.
                                                                                                                                  + +
                                                                                                                                  size_t sync_send_impl(const Const_buffer_sequence &data, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Same as sync_send() but uses a Fine_clock-based Fine_duration non-template type for implementation co...
                                                                                                                                  +
                                                                                                                                  Rcv_syn_rcvd_data_q m_rcv_syn_rcvd_data_q
                                                                                                                                  The queue of DATA packets received while in Int_state::S_SYN_RCVD state before the Syn_ack_ack_packet...
                                                                                                                                  +
                                                                                                                                  Error_code m_disconnect_cause
                                                                                                                                  The Error_code causing disconnection (if one has occurred or is occurring) on this socket; otherwise ...
                                                                                                                                  Peer_socket(log::Logger *logger_ptr, util::Task_engine *task_engine, const Peer_socket_options &opts)
                                                                                                                                  Constructs object; initializes most values to well-defined (0, empty, etc.) but not necessarily meani...
                                                                                                                                  Definition: peer_socket.cpp:37
                                                                                                                                  -
                                                                                                                                  Fine_time_pt m_rcv_wnd_recovery_start_time
                                                                                                                                  Time point at which m_rcv_in_rcv_wnd_recovery was last set to true.
                                                                                                                                  -
                                                                                                                                  Send_pacing_data m_snd_pacing_data
                                                                                                                                  The state of outgoing packet pacing for this socket; segregated into a simple struct to keep Peer_soc...
                                                                                                                                  -
                                                                                                                                  Server_socket::Ptr m_originating_serv
                                                                                                                                  For sockets that come a Server_socket, this is the inverse of Server_socket::m_connecting_socks: it i...
                                                                                                                                  -
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_rcv_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) contained in the original Syn_packet or Syn_ack_packet we received.
                                                                                                                                  +
                                                                                                                                  Fine_time_pt m_rcv_wnd_recovery_start_time
                                                                                                                                  Time point at which m_rcv_in_rcv_wnd_recovery was last set to true.
                                                                                                                                  +
                                                                                                                                  Send_pacing_data m_snd_pacing_data
                                                                                                                                  The state of outgoing packet pacing for this socket; segregated into a simple struct to keep Peer_soc...
                                                                                                                                  +
                                                                                                                                  Server_socket::Ptr m_originating_serv
                                                                                                                                  For sockets that come a Server_socket, this is the inverse of Server_socket::m_connecting_socks: it i...
                                                                                                                                  +
                                                                                                                                  uint64_t security_token_t
                                                                                                                                  Type used for m_security_token.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_rcv_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) contained in the original Syn_packet or Syn_ack_packet we received.
                                                                                                                                  const Remote_endpoint & remote_endpoint() const
                                                                                                                                  Intended other side of the connection (regardless of success, failure, or current State).
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map m_snd_flying_pkts_by_sent_when
                                                                                                                                  The collection of all In-flight packets, indexed by sequence number and ordered from most to least re...
                                                                                                                                  -
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  -
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  -
                                                                                                                                  size_t sync_send(const Const_buffer_sequence &data, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of send().
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map m_snd_flying_pkts_by_sent_when
                                                                                                                                  The collection of all In-flight packets, indexed by sequence number and ordered from most to least re...
                                                                                                                                  +
                                                                                                                                  State
                                                                                                                                  State of a Peer_socket.
                                                                                                                                  +
                                                                                                                                  Open_sub_state
                                                                                                                                  The sub-state of a Peer_socket when state is State::S_OPEN.
                                                                                                                                  +
                                                                                                                                  size_t sync_send(const Const_buffer_sequence &data, const boost::chrono::duration< Rep, Period > &max_wait, Error_code *err_code=0)
                                                                                                                                  Blocking (synchronous) version of send().
                                                                                                                                  ~Peer_socket() override
                                                                                                                                  Boring virtual destructor. Note that deletion is to be handled exclusively via shared_ptr,...
                                                                                                                                  Definition: peer_socket.cpp:77
                                                                                                                                  Error_code disconnect_cause() const
                                                                                                                                  The error code that perviously caused state() to become State::S_CLOSED, or success code if state is ...
                                                                                                                                  -
                                                                                                                                  size_t m_rcv_pending_acks_size_at_recv_handler_start
                                                                                                                                  Helper state, to be used while inside either Node::low_lvl_recv_and_handle() or async part of Node::a...
                                                                                                                                  -
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  +
                                                                                                                                  size_t m_rcv_pending_acks_size_at_recv_handler_start
                                                                                                                                  Helper state, to be used while inside either Node::low_lvl_recv_and_handle() or async part of Node::a...
                                                                                                                                  +
                                                                                                                                  Sequence_number::seq_num_t order_num_t
                                                                                                                                  Short-hand for order number type. 0 is reserved. Caution: Keep in sync with Drop_timer::packet_id_t.
                                                                                                                                  flow_port_t local_port() const
                                                                                                                                  The local Flow-protocol port chosen by the Node (if active or passive open) or user (if passive open)...
                                                                                                                                  -
                                                                                                                                  flow_port_t m_local_port
                                                                                                                                  See local_port(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  -
                                                                                                                                  Peer_socket_receive_stats_accumulator m_rcv_stats
                                                                                                                                  Stats regarding incoming traffic (and resulting outgoing ACKs) for this connection so far.
                                                                                                                                  +
                                                                                                                                  flow_port_t m_local_port
                                                                                                                                  See local_port(). Should be set before user gets access to *this and not changed afterwards.
                                                                                                                                  +
                                                                                                                                  Peer_socket_receive_stats_accumulator m_rcv_stats
                                                                                                                                  Stats regarding incoming traffic (and resulting outgoing ACKs) for this connection so far.
                                                                                                                                  bool set_options(const Peer_socket_options &opts, Error_code *err_code=0)
                                                                                                                                  Dynamically replaces the current options set (options()) with the given options set.
                                                                                                                                  -
                                                                                                                                  size_t m_rcv_last_sent_rcv_wnd
                                                                                                                                  The last rcv_wnd value sent to the other side (in an ACK).
                                                                                                                                  -
                                                                                                                                  std::vector< Ack_packet::Individual_ack::Ptr > m_rcv_acked_packets
                                                                                                                                  While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming(...
                                                                                                                                  +
                                                                                                                                  size_t m_rcv_last_sent_rcv_wnd
                                                                                                                                  The last rcv_wnd value sent to the other side (in an ACK).
                                                                                                                                  +
                                                                                                                                  std::vector< Ack_packet::Individual_ack::Ptr > m_rcv_acked_packets
                                                                                                                                  While Node::low_lvl_recv_and_handle() or async part of Node::async_wait_latency_then_handle_incoming(...
                                                                                                                                  size_t node_send(const Function< size_t(size_t max_data_size)> &snd_buf_feed_func, Error_code *err_code)
                                                                                                                                  Non-template helper for template send() that forwards the send() logic to Node::send().
                                                                                                                                  -
                                                                                                                                  std::list< boost::shared_ptr< Sent_packet > > m_snd_rexmit_q
                                                                                                                                  If retransmission is on, this is the retransmission queue.
                                                                                                                                  -
                                                                                                                                  util::Scheduled_task_handle m_init_rexmit_scheduled_task
                                                                                                                                  Connection attempt scheduled task; fires if an individual connection request packet is not answered w...
                                                                                                                                  -
                                                                                                                                  util::Timer m_rcv_delayed_ack_timer
                                                                                                                                  Timer started, assuming delayed ACKs are enabled, when the first Individual_ack is placed onto an emp...
                                                                                                                                  +
                                                                                                                                  std::list< boost::shared_ptr< Sent_packet > > m_snd_rexmit_q
                                                                                                                                  If retransmission is on, this is the retransmission queue.
                                                                                                                                  +
                                                                                                                                  util::Scheduled_task_handle m_init_rexmit_scheduled_task
                                                                                                                                  Connection attempt scheduled task; fires if an individual connection request packet is not answered w...
                                                                                                                                  +
                                                                                                                                  util::Timer m_rcv_delayed_ack_timer
                                                                                                                                  Timer started, assuming delayed ACKs are enabled, when the first Individual_ack is placed onto an emp...
                                                                                                                                  bool rexmit_on() const
                                                                                                                                  Whether retransmission is enabled on this connection.
                                                                                                                                  size_t node_sync_receive(const Function< size_t()> &rcv_buf_consume_func_or_empty, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  This is to sync_receive() as node_receive() is to receive().
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_seq_num_map::iterator Sent_pkt_ordered_by_seq_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num iterator type.
                                                                                                                                  -
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  -
                                                                                                                                  Socket_buffer m_snd_buf
                                                                                                                                  The Send buffer; user feeds data at the back; Node consumes data at the front.
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_seq_num_map::iterator Sent_pkt_ordered_by_seq_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num iterator type.
                                                                                                                                  +
                                                                                                                                  Int_state
                                                                                                                                  The state of the socket (and the connection from this end's point of view) for the internal state mac...
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Options_mutex > Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  +
                                                                                                                                  Socket_buffer m_snd_buf
                                                                                                                                  The Send buffer; user feeds data at the back; Node consumes data at the front.
                                                                                                                                  void close_abruptly(Error_code *err_code=0)
                                                                                                                                  Acts as if fatal error error::Code::S_USER_CLOSED_ABRUPTLY has been discovered on the connection.
                                                                                                                                  -
                                                                                                                                  size_t m_snd_rexmit_q_size
                                                                                                                                  Equals m_snd_rexmit_q.size(). Kept since m_snd_rexmit_q.size() may be O(n) depending on implementatio...
                                                                                                                                  +
                                                                                                                                  size_t m_snd_rexmit_q_size
                                                                                                                                  Equals m_snd_rexmit_q.size(). Kept since m_snd_rexmit_q.size() may be O(n) depending on implementatio...
                                                                                                                                  size_t max_block_size() const
                                                                                                                                  The maximum number of bytes of user data per received or sent packet on this connection.
                                                                                                                                  -
                                                                                                                                  size_t m_rcv_reassembly_q_data_size
                                                                                                                                  With retransmission enabled, the sum of Received_packet::m_size over all packets stored in the reasse...
                                                                                                                                  +
                                                                                                                                  size_t m_rcv_reassembly_q_data_size
                                                                                                                                  With retransmission enabled, the sum of Received_packet::m_size over all packets stored in the reasse...
                                                                                                                                  Node * node() const
                                                                                                                                  Node that produced this Peer_socket.
                                                                                                                                  Definition: peer_socket.cpp:95
                                                                                                                                  -
                                                                                                                                  Fine_time_pt m_snd_last_loss_event_when
                                                                                                                                  The last time that Node has detected a packet loss event and so informed m_snd_cong_ctl by calling th...
                                                                                                                                  +
                                                                                                                                  Fine_time_pt m_snd_last_loss_event_when
                                                                                                                                  The last time that Node has detected a packet loss event and so informed m_snd_cong_ctl by calling th...
                                                                                                                                  Peer_socket_info info() const
                                                                                                                                  Returns a structure containing the most up-to-date stats about this connection.
                                                                                                                                  -
                                                                                                                                  Socket_buffer m_rcv_buf
                                                                                                                                  The Receive buffer; Node feeds data at the back; user consumes data at the front.
                                                                                                                                  -
                                                                                                                                  Recvd_pkt_map::iterator Recvd_pkt_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps iterator type.
                                                                                                                                  -
                                                                                                                                  Mutex m_mutex
                                                                                                                                  This object's mutex.
                                                                                                                                  -
                                                                                                                                  Peer_socket_send_stats_accumulator m_snd_stats
                                                                                                                                  Stats regarding outgoing traffic (and resulting incoming ACKs) for this connection so far.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_seq_num_map::const_iterator Sent_pkt_ordered_by_seq_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num const iterator type.
                                                                                                                                  -
                                                                                                                                  Peer_socket_info m_info_on_close
                                                                                                                                  This is the final set of stats collected at the time the socket was moved to S_CLOSED m_state.
                                                                                                                                  +
                                                                                                                                  Socket_buffer m_rcv_buf
                                                                                                                                  The Receive buffer; Node feeds data at the back; user consumes data at the front.
                                                                                                                                  +
                                                                                                                                  Recvd_pkt_map::iterator Recvd_pkt_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps iterator type.
                                                                                                                                  +
                                                                                                                                  Mutex m_mutex
                                                                                                                                  This object's mutex.
                                                                                                                                  +
                                                                                                                                  Peer_socket_send_stats_accumulator m_snd_stats
                                                                                                                                  Stats regarding outgoing traffic (and resulting incoming ACKs) for this connection so far.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::iterator Sent_pkt_ordered_by_when_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when iterator type.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_seq_num_map::const_iterator Sent_pkt_ordered_by_seq_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_seq_num const iterator type.
                                                                                                                                  +
                                                                                                                                  Peer_socket_info m_info_on_close
                                                                                                                                  This is the final set of stats collected at the time the socket was moved to S_CLOSED m_state.
                                                                                                                                  bool ensure_open(Error_code *err_code) const
                                                                                                                                  Helper that is equivalent to Node::ensure_sock_open(this, err_code).
                                                                                                                                  -
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  -
                                                                                                                                  Sequence_number m_snd_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) used in our original SYN or SYN_ACK.
                                                                                                                                  -
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Analogous to Node::opt() but for per-socket options.
                                                                                                                                  +
                                                                                                                                  Sent_pkt_by_sent_when_map::const_iterator Sent_pkt_ordered_by_when_const_iter
                                                                                                                                  Short-hand for m_snd_flying_pkts_by_sent_when const iterator type.
                                                                                                                                  +
                                                                                                                                  Sequence_number m_snd_init_seq_num
                                                                                                                                  The Initial Sequence Number (ISN) used in our original SYN or SYN_ACK.
                                                                                                                                  +
                                                                                                                                  Opt_type opt(const Opt_type &opt_val_ref) const
                                                                                                                                  Analogous to Node::opt() but for per-socket options.
                                                                                                                                  std::string bytes_blocks_str(size_t bytes) const
                                                                                                                                  Helper that, given a byte count, returns a string with that byte count and the number of max_block_si...
                                                                                                                                  -
                                                                                                                                  Fine_duration m_snd_smoothed_round_trip_time
                                                                                                                                  Estimated current round trip time of packets, computed as a smooth value over the past individual RTT...
                                                                                                                                  -
                                                                                                                                  util::Mutex_recursive Mutex
                                                                                                                                  Short-hand for reentrant mutex type.
                                                                                                                                  -
                                                                                                                                  size_t sync_receive_impl(const Mutable_buffer_sequence &target, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Same as sync_receive() but uses a Fine_clock-based Fine_duration non-template type for implementation...
                                                                                                                                  -
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_pending_acks
                                                                                                                                  The received packets to be acknowledged in the next low-level ACK packet to be sent to the other side...
                                                                                                                                  -
                                                                                                                                  Peer_socket_options m_opts
                                                                                                                                  This socket's per-socket set of options.
                                                                                                                                  -
                                                                                                                                  bool m_rcv_in_rcv_wnd_recovery
                                                                                                                                  true indicates we are in a state where we've decided other side needs to be informed that our receive...
                                                                                                                                  -
                                                                                                                                  util::Scheduled_task_handle m_connection_timeout_scheduled_task
                                                                                                                                  Connection timeout scheduled task; fires if the entire initial connection process does not complete w...
                                                                                                                                  +
                                                                                                                                  Fine_duration m_snd_smoothed_round_trip_time
                                                                                                                                  Estimated current round trip time of packets, computed as a smooth value over the past individual RTT...
                                                                                                                                  +
                                                                                                                                  util::Mutex_recursive Mutex
                                                                                                                                  Short-hand for reentrant mutex type.
                                                                                                                                  +
                                                                                                                                  size_t sync_receive_impl(const Mutable_buffer_sequence &target, const Fine_time_pt &wait_until, Error_code *err_code)
                                                                                                                                  Same as sync_receive() but uses a Fine_clock-based Fine_duration non-template type for implementation...
                                                                                                                                  +
                                                                                                                                  std::vector< boost::shared_ptr< Individual_ack > > m_rcv_pending_acks
                                                                                                                                  The received packets to be acknowledged in the next low-level ACK packet to be sent to the other side...
                                                                                                                                  +
                                                                                                                                  Peer_socket_options m_opts
                                                                                                                                  This socket's per-socket set of options.
                                                                                                                                  +
                                                                                                                                  bool m_rcv_in_rcv_wnd_recovery
                                                                                                                                  true indicates we are in a state where we've decided other side needs to be informed that our receive...
                                                                                                                                  +
                                                                                                                                  util::Scheduled_task_handle m_connection_timeout_scheduled_task
                                                                                                                                  Connection timeout scheduled task; fires if the entire initial connection process does not complete w...
                                                                                                                                  Peer_socket_options options() const
                                                                                                                                  Copies this socket's option set and returns that copy.
                                                                                                                                  -
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  -
                                                                                                                                  std::map< Sequence_number, boost::shared_ptr< Received_packet > > Recvd_pkt_map
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps type; see that data member.
                                                                                                                                  -
                                                                                                                                  Recvd_pkt_map::const_iterator Recvd_pkt_const_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps const iterator type.
                                                                                                                                  -
                                                                                                                                  Open_sub_state m_open_sub_state
                                                                                                                                  See state().
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Drop_timer > Drop_timer_ptr
                                                                                                                                  Short-hand for shared_ptr to immutable Drop_timer (can't use Drop_timer::Ptr due to C++ and circular ...
                                                                                                                                  -
                                                                                                                                  Recvd_pkt_map m_rcv_packets_with_gaps
                                                                                                                                  The sequence-number-ordered collection of all received-and-not-dropped-due-to-buffer-overflow packets...
                                                                                                                                  -
                                                                                                                                  size_t m_snd_flying_bytes
                                                                                                                                  The number of bytes contained in all In-flight packets, used at least for comparison against the cong...
                                                                                                                                  -
                                                                                                                                  std::vector< order_num_t > m_snd_temp_pkts_marked_to_drop
                                                                                                                                  Helper data structure to store the packet IDs of packets that are marked Dropped during a single run ...
                                                                                                                                  -
                                                                                                                                  size_t receive(const Mutable_buffer_sequence &target, Error_code *err_code=0)
                                                                                                                                  Receives (consumes from the Receive buffer) bytes of data, up to a given maximum cumulative number of...
                                                                                                                                  -
                                                                                                                                  Fine_time_pt m_snd_last_data_sent_when
                                                                                                                                  Time at which the last Data_packet low-level packet for this connection was sent.
                                                                                                                                  +
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  +
                                                                                                                                  std::map< Sequence_number, boost::shared_ptr< Received_packet > > Recvd_pkt_map
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps type; see that data member.
                                                                                                                                  +
                                                                                                                                  Recvd_pkt_map::const_iterator Recvd_pkt_const_iter
                                                                                                                                  Short-hand for m_rcv_packets_with_gaps const iterator type.
                                                                                                                                  +
                                                                                                                                  Open_sub_state m_open_sub_state
                                                                                                                                  See state().
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Drop_timer > Drop_timer_ptr
                                                                                                                                  Short-hand for shared_ptr to immutable Drop_timer (can't use Drop_timer::Ptr due to C++ and circular ...
                                                                                                                                  +
                                                                                                                                  Recvd_pkt_map m_rcv_packets_with_gaps
                                                                                                                                  The sequence-number-ordered collection of all received-and-not-dropped-due-to-buffer-overflow packets...
                                                                                                                                  +
                                                                                                                                  size_t m_snd_flying_bytes
                                                                                                                                  The number of bytes contained in all In-flight packets, used at least for comparison against the cong...
                                                                                                                                  +
                                                                                                                                  std::vector< order_num_t > m_snd_temp_pkts_marked_to_drop
                                                                                                                                  Helper data structure to store the packet IDs of packets that are marked Dropped during a single run ...
                                                                                                                                  +
                                                                                                                                  size_t receive(const Mutable_buffer_sequence &target, Error_code *err_code=0)
                                                                                                                                  Receives (consumes from the Receive buffer) bytes of data, up to a given maximum cumulative number of...
                                                                                                                                  +
                                                                                                                                  Fine_time_pt m_snd_last_data_sent_when
                                                                                                                                  Time at which the last Data_packet low-level packet for this connection was sent.
                                                                                                                                  size_t node_receive(const Function< size_t()> &rcv_buf_consume_func, Error_code *err_code)
                                                                                                                                  Non-template helper for template receive() that forwards the receive() logic to Node::receive().
                                                                                                                                  -
                                                                                                                                  size_t send(const Const_buffer_sequence &data, Error_code *err_code=0)
                                                                                                                                  Sends (adds to the Send buffer) the given bytes of data up to a maximum internal buffer size; and asy...
                                                                                                                                  +
                                                                                                                                  size_t send(const Const_buffer_sequence &data, Error_code *err_code=0)
                                                                                                                                  Sends (adds to the Send buffer) the given bytes of data up to a maximum internal buffer size; and asy...
                                                                                                                                  State state(Open_sub_state *open_sub_state=0) const
                                                                                                                                  Current State of the socket.
                                                                                                                                  Definition: peer_socket.cpp:85
                                                                                                                                  -
                                                                                                                                  util::Scheduled_task_handle m_rcv_wnd_recovery_scheduled_task
                                                                                                                                  When m_rcv_in_rcv_wnd_recovery is true, this is the scheduled task to possibly send another unsolicit...
                                                                                                                                  +
                                                                                                                                  util::Scheduled_task_handle m_rcv_wnd_recovery_scheduled_task
                                                                                                                                  When m_rcv_in_rcv_wnd_recovery is true, this is the scheduled task to possibly send another unsolicit...
                                                                                                                                  A per-Peer_socket module that tries to estimate the bandwidth available to the outgoing flow.
                                                                                                                                  Definition: bandwidth.hpp:125
                                                                                                                                  An internal net_flow sequence number identifying a piece of data.
                                                                                                                                  Definition: seq_num.hpp:126
                                                                                                                                  uint64_t seq_num_t
                                                                                                                                  Raw sequence number type.
                                                                                                                                  Definition: seq_num.hpp:138
                                                                                                                                  @@ -2868,9 +2863,9 @@
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  boost::asio::basic_waitable_timer< Fine_clock > Timer
                                                                                                                                  boost.asio timer.
                                                                                                                                  Definition: util_fwd.hpp:202
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  @@ -2879,39 +2874,39 @@ -
                                                                                                                                  Metadata describing the data sent in the acknowledgment of an individual received packet.
                                                                                                                                  -
                                                                                                                                  const size_t m_data_size
                                                                                                                                  Number of bytes in the packet's user data.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  -
                                                                                                                                  const unsigned int m_rexmit_id
                                                                                                                                  Retransmit counter of the packet (as reported by sender).
                                                                                                                                  -
                                                                                                                                  const Sequence_number m_seq_num
                                                                                                                                  Sequence number of first datum in packet.
                                                                                                                                  -
                                                                                                                                  Individual_ack(const Individual_ack &)=delete
                                                                                                                                  Force direct member initialization even if no member is const.
                                                                                                                                  -
                                                                                                                                  Individual_ack & operator=(const Individual_ack &)=delete
                                                                                                                                  Forbid copy assignment.
                                                                                                                                  -
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  -
                                                                                                                                  const Fine_time_pt m_received_when
                                                                                                                                  When was it received? Used for supplying delay before acknowledging (for other side's RTT calculation...
                                                                                                                                  -
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been received (and,...
                                                                                                                                  -
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  +
                                                                                                                                  Metadata describing the data sent in the acknowledgment of an individual received packet.
                                                                                                                                  +
                                                                                                                                  const size_t m_data_size
                                                                                                                                  Number of bytes in the packet's user data.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< const Individual_ack > Const_ptr
                                                                                                                                  Short-hand for ref-counted pointer to immutable objects of this class.
                                                                                                                                  +
                                                                                                                                  const unsigned int m_rexmit_id
                                                                                                                                  Retransmit counter of the packet (as reported by sender).
                                                                                                                                  +
                                                                                                                                  const Sequence_number m_seq_num
                                                                                                                                  Sequence number of first datum in packet.
                                                                                                                                  +
                                                                                                                                  boost::shared_ptr< Individual_ack > Ptr
                                                                                                                                  Short-hand for ref-counted pointer to mutable objects of this class.
                                                                                                                                  +
                                                                                                                                  const Fine_time_pt m_received_when
                                                                                                                                  When was it received? Used for supplying delay before acknowledging (for other side's RTT calculation...
                                                                                                                                  +
                                                                                                                                  util::Noncopyable m_nc
                                                                                                                                  Make us noncopyable without breaking aggregateness (direct-init).
                                                                                                                                  +
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been received (and,...
                                                                                                                                  +
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of that packet.
                                                                                                                                  Received_packet(log::Logger *logger_ptr, size_t size, util::Blob *src_data)
                                                                                                                                  Constructs object by storing size of data and, if so instructed, the data themselves.
                                                                                                                                  -
                                                                                                                                  util::Blob m_data
                                                                                                                                  Byte sequence equal to that of Data_packet::m_data of the packet.
                                                                                                                                  -
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  -
                                                                                                                                  const order_num_t m_order_num
                                                                                                                                  Order number of the packet.
                                                                                                                                  -
                                                                                                                                  size_t m_sent_cwnd_bytes
                                                                                                                                  The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  -
                                                                                                                                  Fine_time_pt m_sent_time
                                                                                                                                  The timestamp when the packet is sent out.
                                                                                                                                  -
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  +
                                                                                                                                  util::Blob m_data
                                                                                                                                  Byte sequence equal to that of Data_packet::m_data of the packet.
                                                                                                                                  +
                                                                                                                                  Data store to keep timing related info when a packet is sent out.
                                                                                                                                  +
                                                                                                                                  const order_num_t m_order_num
                                                                                                                                  Order number of the packet.
                                                                                                                                  +
                                                                                                                                  size_t m_sent_cwnd_bytes
                                                                                                                                  The congestion window size (in bytes) that is used when the packet is sent out.
                                                                                                                                  +
                                                                                                                                  Fine_time_pt m_sent_time
                                                                                                                                  The timestamp when the packet is sent out.
                                                                                                                                  +
                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission i...
                                                                                                                                  Sent_packet(bool rexmit_on, boost::shared_ptr< Data_packet > packet, const Sent_when &sent_when)
                                                                                                                                  Constructs object with the given values and m_acks_after_me at zero.
                                                                                                                                  -
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  -
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  -
                                                                                                                                  const boost::shared_ptr< Data_packet > m_packet
                                                                                                                                  If retransmission is on, this is the DATA packet itself that was sent; otherwise null.
                                                                                                                                  -
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  -
                                                                                                                                  ack_count_t m_acks_after_me
                                                                                                                                  The number of times any packet with m_sent_when.back().m_order_num > this->m_sent_when....
                                                                                                                                  +
                                                                                                                                  std::vector< Sent_when > m_sent_when
                                                                                                                                  Time stamps, order numbers, and other info at the times when the different attempts (including origin...
                                                                                                                                  +
                                                                                                                                  const size_t m_size
                                                                                                                                  Number of bytes in the Data_packet::m_data field of the sent packet.
                                                                                                                                  +
                                                                                                                                  const boost::shared_ptr< Data_packet > m_packet
                                                                                                                                  If retransmission is on, this is the DATA packet itself that was sent; otherwise null.
                                                                                                                                  +
                                                                                                                                  uint16_t ack_count_t
                                                                                                                                  Type used for m_acks_after_me.
                                                                                                                                  +
                                                                                                                                  ack_count_t m_acks_after_me
                                                                                                                                  The number of times any packet with m_sent_when.back().m_order_num > this->m_sent_when....
                                                                                                                                  A data store that keeps stats about the a Peer_socket connection.
                                                                                                                                  Definition: info.hpp:456
                                                                                                                                  A set of low-level options affecting a single Peer_socket.
                                                                                                                                  Definition: options.hpp:36
                                                                                                                                  Represents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remo...
                                                                                                                                  Definition: endpoint.hpp:93
                                                                                                                                  The current outgoing packet pacing state, including queue of low-level packets to be sent,...
                                                                                                                                  Definition: low_lvl_io.hpp:178
                                                                                                                                  +
                                                                                                                                  Useful as a no-unique-address private member to make a type noncopyable while keeping that type an ag...
                                                                                                                                  Definition: util.hpp:74
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/perf__fwd_8hpp.html b/doc/flow_doc/generated/html_full/perf__fwd_8hpp.html index f7d40af9d..351c4cce1 100644 --- a/doc/flow_doc/generated/html_full/perf__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/perf__fwd_8hpp.html @@ -114,7 +114,7 @@ diff --git a/doc/flow_doc/generated/html_full/perf__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/perf__fwd_8hpp_source.html index ece36740a..5d876a7e3 100644 --- a/doc/flow_doc/generated/html_full/perf__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/perf__fwd_8hpp_source.html @@ -352,7 +352,7 @@ diff --git a/doc/flow_doc/generated/html_full/port__space_8cpp.html b/doc/flow_doc/generated/html_full/port__space_8cpp.html index 9dbc3c0ec..2eac31019 100644 --- a/doc/flow_doc/generated/html_full/port__space_8cpp.html +++ b/doc/flow_doc/generated/html_full/port__space_8cpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/port__space_8cpp_source.html b/doc/flow_doc/generated/html_full/port__space_8cpp_source.html index f4db9b751..6dd8be319 100644 --- a/doc/flow_doc/generated/html_full/port__space_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/port__space_8cpp_source.html @@ -384,16 +384,16 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  const flow_port_t S_PORT_ANY
                                                                                                                                  Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
                                                                                                                                  Definition: port_space.cpp:33
                                                                                                                                  -
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:262
                                                                                                                                  +
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:287
                                                                                                                                  boost::chrono::microseconds time_since_posix_epoch()
                                                                                                                                  Get the current POSIX (Unix) time as a duration from the Epoch time point.
                                                                                                                                  Definition: util.cpp:147
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/port__space_8hpp.html b/doc/flow_doc/generated/html_full/port__space_8hpp.html index e439da18d..0e5328859 100644 --- a/doc/flow_doc/generated/html_full/port__space_8hpp.html +++ b/doc/flow_doc/generated/html_full/port__space_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/port__space_8hpp_source.html b/doc/flow_doc/generated/html_full/port__space_8hpp_source.html index 01137ea6e..e3f5a175d 100644 --- a/doc/flow_doc/generated/html_full/port__space_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/port__space_8hpp_source.html @@ -347,14 +347,14 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/random_8hpp.html b/doc/flow_doc/generated/html_full/random_8hpp.html index 1a2739c4e..23f131678 100644 --- a/doc/flow_doc/generated/html_full/random_8hpp.html +++ b/doc/flow_doc/generated/html_full/random_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/random_8hpp_source.html b/doc/flow_doc/generated/html_full/random_8hpp_source.html index 10f0cb50f..d3f19a132 100644 --- a/doc/flow_doc/generated/html_full/random_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/random_8hpp_source.html @@ -302,7 +302,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task_8cpp.html b/doc/flow_doc/generated/html_full/sched__task_8cpp.html index bff88aa79..696aa8c3b 100644 --- a/doc/flow_doc/generated/html_full/sched__task_8cpp.html +++ b/doc/flow_doc/generated/html_full/sched__task_8cpp.html @@ -107,7 +107,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task_8cpp_source.html b/doc/flow_doc/generated/html_full/sched__task_8cpp_source.html index 51be20c49..b99f65b31 100644 --- a/doc/flow_doc/generated/html_full/sched__task_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/sched__task_8cpp_source.html @@ -364,13 +364,13 @@
                                                                                                                                  bool scheduled_task_canceled(log::Logger *logger_ptr, Scheduled_task_const_handle task)
                                                                                                                                  Returns whether a previously scheduled (by schedule_task_from_now() or similar) task has been cancele...
                                                                                                                                  Definition: sched_task.cpp:259
                                                                                                                                  bool scheduled_task_cancel(log::Logger *logger_ptr, Scheduled_task_handle task)
                                                                                                                                  Attempts to prevent the execution of a previously scheduled (by schedule_task_from_now() or similar) ...
                                                                                                                                  Definition: sched_task.cpp:26
                                                                                                                                  boost::shared_ptr< const Scheduled_task_handle_state > Scheduled_task_const_handle
                                                                                                                                  Equivalent to Scheduled_task_handle but refers to immutable version of a task.
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/sched__task_8hpp.html b/doc/flow_doc/generated/html_full/sched__task_8hpp.html index aa2f4b914..8e01d3c51 100644 --- a/doc/flow_doc/generated/html_full/sched__task_8hpp.html +++ b/doc/flow_doc/generated/html_full/sched__task_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task_8hpp_source.html b/doc/flow_doc/generated/html_full/sched__task_8hpp_source.html index 9edc5d36f..0d5ff725e 100644 --- a/doc/flow_doc/generated/html_full/sched__task_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/sched__task_8hpp_source.html @@ -346,15 +346,15 @@
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Scheduled_task_handle schedule_task_at(log::Logger *logger_ptr, const Fine_time_pt &at, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
                                                                                                                                  Identical to schedule_task_from_now() except the time is specified in absolute terms.
                                                                                                                                  Definition: sched_task.hpp:245
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp.html b/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp.html index 5e6c07264..904e7f930 100644 --- a/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp.html @@ -130,7 +130,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp_source.html index b1a83dc68..ad4f04919 100644 --- a/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/sched__task__fwd_8hpp_source.html @@ -374,7 +374,7 @@
                                                                                                                                  303
                                                                                                                                  304} // namespace flow::util
                                                                                                                                  - +
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
                                                                                                                                  Definition: basic_blob.hpp:29
                                                                                                                                  @@ -388,13 +388,13 @@
                                                                                                                                  bool scheduled_task_cancel(log::Logger *logger_ptr, Scheduled_task_handle task)
                                                                                                                                  Attempts to prevent the execution of a previously scheduled (by schedule_task_from_now() or similar) ...
                                                                                                                                  Definition: sched_task.cpp:26
                                                                                                                                  boost::shared_ptr< const Scheduled_task_handle_state > Scheduled_task_const_handle
                                                                                                                                  Equivalent to Scheduled_task_handle but refers to immutable version of a task.
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp.html b/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp.html index 29f88ffe1..69ba89d93 100644 --- a/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp.html +++ b/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp_source.html b/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp_source.html index d26c4d677..61e619c10 100644 --- a/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/sched__task__handle__state_8cpp_source.html @@ -111,7 +111,7 @@
                                                                                                                                  39}
                                                                                                                                  40
                                                                                                                                  41} // namespace flow::util
                                                                                                                                  - +
                                                                                                                                  uint64_t id_t
                                                                                                                                  Raw integer type to uniquely identify a thing. 64-bit width should make overflow extremely hard to re...
                                                                                                                                  Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
                                                                                                                                  Definition: basic_blob.hpp:29
                                                                                                                                  boost::mutex Mutex_non_recursive
                                                                                                                                  Short-hand for non-reentrant, exclusive mutex. ("Reentrant" = one can lock an already-locked-in-that-...
                                                                                                                                  Definition: util_fwd.hpp:215
                                                                                                                                  @@ -121,7 +121,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp.html b/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp.html index 3d3ed5cc7..1448fa433 100644 --- a/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp.html +++ b/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp_source.html b/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp_source.html index f8e937a57..ebd3c4933 100644 --- a/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/sched__task__handle__state_8hpp_source.html @@ -179,7 +179,7 @@
                                                                                                                                  107}; // struct Scheduled_task_handle_state
                                                                                                                                  108
                                                                                                                                  109} // namespace flow::util
                                                                                                                                  - +
                                                                                                                                  uint64_t id_t
                                                                                                                                  Raw integer type to uniquely identify a thing. 64-bit width should make overflow extremely hard to re...
                                                                                                                                  Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
                                                                                                                                  Definition: basic_blob.hpp:29
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  @@ -199,7 +199,7 @@ diff --git a/doc/flow_doc/generated/html_full/search/all_11.js b/doc/flow_doc/generated/html_full/search/all_11.js index 7b718436d..483d6844f 100644 --- a/doc/flow_doc/generated/html_full/search/all_11.js +++ b/doc/flow_doc/generated/html_full/search/all_11.js @@ -297,8 +297,8 @@ var searchData= ['start_5fpast_5fprefix_5finc_294',['start_past_prefix_inc',['../classflow_1_1util_1_1Basic__blob.html#a9c3497d662be650e7a560eb7a703acc1',1,'flow::util::Basic_blob']]], ['start_5ftimer_295',['start_timer',['../classflow_1_1net__flow_1_1Drop__timer.html#a4a5f0bbb91232e17e258722e4dfa237b',1,'flow::net_flow::Drop_timer']]], ['starts_5fwith_296',['starts_with',['../classflow_1_1util_1_1Basic__string__view.html#afdb616000a65f5e65ee99ce7808153e8',1,'flow::util::Basic_string_view::starts_with(Basic_string_view needle) const'],['../classflow_1_1util_1_1Basic__string__view.html#ae0846fbeb776ef1e083a041a7f816567',1,'flow::util::Basic_string_view::starts_with(Ch const *needle) const'],['../classflow_1_1util_1_1Basic__string__view.html#a2cbc4a17df32bba3f48567c548589874',1,'flow::util::Basic_string_view::starts_with(Ch needle) const']]], - ['state_297',['State',['../classflow_1_1net__flow_1_1Event__set.html#a2855bd159b6e63bf448ed1f41b608975',1,'flow::net_flow::Event_set::State()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6a9bb727c8982f24bcf978c10c2c7345',1,'flow::net_flow::Peer_socket::State()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8bc789b851677a47d7c0a1aa0c69a997',1,'flow::net_flow::Server_socket::State()']]], - ['state_298',['state',['../classflow_1_1net__flow_1_1Event__set.html#a8453cccdaaf22ea6b027c5de9738f0f0',1,'flow::net_flow::Event_set::state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#af982953b5136c1df488066eacc293a78',1,'flow::net_flow::Peer_socket::state()'],['../classflow_1_1net__flow_1_1Server__socket.html#ab2683ecde1fac2b0a79a957de1a2a8ff',1,'flow::net_flow::Server_socket::state()']]], + ['state_297',['state',['../classflow_1_1net__flow_1_1Event__set.html#a8453cccdaaf22ea6b027c5de9738f0f0',1,'flow::net_flow::Event_set::state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#af982953b5136c1df488066eacc293a78',1,'flow::net_flow::Peer_socket::state()'],['../classflow_1_1net__flow_1_1Server__socket.html#ab2683ecde1fac2b0a79a957de1a2a8ff',1,'flow::net_flow::Server_socket::state()']]], + ['state_298',['State',['../classflow_1_1net__flow_1_1Event__set.html#a2855bd159b6e63bf448ed1f41b608975',1,'flow::net_flow::Event_set::State()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6a9bb727c8982f24bcf978c10c2c7345',1,'flow::net_flow::Peer_socket::State()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8bc789b851677a47d7c0a1aa0c69a997',1,'flow::net_flow::Server_socket::State()']]], ['state_5fto_5fostream_299',['state_to_ostream',['../classflow_1_1cfg_1_1Config__manager.html#a19ae9775f51953805ea08086c276a78d',1,'flow::cfg::Config_manager']]], ['state_5fto_5fostream_5fimpl_300',['state_to_ostream_impl',['../classflow_1_1cfg_1_1Config__manager.html#afbf1eca924be81654eaa4140814a816f',1,'flow::cfg::Config_manager']]], ['static_5fcfg_5fmanager_2ehpp_301',['static_cfg_manager.hpp',['../static__cfg__manager_8hpp.html',1,'']]], diff --git a/doc/flow_doc/generated/html_full/search/all_14.js b/doc/flow_doc/generated/html_full/search/all_14.js index 22a1a4374..166ddb1ce 100644 --- a/doc/flow_doc/generated/html_full/search/all_14.js +++ b/doc/flow_doc/generated/html_full/search/all_14.js @@ -9,8 +9,8 @@ var searchData= ['validate_5fstatic_5foption_6',['validate_static_option',['../classflow_1_1net__flow_1_1Node.html#a8aa99dc4800a49b7b958b585717eb50b',1,'flow::net_flow::Node']]], ['validate_5fvalues_7',['validate_values',['../classflow_1_1cfg_1_1Option__set.html#a601592ed6eacb42eb5296a2c79fb6ace',1,'flow::cfg::Option_set::validate_values(const Values &values_to_validate, bool *success_or_null=0) const'],['../classflow_1_1cfg_1_1Option__set.html#a7f3924bff19cae0beb9f06b6dffbd504',1,'flow::cfg::Option_set::validate_values(log::Logger *logger_ptr, const Values &values_to_validate, const Declare_options_func &declare_opts_func, bool *success_or_null=0)'],['../classflow_1_1cfg_1_1Option__set.html#a4a3d6a15332fd7e2da1b852adc81aec3',1,'flow::cfg::Option_set::validate_values(bool *success_or_null=0) const']]], ['validate_5fvalues_5fcandidate_8',['validate_values_candidate',['../classflow_1_1cfg_1_1Option__set.html#ae6b85e12065536214e78266d086be3b2',1,'flow::cfg::Option_set']]], - ['value_9',['Value',['../classflow_1_1util_1_1Linked__hash__map.html#af8b3b1128da79536a4c86e9feadb0c66',1,'flow::util::Linked_hash_map::Value()'],['../classflow_1_1util_1_1Linked__hash__set.html#a591977b7bbcb0112db06722a9c9180a3',1,'flow::util::Linked_hash_set::Value()']]], - ['value_10',['value',['../structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html#a3a8d09a793eba817e718a3837fd1cd75',1,'boost::system::is_error_code_enum<::flow::net_flow::error::Code >']]], + ['value_9',['value',['../structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html#a3a8d09a793eba817e718a3837fd1cd75',1,'boost::system::is_error_code_enum<::flow::net_flow::error::Code >']]], + ['value_10',['Value',['../classflow_1_1util_1_1Linked__hash__map.html#af8b3b1128da79536a4c86e9feadb0c66',1,'flow::util::Linked_hash_map::Value()'],['../classflow_1_1util_1_1Linked__hash__set.html#a591977b7bbcb0112db06722a9c9180a3',1,'flow::util::Linked_hash_set::Value()']]], ['value_5flist_11',['Value_list',['../classflow_1_1util_1_1Linked__hash__map.html#ade77a6fa3d84d5cb23b519601b5bd407',1,'flow::util::Linked_hash_map::Value_list()'],['../classflow_1_1util_1_1Linked__hash__set.html#ad60bc54644375aff266f08a735e07610',1,'flow::util::Linked_hash_set::Value_list()']]], ['value_5flist_5fconst_5fiter_12',['Value_list_const_iter',['../classflow_1_1util_1_1Linked__hash__map.html#addb9174f029c4c3e44146d5e86fb5a1f',1,'flow::util::Linked_hash_map::Value_list_const_iter()'],['../classflow_1_1util_1_1Linked__hash__set.html#a3a2690e27808a52713648282471c2848',1,'flow::util::Linked_hash_set::Value_list_const_iter()']]], ['value_5flist_5fiter_13',['Value_list_iter',['../classflow_1_1util_1_1Linked__hash__map.html#a28527e53b183bdd4937e958b28c019e0',1,'flow::util::Linked_hash_map::Value_list_iter()'],['../classflow_1_1util_1_1Linked__hash__set.html#a383dac9998972cccbf12271d50ab081d',1,'flow::util::Linked_hash_set::Value_list_iter()']]], diff --git a/doc/flow_doc/generated/html_full/search/all_2.js b/doc/flow_doc/generated/html_full/search/all_2.js index 6d3a9b257..d70de9a6a 100644 --- a/doc/flow_doc/generated/html_full/search/all_2.js +++ b/doc/flow_doc/generated/html_full/search/all_2.js @@ -97,9 +97,9 @@ var searchData= ['const_5fdata_94',['const_data',['../classflow_1_1util_1_1Basic__blob.html#a75d4c0a1e530596982a3b5d3e0ff91e6',1,'flow::util::Basic_blob']]], ['const_5fend_95',['const_end',['../classflow_1_1util_1_1Basic__blob.html#ae4f1d8c42aea63ba4f127cb7ed5776d6',1,'flow::util::Basic_blob']]], ['const_5ffront_96',['const_front',['../classflow_1_1util_1_1Basic__blob.html#a90859b0e130bef705a2e556ccb27df53',1,'flow::util::Basic_blob::const_front()'],['../classflow_1_1util_1_1Linked__hash__map.html#a775a99fd89e114b1efffce15c974e76e',1,'flow::util::Linked_hash_map::const_front()'],['../classflow_1_1util_1_1Linked__hash__set.html#a926db7e9160df1ff73634a7039e7c30c',1,'flow::util::Linked_hash_set::const_front()']]], - ['const_5fiterator_97',['Const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context']]], - ['const_5fiterator_98',['const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context::const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()']]], - ['const_5fiterator_99',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()']]], + ['const_5fiterator_97',['const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context']]], + ['const_5fiterator_98',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context::Const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()']]], + ['const_5fiterator_99',['const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()']]], ['const_5fnewest_100',['const_newest',['../classflow_1_1util_1_1Linked__hash__map.html#a79ac8c4685ed84eac8407164f3bd8b84',1,'flow::util::Linked_hash_map::const_newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#a91021f4ea7018811502cab360284c6aa',1,'flow::util::Linked_hash_set::const_newest()']]], ['const_5foldest_101',['const_oldest',['../classflow_1_1util_1_1Linked__hash__map.html#ae415abb7c6b73bb42cde44b12113a154',1,'flow::util::Linked_hash_map::const_oldest()'],['../classflow_1_1util_1_1Linked__hash__set.html#ae0cb0394a239b8855a711d417aabe8e7',1,'flow::util::Linked_hash_set::const_oldest() const']]], ['const_5fpast_5fnewest_102',['const_past_newest',['../classflow_1_1util_1_1Linked__hash__set.html#a16f0324ec7c8fb399ab002ea52ff4252',1,'flow::util::Linked_hash_set::const_past_newest()'],['../classflow_1_1util_1_1Linked__hash__map.html#ae4e7882d9cbaea74f08b216b1e546cb8',1,'flow::util::Linked_hash_map::const_past_newest() const']]], diff --git a/doc/flow_doc/generated/html_full/search/all_8.js b/doc/flow_doc/generated/html_full/search/all_8.js index 80840a162..43972aeb8 100644 --- a/doc/flow_doc/generated/html_full/search/all_8.js +++ b/doc/flow_doc/generated/html_full/search/all_8.js @@ -9,7 +9,7 @@ var searchData= ['in_5fopen_5fopen_5frange_6',['in_open_open_range',['../namespaceflow_1_1util.html#a733448fee07c2a77e343a3f1590ff82e',1,'flow::util']]], ['in_5fslow_5fstart_7',['in_slow_start',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#aecb03f208c177ec3cbce5242f19efee0',1,'flow::net_flow::Congestion_control_classic_data::in_slow_start() const'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a1468dbf1d36eff05d61657f46df8489b',1,'flow::net_flow::Congestion_control_classic_data::in_slow_start(size_t cong_wnd_bytes, size_t slow_start_thresh_bytes)']]], ['in_5fthread_8',['in_thread',['../classflow_1_1async_1_1Single__thread__task__loop.html#ac282eacf6615eca207ce3cc74f419933',1,'flow::async::Single_thread_task_loop']]], - ['individual_5fack_9',['Individual_ack',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html',1,'flow::net_flow::Ack_packet::Individual_ack'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html',1,'flow::net_flow::Peer_socket::Individual_ack'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1cfc30a36e8b572f3cedaf045b05f448',1,'flow::net_flow::Ack_packet::Individual_ack::Individual_ack()=delete'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae557559e4c611fafc3d43a19fb161316',1,'flow::net_flow::Ack_packet::Individual_ack::Individual_ack(const Individual_ack &)=delete'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ac31bcdf4026275cb6fa90947a68d562a',1,'flow::net_flow::Peer_socket::Individual_ack::Individual_ack()']]], + ['individual_5fack_9',['Individual_ack',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html',1,'flow::net_flow::Ack_packet::Individual_ack'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html',1,'flow::net_flow::Peer_socket::Individual_ack']]], ['individual_5fack_5frexmit_5foff_10',['Individual_ack_rexmit_off',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#ab8f16251d8bd583cf6ad114a56b10463',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off::Individual_ack_rexmit_off()']]], ['individual_5fack_5frexmit_5fon_11',['Individual_ack_rexmit_on',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#ac75ea2d2954f67520dd4ed4c800c06c8',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on::Individual_ack_rexmit_on()']]], ['info_12',['info',['../classflow_1_1net__flow_1_1Peer__socket.html#aad81cc16fc6f0d353fdc1379e1dd4712',1,'flow::net_flow::Peer_socket']]], diff --git a/doc/flow_doc/generated/html_full/search/all_a.js b/doc/flow_doc/generated/html_full/search/all_a.js index 4878d8cfa..085ef8a07 100644 --- a/doc/flow_doc/generated/html_full/search/all_a.js +++ b/doc/flow_doc/generated/html_full/search/all_a.js @@ -48,14 +48,13 @@ var searchData= ['loss_5fevent_45',['loss_event',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a71b1e4e4384319db571edfbd825bd6ea',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], ['low_5flvl_5fio_2ecpp_46',['low_lvl_io.cpp',['../low__lvl__io_8cpp.html',1,'']]], ['low_5flvl_5fio_2ehpp_47',['low_lvl_io.hpp',['../low__lvl__io_8hpp.html',1,'']]], - ['low_5flvl_5fpacket_48',['Low_lvl_packet',['../structflow_1_1net__flow_1_1Low__lvl__packet.html',1,'flow::net_flow']]], + ['low_5flvl_5fpacket_48',['Low_lvl_packet',['../structflow_1_1net__flow_1_1Low__lvl__packet.html',1,'flow::net_flow::Low_lvl_packet'],['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a4a0585d1abae63af891161f1719bc582',1,'flow::net_flow::Low_lvl_packet::Low_lvl_packet()']]], ['low_5flvl_5fpacket_49',['low_lvl_packet',['../classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html#a49544d0d58bbf13d099eb7fb0798f9c6',1,'flow::net_flow::Peer_socket_receive_stats_accumulator']]], - ['low_5flvl_5fpacket_50',['Low_lvl_packet',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a4a0585d1abae63af891161f1719bc582',1,'flow::net_flow::Low_lvl_packet']]], - ['low_5flvl_5fpacket_2ecpp_51',['low_lvl_packet.cpp',['../low__lvl__packet_8cpp.html',1,'']]], - ['low_5flvl_5fpacket_2ehpp_52',['low_lvl_packet.hpp',['../low__lvl__packet_8hpp.html',1,'']]], - ['low_5flvl_5fpacket_5fsent_53',['low_lvl_packet_sent',['../classflow_1_1net__flow_1_1Node.html#a0055a25892990585561e69ceb02214d5',1,'flow::net_flow::Node']]], - ['low_5flvl_5fpacket_5fxfer_5fcalled_54',['low_lvl_packet_xfer_called',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a664e608952d250f7f5d41bdf04abf68b',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], - ['low_5flvl_5fpacket_5fxfer_5fcompleted_55',['low_lvl_packet_xfer_completed',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a186fb12bc19cf00e50b80116f782ff94',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], - ['low_5flvl_5fpacket_5fxfer_5frequested_56',['low_lvl_packet_xfer_requested',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a8dca8497873f98d8318b3fdd2c034c14',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], - ['low_5flvl_5frecv_5fand_5fhandle_57',['low_lvl_recv_and_handle',['../classflow_1_1net__flow_1_1Node.html#a9909cd2b2a77c57da9e35fcef0f8a4e5',1,'flow::net_flow::Node']]] + ['low_5flvl_5fpacket_2ecpp_50',['low_lvl_packet.cpp',['../low__lvl__packet_8cpp.html',1,'']]], + ['low_5flvl_5fpacket_2ehpp_51',['low_lvl_packet.hpp',['../low__lvl__packet_8hpp.html',1,'']]], + ['low_5flvl_5fpacket_5fsent_52',['low_lvl_packet_sent',['../classflow_1_1net__flow_1_1Node.html#a0055a25892990585561e69ceb02214d5',1,'flow::net_flow::Node']]], + ['low_5flvl_5fpacket_5fxfer_5fcalled_53',['low_lvl_packet_xfer_called',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a664e608952d250f7f5d41bdf04abf68b',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], + ['low_5flvl_5fpacket_5fxfer_5fcompleted_54',['low_lvl_packet_xfer_completed',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a186fb12bc19cf00e50b80116f782ff94',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], + ['low_5flvl_5fpacket_5fxfer_5frequested_55',['low_lvl_packet_xfer_requested',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a8dca8497873f98d8318b3fdd2c034c14',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], + ['low_5flvl_5frecv_5fand_5fhandle_56',['low_lvl_recv_and_handle',['../classflow_1_1net__flow_1_1Node.html#a9909cd2b2a77c57da9e35fcef0f8a4e5',1,'flow::net_flow::Node']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/all_b.js b/doc/flow_doc/generated/html_full/search/all_b.js index 2a804fd90..e375c8ea5 100644 --- a/doc/flow_doc/generated/html_full/search/all_b.js +++ b/doc/flow_doc/generated/html_full/search/all_b.js @@ -167,275 +167,276 @@ var searchData= ['m_5fmutex_164',['m_mutex',['../classflow_1_1net__flow_1_1Event__set.html#a0dda853ab017dd9bfcfb71b601d15698',1,'flow::net_flow::Event_set::m_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ab41b19ed4e62cb14fcd7dac81e4a8f41',1,'flow::net_flow::Peer_socket::m_mutex()'],['../classflow_1_1net__flow_1_1Server__socket.html#a40967c1981ffde4f7b75c6bb5e5b279b',1,'flow::net_flow::Server_socket::m_mutex()'],['../classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html#add632fccb79ec2178b9d2250ae0fef54',1,'flow::util::Rnd_gen_uniform_range_mt::m_mutex()']]], ['m_5fmutex_5funless_5fsingle_5fthreaded_165',['m_mutex_unless_single_threaded',['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a521f4d604b987b3bd81ad8a0d0e82836',1,'flow::util::Scheduled_task_handle_state']]], ['m_5fn_5fthreads_5for_5fzero_166',['m_n_threads_or_zero',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a606e8d4566cbbca893b9ac73dd949516',1,'flow::async::Segregated_thread_task_loop::m_n_threads_or_zero()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#ab1f8b7e68ffc431d74f1d1460597b05d',1,'flow::async::Cross_thread_task_loop::m_n_threads_or_zero()']]], - ['m_5fname_167',['m_name',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a6c0363e3e1ef330464b87363e4287758',1,'flow::perf::Checkpointing_timer::Checkpoint::m_name()'],['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a6ea09e3aa22c8e4ba234f465bdc0e0fd',1,'flow::perf::Checkpointing_timer::Aggregator::m_name()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a25981d44a91e1315bd92711d6e18a91b',1,'flow::perf::Checkpointing_timer::m_name()']]], - ['m_5fnet_5fenv_5fsim_168',['m_net_env_sim',['../classflow_1_1net__flow_1_1Node.html#a43472c3277cdf5e3f28d4f4f51e3bcc0',1,'flow::net_flow::Node']]], - ['m_5fnickname_169',['m_nickname',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a02a10c00df613d1da478e97163dec523',1,'flow::async::Segregated_thread_task_loop::m_nickname()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a91d90d8816538bbb529e9f6da7209103',1,'flow::async::Cross_thread_task_loop::m_nickname()'],['../classflow_1_1cfg_1_1Config__manager.html#a68da387dad566805b969aded698661cb',1,'flow::cfg::Config_manager::m_nickname()'],['../classflow_1_1cfg_1_1Option__set.html#a5e5cf9a5efd81ba6d851171a109005f6',1,'flow::cfg::Option_set::m_nickname()']]], - ['m_5fno_5facks_5fyet_170',['m_no_acks_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#adc8e7ca2c14f74a85beb863c145b97ba',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fno_5fsamples_5fyet_171',['m_no_samples_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac89711897d0c265eb3b18a748c03d3aa',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fnode_172',['m_node',['../classflow_1_1net__flow_1_1Event__set.html#af635301685a4a331142e1ac8a791a65d',1,'flow::net_flow::Event_set::m_node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a36ab27af6886c7699f9965a5eb296cd6',1,'flow::net_flow::Peer_socket::m_node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8e8e3363803b2fe2c862b9fac1dfbb77',1,'flow::net_flow::Server_socket::m_node()']]], - ['m_5fnode_5fopts_173',['m_node_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a05abba2bde50995af42cd6cf02d0b167',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fnode_5ftask_5fengine_174',['m_node_task_engine',['../classflow_1_1net__flow_1_1Drop__timer.html#ac3cfab1594111b3c3254eebc84591908',1,'flow::net_flow::Drop_timer']]], - ['m_5fnull_175',['m_null',['../classflow_1_1cfg_1_1Option__set.html#a18227d957ee16e50977dd4bb34d489ab',1,'flow::cfg::Option_set']]], - ['m_5fnum_176',['m_num',['../classflow_1_1net__flow_1_1Sequence__number.html#ac6e88639a0c1b5a1da2bf5b7f203b38c',1,'flow::net_flow::Sequence_number']]], - ['m_5fnum_5fline_5fid_177',['m_num_line_id',['../classflow_1_1net__flow_1_1Sequence__number.html#ae457e665c370f16e9196b1a88010dcbb',1,'flow::net_flow::Sequence_number']]], - ['m_5fofs_178',['m_ofs',['../classflow_1_1log_1_1Serial__file__logger.html#ac42c4ddfd3b664363edf6c38ce942fde',1,'flow::log::Serial_file_logger']]], - ['m_5fofs_5fwriter_179',['m_ofs_writer',['../classflow_1_1log_1_1Serial__file__logger.html#a92ed6ae3183bbd1f4905245f485cb531',1,'flow::log::Serial_file_logger']]], - ['m_5fon_5fdynamic_5fchange_5ffuncs_180',['m_on_dynamic_change_funcs',['../classflow_1_1cfg_1_1Config__manager.html#a08ba012812d46fcc6588d4bb8c4d04c9',1,'flow::cfg::Config_manager']]], - ['m_5fon_5fevent_181',['m_on_event',['../classflow_1_1net__flow_1_1Event__set.html#a59f6ddb0d0258cc029c435a8ed0f89f7',1,'flow::net_flow::Event_set']]], - ['m_5fopen_5fsub_5fstate_182',['m_open_sub_state',['../classflow_1_1net__flow_1_1Peer__socket.html#ae5d47460784cc20c9e44237edffaac95',1,'flow::net_flow::Peer_socket']]], - ['m_5fops_183',['m_ops',['../classflow_1_1async_1_1Op__list.html#abbbe77231b22d8db7bfaf9181e6028fe',1,'flow::async::Op_list']]], - ['m_5fopt_5fnames_184',['m_opt_names',['../classflow_1_1cfg_1_1Option__set.html#a650edbbffb9f75ed102f2bab5e355feb',1,'flow::cfg::Option_set']]], - ['m_5fopt_5frexmit_5fon_185',['m_opt_rexmit_on',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#acc2a10d19e8e54c88518ad2e02a08b68',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fopt_5frexmit_5fon_5fraw_186',['m_opt_rexmit_on_raw',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a22799fa7c7948cc2f35a411523c12479',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], - ['m_5foption_5fset_187',['m_option_set',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a0ed8c54022a5d7c61abc03efaae17f88',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fopts_188',['m_opts',['../classflow_1_1net__flow_1_1Node.html#ade08f0457943f803c23b55649139c0d3',1,'flow::net_flow::Node::m_opts()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad59c09f34003873a3c207cc590236773',1,'flow::net_flow::Peer_socket::m_opts()']]], - ['m_5fopts_5ffor_5fhelp_189',['m_opts_for_help',['../classflow_1_1cfg_1_1Option__set.html#aaeb9b41e8ac4c9f5a2437cedb0f3472a',1,'flow::cfg::Option_set']]], - ['m_5fopts_5ffor_5fparsing_190',['m_opts_for_parsing',['../classflow_1_1cfg_1_1Option__set.html#a381ff2ba7989b90cec0040e3b833d238',1,'flow::cfg::Option_set']]], - ['m_5fopts_5fmutex_191',['m_opts_mutex',['../classflow_1_1net__flow_1_1Peer__socket.html#addfbe1487c621d4a9c464aec61bc108a',1,'flow::net_flow::Peer_socket::m_opts_mutex()'],['../classflow_1_1net__flow_1_1Node.html#a449ef757abee4c5d12f8fc62a5ca66b4',1,'flow::net_flow::Node::m_opts_mutex()']]], - ['m_5forder_5fnum_192',['m_order_num',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#a5265c3824ad25d1de4f888fa811dd4e6',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5foriginating_5fserv_193',['m_originating_serv',['../classflow_1_1net__flow_1_1Peer__socket.html#a5629d810d2c7252eaa2243e076dde83f',1,'flow::net_flow::Peer_socket']]], - ['m_5fos_194',['m_os',['../classflow_1_1log_1_1Buffer__logger.html#a143ed6107ce07817f0c7b59354387db3',1,'flow::log::Buffer_logger::m_os()'],['../classflow_1_1log_1_1Ostream__log__msg__writer.html#ac37b6d6bbfb5c9feefd35fd78cc66dad',1,'flow::log::Ostream_log_msg_writer::m_os()']]], - ['m_5fos_5fwriter_195',['m_os_writer',['../classflow_1_1log_1_1Buffer__logger.html#a5f61d68308b597e131094e4bbcf08b21',1,'flow::log::Buffer_logger']]], - ['m_5fos_5fwriters_196',['m_os_writers',['../classflow_1_1log_1_1Simple__ostream__logger.html#a1ef85d2192fb0cd3977944a20bfa61f9',1,'flow::log::Simple_ostream_logger']]], - ['m_5fown_5ftarget_5fstr_197',['m_own_target_str',['../classflow_1_1util_1_1String__ostream.html#a0ac450344a0464a634f78288f6c357c8',1,'flow::util::String_ostream']]], - ['m_5fown_5ftask_5fengine_198',['m_own_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a0a80c87ce824a15fb84a73d99f5d61ac',1,'flow::async::Task_qing_thread']]], - ['m_5fpacked_199',['m_packed',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a3e7152648c0098491512da590b47b464',1,'flow::net_flow::Low_lvl_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__packet.html#aaf2fa9221da49c413441aa8fec93ce91',1,'flow::net_flow::Syn_ack_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a1a0bad5bc4e9c966709f7bc8a2469bf6',1,'flow::net_flow::Syn_ack_ack_packet::m_packed()']]], - ['m_5fpacket_200',['m_packet',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf',1,'flow::net_flow::Peer_socket::Sent_packet']]], - ['m_5fpacket_5fdata_201',['m_packet_data',['../classflow_1_1net__flow_1_1Node.html#acea4db94c4fb86ddaa2502c2d7e128ea',1,'flow::net_flow::Node']]], - ['m_5fpacket_5fq_202',['m_packet_q',['../structflow_1_1net__flow_1_1Send__pacing__data.html#aed68c9912e8c2ada5a9fcef0f9df2331',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fparsing_203',['m_parsing',['../classflow_1_1cfg_1_1Option__set.html#ac3f6c86292b4f6040c655f6bdcb05a3e',1,'flow::cfg::Option_set']]], - ['m_5fpayload_5fenum_5fraw_5fvalue_204',['m_payload_enum_raw_value',['../classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6',1,'flow::log::Component']]], - ['m_5fpayload_5ftype_5for_5fnull_205',['m_payload_type_or_null',['../classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac',1,'flow::log::Component']]], - ['m_5fpending_5flogs_5fsz_206',['m_pending_logs_sz',['../classflow_1_1log_1_1Async__file__logger.html#a7cce9184c2137aa4c2d09894e1aaa7c9',1,'flow::log::Async_file_logger']]], - ['m_5fper_5fthread_5fops_207',['m_per_thread_ops',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a3e643b2f348746d57b1e2ddb81a1150a',1,'flow::async::Segregated_thread_task_loop']]], - ['m_5fper_5fthread_5fstrands_208',['m_per_thread_strands',['../classflow_1_1async_1_1Cross__thread__task__loop.html#addbcc2e22d4a57b89b82130bb0f3e482',1,'flow::async::Cross_thread_task_loop']]], - ['m_5fports_209',['m_ports',['../classflow_1_1net__flow_1_1Node.html#afd6388a362531ada956a864fefff6011',1,'flow::net_flow::Node']]], - ['m_5fpos_210',['m_pos',['../structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html#a6d4eafd7d31261d7bdc8eb88a558fb2f',1,'flow::cfg::Config_manager::On_dynamic_change_func_handle']]], - ['m_5fpresumed_5fdropped_5fdata_5fsize_211',['m_presumed_dropped_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ab1b46c0670b98a87e106a91758a02f35',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fq_212',['m_q',['../classflow_1_1net__flow_1_1Socket__buffer.html#ab9d0faeeb2a8d1058b24319e8a14e52a',1,'flow::net_flow::Socket_buffer']]], - ['m_5fqing_5fthreads_213',['m_qing_threads',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a15c616fe03a6deb80e4c1f556b023bba',1,'flow::async::Segregated_thread_task_loop::m_qing_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a2e93cd0649bf68bdeda1cb844f53c5a8',1,'flow::async::Cross_thread_task_loop::m_qing_threads()']]], - ['m_5fraw_5ftype_5fid_214',['m_raw_type_id',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a167901d7c0f96f240dd789027ad99dc5',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], - ['m_5frcv_215',['m_rcv',['../structflow_1_1net__flow_1_1Peer__socket__info.html#af8234f1645d63b9eee57f6937dc222de',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5facked_5fpackets_216',['m_rcv_acked_packets',['../structflow_1_1net__flow_1_1Ack__packet.html#a232e22e04614ead19fa4531a89838015',1,'flow::net_flow::Ack_packet::m_rcv_acked_packets()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8229396adfd306d15e8a05dac3fe8c29',1,'flow::net_flow::Peer_socket::m_rcv_acked_packets()']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5foff_5fout_217',['m_rcv_acked_packets_rexmit_off_out',['../structflow_1_1net__flow_1_1Ack__packet.html#aebad844e9061da02db8f168374869f9e',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5fon_5fout_218',['m_rcv_acked_packets_rexmit_on_out',['../structflow_1_1net__flow_1_1Ack__packet.html#abfcb97c4f3f8552c619b6aba07674063',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5fout_5fsize_219',['m_rcv_acked_packets_rexmit_out_size',['../structflow_1_1net__flow_1_1Ack__packet.html#aae3806ebf76e628494fd6f7681c01409',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5fbuf_220',['m_rcv_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#aae9cb8f2dbd50ddaa0265d940b149ef3',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fbuf_5fsize_221',['m_rcv_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a127a03a0b0e2f73d1059b7b42f251fa2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fdelayed_5fack_5ftimer_222',['m_rcv_delayed_ack_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a88f967e74f8618c94088113e918ab52f',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fin_5frcv_5fwnd_5frecovery_223',['m_rcv_in_rcv_wnd_recovery',['../classflow_1_1net__flow_1_1Peer__socket.html#ad7414dfca4b869dd3a4e0de39195c69e',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5finit_5fseq_5fnum_224',['m_rcv_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a5dc05d1f5deb71e1259c5d5aad1fcf84',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5flast_5fsent_5frcv_5fwnd_225',['m_rcv_last_sent_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a7fa76b609ef0aa5962d8de77338cf9ee',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fnext_5fseq_5fnum_226',['m_rcv_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a13c640ebd14a75df3894e7d885d16f5f',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fpackets_5fwith_5fgaps_227',['m_rcv_packets_with_gaps',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8c3326fea94763621c47c8b0e4d31eb2',1,'flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ae82958ed6d71be46b96eceaca6214143',1,'flow::net_flow::Peer_socket::m_rcv_packets_with_gaps()']]], - ['m_5frcv_5fpending_5facks_228',['m_rcv_pending_acks',['../classflow_1_1net__flow_1_1Peer__socket.html#ad46ed439a3d118eb2b540e9f99a7b0ca',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fpending_5facks_5fsize_5fat_5frecv_5fhandler_5fstart_229',['m_rcv_pending_acks_size_at_recv_handler_start',['../classflow_1_1net__flow_1_1Peer__socket.html#a780f86759f861a3a84de8c5c768736b7',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5freassembly_5fq_5fdata_5fsize_230',['m_rcv_reassembly_q_data_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3a38b2a47235621222eb58e6212a4f05',1,'flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa7398394052c8e634365fb979c294644',1,'flow::net_flow::Peer_socket::m_rcv_reassembly_q_data_size()']]], - ['m_5frcv_5fstats_231',['m_rcv_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#a7d1f1d381749473f7a2471b8be20d6a8',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fcumulative_5fsize_232',['m_rcv_syn_rcvd_data_cumulative_size',['../classflow_1_1net__flow_1_1Peer__socket.html#a1553bbefc3407cf84eaa8e256c6cffff',1,'flow::net_flow::Peer_socket::m_rcv_syn_rcvd_data_cumulative_size()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a4f97c94357653fe6df91677ef070d3e8',1,'flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size()']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_233',['m_rcv_syn_rcvd_data_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a48320d96118a37626f1852626965e6ed',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_5fsize_234',['m_rcv_syn_rcvd_data_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6210e5a1ecd85ed1cb46be696f5faec4',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fwnd_235',['m_rcv_wnd',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a1ed3bdee2d19c2adaaf00fda9b5a7ca8',1,'flow::net_flow::Syn_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a3a3a3d676ec71eee0d2daa56a3b73403',1,'flow::net_flow::Syn_ack_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Ack__packet.html#a56b2560b87540a3cf5c7bba9e9666641',1,'flow::net_flow::Ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a84ae8091d89ae59304fd5ebd18539d8b',1,'flow::net_flow::Peer_socket_info::m_rcv_wnd()']]], - ['m_5frcv_5fwnd_5fexhausted_236',['m_rcv_wnd_exhausted',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a7c23d15ff0f3350cca96e38322f3cbf0',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5frcv_5fwnd_5flast_5fadvertised_237',['m_rcv_wnd_last_advertised',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a2562eebd9be1837147fef6fa616cb920',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fwnd_5frecovery_5fcount_238',['m_rcv_wnd_recovery_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ae2d0497f399e890eb6cec9bc85427d63',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5frcv_5fwnd_5frecovery_5fscheduled_5ftask_239',['m_rcv_wnd_recovery_scheduled_task',['../classflow_1_1net__flow_1_1Peer__socket.html#afd590cc70d06b8e903027e4924fd095a',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fwnd_5frecovery_5fstart_5ftime_240',['m_rcv_wnd_recovery_start_time',['../classflow_1_1net__flow_1_1Peer__socket.html#a5476d9206f997fc9119b2a80b078ee87',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fwnd_5frecovery_5fsuccess_5fcount_241',['m_rcv_wnd_recovery_success_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a11b5b29017bd45bdf822282d75c61bfc',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5frcv_5fwnd_5frecovery_5ftimeout_5fcount_242',['m_rcv_wnd_recovery_timeout_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a49f930549d48f8dd8239080707a236c2',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5freceived_5fack_5fcount_243',['m_received_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a49fd72447e2eda5168855963f6f55fdf',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5flow_5flvl_5fack_5fcount_244',['m_received_low_lvl_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#acca7ee65f331c8d6b1ed9c1c64f941c6',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5flow_5flvl_5frcv_5fwnd_5fonly_5fack_5fcount_245',['m_received_low_lvl_rcv_wnd_only_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#ab16d86a43937ff1a082c8eb9710ae24b',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5fwhen_246',['m_received_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad6e1407a2a3fc95e568b00f31e423b25',1,'flow::net_flow::Peer_socket::Individual_ack']]], - ['m_5frecent_5fephemeral_5fports_247',['m_recent_ephemeral_ports',['../classflow_1_1net__flow_1_1Port__space.html#ae401e02d49ce557bbc5474e049eb5455',1,'flow::net_flow::Port_space']]], - ['m_5frecv_5flatency_5fdistribution_5fmsec_248',['m_recv_latency_distribution_msec',['../classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5flatency_5fseq_249',['m_recv_latency_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5fdup_5fdistribution_250',['m_recv_packet_dup_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5fdup_5fseq_251',['m_recv_packet_dup_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5floss_5fdistribution_252',['m_recv_packet_loss_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5floss_5fseq_253',['m_recv_packet_loss_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138',1,'flow::net_flow::Net_env_simulator']]], - ['m_5fremote_5fendpoint_254',['m_remote_endpoint',['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a23527fa6deadda111d7c4c194a0ce177',1,'flow::net_flow::Node::Socket_id::m_remote_endpoint()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a218ec098984b754b43940001f59ab787',1,'flow::net_flow::Peer_socket::m_remote_endpoint()']]], - ['m_5fremote_5frcv_5fwnd_5fexhaustion_5fevents_255',['m_remote_rcv_wnd_exhaustion_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#af3976b80514468082ca36eb00857a5bb',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fremote_5frcv_5fwnd_5frecovery_5fevents_256',['m_remote_rcv_wnd_recovery_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a146759e1b8603f000b85e90ce02f7327',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freopening_257',['m_reopening',['../classflow_1_1log_1_1Serial__file__logger.html#a1e8b20725c1ce10cd996da75fc098a87',1,'flow::log::Serial_file_logger']]], - ['m_5freserved2_258',['m_reserved2',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a244e09a3f5318c25a120e3d29379adc8',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], - ['m_5freset_5frtt_5fmin_259',['m_reset_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#a5b3a333ae29bd009cd22919c1e01c19f',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], - ['m_5frexmit_5fid_260',['m_rexmit_id',['../structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0',1,'flow::net_flow::Data_packet::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a29080d01ac5bc0d51ad407587c6721ab',1,'flow::net_flow::Peer_socket::Individual_ack::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#a0324b8de1d20023e10507d527ee93cfe',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae17b658ee88e60bdb6606af607b00de2',1,'flow::net_flow::Ack_packet::Individual_ack::m_rexmit_id()']]], - ['m_5frnd_5fgenerator_261',['m_rnd_generator',['../classflow_1_1net__flow_1_1Port__space.html#ae4714945b23e588b1554240fa590560a',1,'flow::net_flow::Port_space::m_rnd_generator()'],['../classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43',1,'flow::net_flow::Net_env_simulator::m_rnd_generator()']]], - ['m_5frnd_5fop_5fidx_262',['m_rnd_op_idx',['../classflow_1_1async_1_1Op__list.html#a55134b36cc93325a85131a8efc0843c2',1,'flow::async::Op_list']]], - ['m_5frnd_5fsecurity_5ftokens_263',['m_rnd_security_tokens',['../classflow_1_1net__flow_1_1Node.html#ae536f016607677a945ad42034a21e82a',1,'flow::net_flow::Node']]], - ['m_5froot_5fto_5ftarget_5ffunc_264',['m_root_to_target_func',['../classflow_1_1cfg_1_1Dynamic__cfg__context.html#a33801a2e601913865719ecb5767dd0c8',1,'flow::cfg::Dynamic_cfg_context']]], - ['m_5fround_5ftrip_5ftime_5fvariance_265',['m_round_trip_time_variance',['../classflow_1_1net__flow_1_1Peer__socket.html#a27ce5b19ab4abcf61aa07153c46b2be3',1,'flow::net_flow::Peer_socket']]], - ['m_5frtt_5fmin_266',['m_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#aac8260cf710dc42843a478873ed8b649',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], - ['m_5fs_5fd_5fopt_5fsets_267',['m_s_d_opt_sets',['../classflow_1_1cfg_1_1Config__manager.html#a4e724d9d455ea31439c6832d0bc645bd',1,'flow::cfg::Config_manager']]], - ['m_5fsaved_5fvalue_268',['m_saved_value',['../classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202',1,'flow::util::Scoped_setter']]], - ['m_5fsecurity_5ftoken_269',['m_security_token',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a46bb776a13c77d7109469c0c29565a30',1,'flow::net_flow::Syn_ack_packet::m_security_token()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#ab2537625fa282f302e586dee1c24cd19',1,'flow::net_flow::Syn_ack_ack_packet::m_security_token()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a33a90b123612cc2e6a119cfa95ba4f6d',1,'flow::net_flow::Peer_socket::m_security_token()']]], - ['m_5fseed_270',['m_seed',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2',1,'flow::net_flow::Net_env_simulator']]], - ['m_5fsent_5fcwnd_5fbytes_271',['m_sent_cwnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#abc5bf2e627dad5d2dcfb0324853b37f7',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5fsent_5fdata_5fcount_272',['m_sent_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a72a061170ab84cd19aabb1c40238d65f',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5fdata_5fsize_273',['m_sent_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a702a7e3fa092414f80190a783f478aeb',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5findividual_5facks_5fcount_274',['m_sent_individual_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a77855f9a844be7513158191875d1c4f2',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5flow_5flvl_5facks_5fcount_275',['m_sent_low_lvl_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a7de6b1c501fee009e63639a177589a0c',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5flow_5flvl_5frcv_5fwnd_5fonly_5facks_5fcount_276',['m_sent_low_lvl_rcv_wnd_only_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a95629aa4094c8e9496081df11ca43787',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5frexmitted_5fdata_5fcount_277',['m_sent_rexmitted_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a0bde533fd087669e6dc356e45be975b4',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5frexmitted_5fdata_5fsize_278',['m_sent_rexmitted_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a3e00dce3ed58630d79a8cdaa7b76c8ee',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5ftime_279',['m_sent_time',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#ad513e58f4eb611c3a91d96df26f53f2c',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5fsent_5fwhen_280',['m_sent_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e',1,'flow::net_flow::Peer_socket::Sent_packet']]], - ['m_5fseq_281',['m_seq',['../classflow_1_1util_1_1Rnd__gen__uniform__range.html#ac216ad57ff7d9a116bc13b71510231bf',1,'flow::util::Rnd_gen_uniform_range']]], - ['m_5fseq_5fnum_282',['m_seq_num',['../structflow_1_1net__flow_1_1Data__packet.html#a94d817529e94ac88ee2cea6f3dd1badb',1,'flow::net_flow::Data_packet::m_seq_num()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1d027f817b86cc377d76bc38434229a4',1,'flow::net_flow::Ack_packet::Individual_ack::m_seq_num()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a8a237605b83d8a0d1b175395a83ad768',1,'flow::net_flow::Peer_socket::Individual_ack::m_seq_num()']]], - ['m_5fseq_5fnum_5fgenerator_283',['m_seq_num_generator',['../classflow_1_1net__flow_1_1Node.html#a8938c4a091edf1c1c77e2cc8f505f0ff',1,'flow::net_flow::Node']]], - ['m_5fseq_5fnum_5fraw_284',['m_seq_num_raw',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#a8952017a9b9267971a8d79eaa82f358a',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], - ['m_5fserial_5flogger_285',['m_serial_logger',['../classflow_1_1log_1_1Async__file__logger.html#a5c06c592797c70077fc02c98ebf231da',1,'flow::log::Async_file_logger']]], - ['m_5fserialized_5fmetadata_286',['m_serialized_metadata',['../structflow_1_1net__flow_1_1Syn__packet.html#abde26e74af2154fda517d6125353f305',1,'flow::net_flow::Syn_packet::m_serialized_metadata()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a322dddf34a06bb199dab02c993bad686',1,'flow::net_flow::Peer_socket::m_serialized_metadata()']]], - ['m_5fservice_5fports_287',['m_service_ports',['../classflow_1_1net__flow_1_1Port__space.html#a1f8e8e52bf4ec90e0b13d9159c403eae',1,'flow::net_flow::Port_space']]], - ['m_5fservs_288',['m_servs',['../classflow_1_1net__flow_1_1Node.html#aae28990628a86a07327f49973f2390df',1,'flow::net_flow::Node']]], - ['m_5fshared_5ftask_5fengine_289',['m_shared_task_engine',['../classflow_1_1async_1_1Cross__thread__task__loop.html#a3fb892d50647ad249eea983b7a664315',1,'flow::async::Cross_thread_task_loop']]], - ['m_5fsignal_5fset_290',['m_signal_set',['../classflow_1_1log_1_1Async__file__logger.html#a7192ad2ad8de3014dba6805cd60d5166',1,'flow::log::Async_file_logger::m_signal_set()'],['../classflow_1_1net__flow_1_1Node.html#abecf0f8111af82fa081c71fda490608a',1,'flow::net_flow::Node::m_signal_set()']]], - ['m_5fsince_5flast_291',['m_since_last',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#aacbec1a1e5600aeac4e7ca876060552f',1,'flow::perf::Checkpointing_timer::Checkpoint']]], - ['m_5fsize_292',['m_size',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b',1,'flow::net_flow::Peer_socket::Sent_packet::m_size()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html#a7d0760b1dead081bdcf775fbca7f708b',1,'flow::net_flow::Peer_socket::Received_packet::m_size()'],['../classflow_1_1util_1_1Basic__blob.html#ac008b60f7fe4253be9527436b0661dcc',1,'flow::util::Basic_blob::m_size()']]], - ['m_5fslice_5fperiod_293',['m_slice_period',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af0c881081c6706dba393ef814386b143',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslice_5fstart_294',['m_slice_start',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af1e8f11a36db3b967d9a5f61b115750a',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslice_5ftimer_295',['m_slice_timer',['../structflow_1_1net__flow_1_1Send__pacing__data.html#a100a406213a5edf2854440397719bb91',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslow_5fstart_5fthresh_5fbytes_296',['m_slow_start_thresh_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a239c6315ca562c4e782431879f39c74d',1,'flow::net_flow::Congestion_control_classic_data']]], - ['m_5fsnd_297',['m_snd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a02c61270ec35141affc5bb9f6edc5cd0',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fbandwidth_5festimator_298',['m_snd_bandwidth_estimator',['../classflow_1_1net__flow_1_1Peer__socket.html#a2dd08c5fed4d179e4fde3a632c084751',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fbuf_299',['m_snd_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#a993edf95f6bce2e57e7111e42533dc74',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fbuf_5fsize_300',['m_snd_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a45e2cdb7f0a7e0fd470adeab4009f44a',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_301',['m_snd_cong_ctl',['../classflow_1_1net__flow_1_1Peer__socket.html#a35eb43f2b5d7dd46a941def4523f673c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fbytes_302',['m_snd_cong_ctl_in_flight_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a784bd75264e26acbccd966e48c07dab9',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fcount_303',['m_snd_cong_ctl_in_flight_count',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a76f59a6c658d45c3283865b97dd01489',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fwnd_5fbytes_304',['m_snd_cong_ctl_wnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a959898645f07733966840b7b8309e6c2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fwnd_5fcount_5fapprox_305',['m_snd_cong_ctl_wnd_count_approx',['../structflow_1_1net__flow_1_1Peer__socket__info.html#ab9da1d80bbed4b286c084dba3ed5b12e',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fdrop_5ftimeout_306',['m_snd_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__info.html#afe104d81f760a454df6d3b0273a2d101',1,'flow::net_flow::Peer_socket_info::m_snd_drop_timeout()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a2d8aded3761028967fd3abb464e64936',1,'flow::net_flow::Peer_socket::m_snd_drop_timeout()']]], - ['m_5fsnd_5fdrop_5ftimer_307',['m_snd_drop_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a037459e6f1345cedf45e490d544c8567',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fest_5fbandwidth_5fmbit_5fper_5fsec_308',['m_snd_est_bandwidth_mbit_per_sec',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a788325f467420b83a92adce8302f2e18',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fflying_5fbytes_309',['m_snd_flying_bytes',['../classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fflying_5fpkts_5fby_5fsent_5fwhen_310',['m_snd_flying_pkts_by_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#a5ea56c54a98289211fef4a672432a2ad',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fflying_5fpkts_5fby_5fseq_5fnum_311',['m_snd_flying_pkts_by_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a2db7d11ece920d4adcacd00eaa2253fd',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5finit_5fseq_5fnum_312',['m_snd_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#aca66d1cb582ca027745d1ef847266cc4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5fdata_5fsent_5fwhen_313',['m_snd_last_data_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#af392484f79ffcead4f74ca351672d8d4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5floss_5fevent_5fwhen_314',['m_snd_last_loss_event_when',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9f77167af54cfe2921fab5fd143eff4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5forder_5fnum_315',['m_snd_last_order_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1ec79951579d595bb790be87189d6e6c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fnext_5fseq_5fnum_316',['m_snd_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1f8bebf649551131e6ed6e75c6f98d54',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fpacing_5fbytes_5fallowed_5fthis_5fslice_317',['m_snd_pacing_bytes_allowed_this_slice',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3ac6229cdcd3e949523658b02fa7d0e0',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fdata_318',['m_snd_pacing_data',['../classflow_1_1net__flow_1_1Peer__socket.html#a55b44104a2c305b9679434ba623a7357',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fpacing_5fpacket_5fq_5fsize_319',['m_snd_pacing_packet_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#accd2ed68fd975dfa113f9f66c41d152a',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fslice_5fperiod_320',['m_snd_pacing_slice_period',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a36ab155050d2cc96c5dc7dc9a2d1e2b1',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fslice_5fstart_321',['m_snd_pacing_slice_start',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6b03bba60c815cb17c40802eee400ae2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpending_5frcv_5fwnd_322',['m_snd_pending_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a07d885e5c8ec85e7ef8718dc0468ffe9',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frcv_5fwnd_323',['m_snd_rcv_wnd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#abb8b267eb5fa888e21e415f0e0d26a87',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fremote_5frcv_5fwnd_324',['m_snd_remote_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a12611e0ac9e8b86b8304b855050a8c8c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frexmit_5fq_325',['m_snd_rexmit_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a845f21b754ef641b65b1fe44727fb429',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frexmit_5fq_5fsize_326',['m_snd_rexmit_q_size',['../classflow_1_1net__flow_1_1Peer__socket.html#a9f5063c85a2070822cf69a530f0af1f5',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fround_5ftrip_5ftime_5fvariance_327',['m_snd_round_trip_time_variance',['../structflow_1_1net__flow_1_1Peer__socket__info.html#aedadfb406ca6842ab1ecc0c4020e2a58',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fsmoothed_5fround_5ftrip_5ftime_328',['m_snd_smoothed_round_trip_time',['../classflow_1_1net__flow_1_1Peer__socket.html#ad08b53052e7eedfa7a925258f5ef1cba',1,'flow::net_flow::Peer_socket::m_snd_smoothed_round_trip_time()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a9fafa98dd848eb3944591472c6ce0548',1,'flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time()']]], - ['m_5fsnd_5fstats_329',['m_snd_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#ab4aff3e65ef9551b6c5ab890173b741e',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5ftemp_5fpkts_5fmarked_5fto_5fdrop_330',['m_snd_temp_pkts_marked_to_drop',['../classflow_1_1net__flow_1_1Peer__socket.html#aea98297d775f2085c21daf41c6582200',1,'flow::net_flow::Peer_socket']]], - ['m_5fsock_331',['m_sock',['../classflow_1_1net__flow_1_1Congestion__control__strategy.html#a1da6833e0c23d111432cbdd3f5451180',1,'flow::net_flow::Congestion_control_strategy::m_sock()'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#ae8b85cd84e7e0496ad10814008fbd9fc',1,'flow::net_flow::Congestion_control_classic_data::m_sock()'],['../classflow_1_1net__flow_1_1Drop__timer.html#a7ab957ddc07d6289d1b42d6686173533',1,'flow::net_flow::Drop_timer::m_sock()'],['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#a380927913e47235684ce014b14371920',1,'flow::net_flow::Send_bandwidth_estimator::m_sock()']]], - ['m_5fsock_5fdrop_5ftimeout_332',['m_sock_drop_timeout',['../classflow_1_1net__flow_1_1Drop__timer.html#ad9db83f50aec60604de55d01e15ea403',1,'flow::net_flow::Drop_timer']]], - ['m_5fsock_5fevents_333',['m_sock_events',['../classflow_1_1net__flow_1_1Node.html#ab0026feecdb74eda904d00d2c7016bab',1,'flow::net_flow::Node']]], - ['m_5fsock_5fopts_334',['m_sock_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a437ab79b98100ec9f8ee4f2195b24430',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsocks_335',['m_socks',['../classflow_1_1net__flow_1_1Node.html#a90244d69d550370158bbe843ab595a7a',1,'flow::net_flow::Node']]], - ['m_5fsocks_5fwith_5faccumulated_5facks_336',['m_socks_with_accumulated_acks',['../classflow_1_1net__flow_1_1Node.html#a7d9f418a3c99197e58f71ce2fff2997f',1,'flow::net_flow::Node']]], - ['m_5fsocks_5fwith_5faccumulated_5fpending_5facks_337',['m_socks_with_accumulated_pending_acks',['../classflow_1_1net__flow_1_1Node.html#a7bea132db0e45ea01b9a6bd22fd0fadb',1,'flow::net_flow::Node']]], - ['m_5fsrc_5fport_338',['m_src_port',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae5bd1ed0883b4827d8a81d70c10fd271',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fst_5fcapture_5finterrupt_5fsignals_5finternally_339',['m_st_capture_interrupt_signals_internally',['../structflow_1_1net__flow_1_1Node__options.html#aea7861f3c7739f8e588293d16a2de447',1,'flow::net_flow::Node_options']]], - ['m_5fst_5fcong_5fctl_5fclassic_5fwnd_5fdecay_5fpercent_340',['m_st_cong_ctl_classic_wnd_decay_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeccfe97128c9f5f62ff26d73047dec2e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fcong_5favoidance_5fincrement_5fblocks_341',['m_st_cong_ctl_cong_avoidance_increment_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a7ab1e27acd52d8fa3aadc9eb13d116',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fcong_5fwnd_5fon_5fdrop_5ftimeout_5fblocks_342',['m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2c8fcb08dfb0d1ebcc21e02940c149e8',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5finit_5fcong_5fwnd_5fblocks_343',['m_st_cong_ctl_init_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a637811d19d4a2b4d9b3ab79742aadff8',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fmax_5fcong_5fwnd_5fblocks_344',['m_st_cong_ctl_max_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a1bdc21e84373dd96494a76f11603335e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fstrategy_345',['m_st_cong_ctl_strategy',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aca69056d3029193823f0c0ae630f5759',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fconnect_5fretransmit_5fperiod_346',['m_st_connect_retransmit_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8f18c8222ade5f99b83a85e0203ff130',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fconnect_5fretransmit_5ftimeout_347',['m_st_connect_retransmit_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac75171c4f1086d0aa38248ae5ffba884',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdelayed_5fack_5ftimer_5fperiod_348',['m_st_delayed_ack_timer_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#add7ccb9e8cd0715ca78e0710d2a6db06',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdrop_5fall_5fon_5fdrop_5ftimeout_349',['m_st_drop_all_on_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac6f4da1892e2157e60772ed74298b2b2',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdrop_5fpacket_5fexactly_5fafter_5fdrop_5ftimeout_350',['m_st_drop_packet_exactly_after_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a638ca4ecd9d8bfc8710bda71687c4ea3',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5finit_5fdrop_5ftimeout_351',['m_st_init_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a02afb5ed4201d83c87a3a30fcbdda489',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5flow_5flvl_5fmax_5fbuf_5fsize_352',['m_st_low_lvl_max_buf_size',['../structflow_1_1net__flow_1_1Node__options.html#a78baaf1a911c8d490a13278422307e8a',1,'flow::net_flow::Node_options']]], - ['m_5fst_5fmax_5fblock_5fsize_353',['m_st_max_block_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeaaf832a38a5e334789e81e214686ea7',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fmax_5ffull_5fblocks_5fbefore_5fack_5fsend_354',['m_st_max_full_blocks_before_ack_send',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7a76f7ae03e258b30b04c7350481de6',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fmax_5frexmissions_5fper_5fpacket_355',['m_st_max_rexmissions_per_packet',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a0b37da87848d01220c7e58f90e6764ba',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fout_5fof_5forder_5fack_5frestarts_5fdrop_5ftimer_356',['m_st_out_of_order_ack_restarts_drop_timer',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ae7d5eb1b4e37317478c3b25bc3c8c245',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_357',['m_st_rcv_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a171480324f26432928738532cb3c8556',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fslack_5fpercent_358',['m_st_rcv_buf_max_size_slack_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aa6d16c98186187fdffadcfb853d58410',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fto_5fadvertise_5fpercent_359',['m_st_rcv_buf_max_size_to_advertise_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af483d0292f363e7dbf14dc7a2dd49f3f',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fflow_5fcontrol_5fon_360',['m_st_rcv_flow_control_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad9a31f63eea6f89952a89ea0385d9a2e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fmax_5fpackets_5fafter_5funrecvd_5fpacket_5fratio_5fpercent_361',['m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af78ca6cf3c6da3bc24cea40d522f0bdb',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frexmit_5fon_362',['m_st_rexmit_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a6c35e6014182ccfcbee6bed4571a8360',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fbandwidth_5fest_5fsample_5fperiod_5ffloor_363',['m_st_snd_bandwidth_est_sample_period_floor',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a3d420992e19e5addb7193d607e82e4',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fbuf_5fmax_5fsize_364',['m_st_snd_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8ca6086022691700f5e5d2dc87ca92fd',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fpacing_5fenabled_365',['m_st_snd_pacing_enabled',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7cbcdd64a4366740ff9e55b39c977ba',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5ftimer_5fmin_5fperiod_366',['m_st_timer_min_period',['../structflow_1_1net__flow_1_1Node__options.html#abef8889be34024b07eff3211a3213d5f',1,'flow::net_flow::Node_options']]], - ['m_5fstart_367',['m_start',['../classflow_1_1util_1_1Basic__blob.html#aae53d36a27090ef5da931bc17d4f2bcd',1,'flow::util::Basic_blob']]], - ['m_5fstart_5fwhen_368',['m_start_when',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac16b16c3192e287ae3f08be786626f1a',1,'flow::perf::Checkpointing_timer']]], - ['m_5fstarted_5fthread_5fid_5for_5fnone_369',['m_started_thread_id_or_none',['../classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05',1,'flow::async::Single_thread_task_loop']]], - ['m_5fstate_370',['m_state',['../classflow_1_1net__flow_1_1Event__set.html#a56925e15b38d285f387e10bfb18f93c9',1,'flow::net_flow::Event_set::m_state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a05a765055fd54412c63e57e43697f1bc',1,'flow::net_flow::Peer_socket::m_state()'],['../classflow_1_1net__flow_1_1Server__socket.html#a783f81f10b50f62a638aa26b72d49e36',1,'flow::net_flow::Server_socket::m_state()']]], - ['m_5ftarget_371',['m_target',['../classflow_1_1util_1_1String__ostream.html#afa87f2303455e62c0be244deb37cb65e',1,'flow::util::String_ostream']]], - ['m_5ftarget_5fappender_5fostream_372',['m_target_appender_ostream',['../classflow_1_1log_1_1Thread__local__string__appender.html#a7bb2cd7d173ddc0ca3075d0475015f96',1,'flow::log::Thread_local_string_appender::m_target_appender_ostream()'],['../classflow_1_1util_1_1String__ostream.html#abaf52be7b420f87d9a75edec7be2fc6b',1,'flow::util::String_ostream::m_target_appender_ostream()']]], - ['m_5ftarget_5fappender_5fostream_5fprev_5fos_5fstate_373',['m_target_appender_ostream_prev_os_state',['../classflow_1_1log_1_1Thread__local__string__appender.html#aebc7ceab35e8201f0c60b59a0cc93ca3',1,'flow::log::Thread_local_string_appender']]], - ['m_5ftarget_5finserter_374',['m_target_inserter',['../classflow_1_1util_1_1String__ostream.html#ab8866da6531e449b80b1b7bb18a3b7b9',1,'flow::util::String_ostream']]], - ['m_5ftarget_5fopts_375',['m_target_opts',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a94df262d2c85c677916cb5f57f9c1559',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5ftarget_5for_5fnull_376',['m_target_or_null',['../classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c',1,'flow::util::Scoped_setter']]], - ['m_5ftarget_5ftask_5fengine_377',['m_target_task_engine',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a5b688a4071b8ad58a776de8d3816b757',1,'flow::net_flow::asio::Node::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a714f570918cfa8d225d75c787e7ac573',1,'flow::net_flow::asio::Peer_socket::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#ae236d96a176b209b217f04bb94119efe',1,'flow::net_flow::asio::Server_socket::m_target_task_engine()']]], - ['m_5ftask_5fengine_378',['m_task_engine',['../classflow_1_1net__flow_1_1Node.html#af5597a417d03e2bed87cd772ef5cef29',1,'flow::net_flow::Node::m_task_engine()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#af3eb85a490f1386423fe4a6a32979a93',1,'flow::util::Scheduled_task_handle_state::m_task_engine()'],['../classflow_1_1async_1_1Task__qing__thread.html#a1f4a96efdc1820ddbb4a4bf49c0d38e6',1,'flow::async::Task_qing_thread::m_task_engine()']]], - ['m_5ftask_5fengines_379',['m_task_engines',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#ad09c2d973e3794f36bf06bd001ca860e',1,'flow::async::Segregated_thread_task_loop']]], - ['m_5fthis_5fsample_5fstart_5ftime_380',['m_this_sample_start_time',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac627f8c9ae6c51c2ea14dd46af4f4150',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fthrottling_5factive_381',['m_throttling_active',['../classflow_1_1log_1_1Async__file__logger.html#a5bbad8cea27134844e73daff014cc82a',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fbegins_382',['m_throttling_begins',['../structflow_1_1log_1_1Async__file__logger_1_1Log__request.html#aee7f652b0e17e39d0afdb721bc956cf7',1,'flow::log::Async_file_logger::Log_request']]], - ['m_5fthrottling_5fcfg_383',['m_throttling_cfg',['../classflow_1_1log_1_1Async__file__logger.html#aa3d544ab96299a8c2b53b7be485d1a6e',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fmutex_384',['m_throttling_mutex',['../classflow_1_1log_1_1Async__file__logger.html#a99cd4faff109ef35720fbed9837973dc',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fnow_385',['m_throttling_now',['../classflow_1_1log_1_1Async__file__logger.html#aa13ef30bc2d66758c29c31dc76a130aa',1,'flow::log::Async_file_logger']]], - ['m_5ftime_5faccumulator_386',['m_time_accumulator',['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a55aa9c680221d64b44715256713a5bee',1,'flow::async::Timed_concurrent_task_loop_impl']]], - ['m_5ftimed_5floop_387',['m_timed_loop',['../classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9',1,'flow::async::Timed_single_thread_task_loop']]], - ['m_5ftimer_388',['m_timer',['../classflow_1_1net__flow_1_1Drop__timer.html#ad5dfc3cd2f8e5e4d28c49e28ee5c221f',1,'flow::net_flow::Drop_timer::m_timer()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a5934d785b54bb71e739c262b6db8dda9',1,'flow::util::Scheduled_task_handle_state::m_timer()']]], - ['m_5ftimer_5ffailure_389',['m_timer_failure',['../classflow_1_1net__flow_1_1Drop__timer.html#a21e78b9da6196043e1c05589c46911fa',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimer_5ffired_390',['m_timer_fired',['../classflow_1_1net__flow_1_1Drop__timer.html#a862595a7ec5d4bea05ad0e85c52e88ac',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimer_5frunning_391',['m_timer_running',['../classflow_1_1net__flow_1_1Drop__timer.html#a9528326a35b021bb859bed948ae3d7a4',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimers_392',['m_timers',['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#af1c4f46ce680b979e98a3e255c88d063',1,'flow::perf::Checkpointing_timer::Aggregator']]], - ['m_5ftotal_5fdata_5fcount_393',['m_total_data_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a893ca5129ab56fd57de0cdee92e59bd7',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fdata_5fsize_394',['m_total_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a132cb2a966ede1bf5fe363e5885a0f64',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fto_5fsend_5facks_5fcount_395',['m_total_to_send_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a66c7d92f84d1a1f7b1039a926b1a8f00',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fto_5fsend_5facks_5fdata_5fsize_396',['m_total_to_send_acks_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a6946add6977b28e244c69606fd14db03',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftype_5fid_5fstr_397',['m_type_id_str',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a8dc054626823cb59a1570214349b8450',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], - ['m_5ftype_5fostream_5fmanip_398',['m_type_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a7f4fd9ce69e293477e96fbad0a2298ed',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fudp_5fendpoint_399',['m_udp_endpoint',['../structflow_1_1net__flow_1_1Remote__endpoint.html#a582f3a55d828cd4e36369682315c7629',1,'flow::net_flow::Remote_endpoint']]], - ['m_5funaccepted_5fsocks_400',['m_unaccepted_socks',['../classflow_1_1net__flow_1_1Server__socket.html#a7ba32040008ffe0637d3a1847deb76c5',1,'flow::net_flow::Server_socket']]], - ['m_5funderlying_5floop_401',['m_underlying_loop',['../classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4',1,'flow::async::Single_thread_task_loop']]], - ['m_5fuse_5fhuman_5ffriendly_5ftime_5fstamps_402',['m_use_human_friendly_time_stamps',['../classflow_1_1log_1_1Config.html#a1b16be31f5dcfba9536a377c9d29abb6',1,'flow::log::Config']]], - ['m_5fvalidate_5fstored_5fvals_5fargs_403',['m_validate_stored_vals_args',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#ae780a398078db2299e8a5c3714bcb987',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalue_5flist_404',['m_value_list',['../classflow_1_1util_1_1Linked__hash__map.html#a3c2ebf269951f5fe2412b6a77303b5ba',1,'flow::util::Linked_hash_map::m_value_list()'],['../classflow_1_1util_1_1Linked__hash__set.html#a4bae43bd9a1b68903af4b6f9452ccf9e',1,'flow::util::Linked_hash_set::m_value_list()']]], - ['m_5fvalues_405',['m_values',['../classflow_1_1cfg_1_1Option__set.html#a7bda9a32640f89d1c8a2306b8b368a13',1,'flow::cfg::Option_set::m_values()'],['../structflow_1_1perf_1_1Time__pt__set.html#a9867f05832f22c6aceb340c0ba697dbc',1,'flow::perf::Time_pt_set::m_values()'],['../structflow_1_1perf_1_1Duration__set.html#ae7d89b9e16f45dc59b27092e0496ce4f',1,'flow::perf::Duration_set::m_values()']]], - ['m_5fvalues_5fcandidate_406',['m_values_candidate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#acbaeb3dd021040e15bff6e85b8da5253',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_candidate()'],['../classflow_1_1cfg_1_1Option__set.html#adfd72b4b73913193252a02d35acdff09',1,'flow::cfg::Option_set::m_values_candidate()']]], - ['m_5fvalues_5fcurrent_407',['m_values_current',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a19683d3ea7c64e3abf96f85b60e9e610',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fdefault_408',['m_values_default',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a7c91f3db7161cf30816e0fe1fccc39c0',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_default()'],['../classflow_1_1cfg_1_1Option__set.html#aea72e19fce43c10c84f6445f1892de41',1,'flow::cfg::Option_set::m_values_default()']]], - ['m_5fvalues_5fdefault_5fno_5facc_409',['m_values_default_no_acc',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#adc8e05f6d6528755712280a812a6ad4d',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fto_5fload_410',['m_values_to_load',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a838e0b0c1f25e167a102e11de272de4e',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fto_5fvalidate_411',['m_values_to_validate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a75ab66920b874488bed052a90bc716d5',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fverbose_5fostream_5fmanip_412',['m_verbose_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae3e64b049838a690384a899209ffca7b',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fverbosities_5fby_5fcomponent_413',['m_verbosities_by_component',['../classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f',1,'flow::log::Config']]], - ['m_5fverbosity_5fdefault_414',['m_verbosity_default',['../classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c',1,'flow::log::Config']]], - ['m_5fwant_415',['m_want',['../classflow_1_1net__flow_1_1Event__set.html#af4fa5dbda4ffd95b35dee57fc01b90ce',1,'flow::net_flow::Event_set']]], - ['m_5fwhich_5fclocks_416',['m_which_clocks',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac5518c3fdc58f8867ca114186562575b',1,'flow::perf::Checkpointing_timer']]], - ['m_5fworker_417',['m_worker',['../classflow_1_1net__flow_1_1Node.html#a84b7e03ae7b13dae0f59db1475e46fd3',1,'flow::net_flow::Node']]], - ['m_5fworker_5fthread_418',['m_worker_thread',['../classflow_1_1async_1_1Task__qing__thread.html#a75b218e1b5f137ead984588107ef02b0',1,'flow::async::Task_qing_thread']]], - ['m_5fzero_5fpoint_5fnum_419',['m_zero_point_num',['../classflow_1_1net__flow_1_1Sequence__number.html#adcd83d66fac1a77d9e94f13d1c4671b0',1,'flow::net_flow::Sequence_number']]], - ['make_5ferror_5fcode_420',['make_error_code',['../namespaceflow_1_1net__flow_1_1error.html#a6d35c37eb70a494bb27aa807c41de176',1,'flow::net_flow::error']]], - ['make_5fzero_421',['make_zero',['../classflow_1_1util_1_1Basic__blob.html#af431f32bde5ed1ba255e3e1cbbcbd906',1,'flow::util::Basic_blob::make_zero()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a024fdd8b9f0389201c25b6601af2c3d4',1,'flow::util::Blob_with_log_context::make_zero()']]], - ['mapped_5ftype_422',['mapped_type',['../classflow_1_1util_1_1Linked__hash__map.html#add4b2bf1d3c8c99b5b6667ace94c8ff2',1,'flow::util::Linked_hash_map']]], - ['mark_5fdata_5fpacket_5fsent_423',['mark_data_packet_sent',['../classflow_1_1net__flow_1_1Node.html#a2983d0d8a4d4eb5c3402f63f68ef44d8',1,'flow::net_flow::Node']]], - ['max_5fblock_5fsize_424',['max_block_size',['../classflow_1_1net__flow_1_1Node.html#a4bd7b471dd6cd3e3570930b48d30e577',1,'flow::net_flow::Node::max_block_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa1f821dde38a7aa572651730744edbd8',1,'flow::net_flow::Peer_socket::max_block_size() const']]], - ['max_5fblock_5fsize_5fmultiple_425',['max_block_size_multiple',['../classflow_1_1net__flow_1_1Peer__socket.html#a102b78eaac9c8add512238ec5f26fcfc',1,'flow::net_flow::Peer_socket']]], - ['max_5fsize_426',['max_size',['../classflow_1_1util_1_1Linked__hash__map.html#a2b07a93e11051e1cdb17ee9478b61321',1,'flow::util::Linked_hash_map::max_size()'],['../classflow_1_1util_1_1Linked__hash__set.html#ac1bfed582b7ee057afe92be2bbabb422',1,'flow::util::Linked_hash_set::max_size()']]], - ['mem_5fcost_427',['mem_cost',['../classflow_1_1log_1_1Async__file__logger.html#a6d74d81cb726a30f33f4fc106e3be5b6',1,'flow::log::Async_file_logger']]], - ['message_428',['message',['../classflow_1_1net__flow_1_1error_1_1Category.html#ae01ad7da6ba4d494a5455a82fc03481e',1,'flow::net_flow::error::Category']]], - ['msg_5fmetadata_429',['Msg_metadata',['../structflow_1_1log_1_1Msg__metadata.html',1,'flow::log']]], - ['mutable_5fbuffer_430',['mutable_buffer',['../classflow_1_1util_1_1Basic__blob.html#a2bd3cb0b6b3f304fb6fb771c1b76ec66',1,'flow::util::Basic_blob']]], - ['mutable_5fvalues_5fcopy_431',['mutable_values_copy',['../classflow_1_1cfg_1_1Option__set.html#a45eebf6c9d7384bcc95c10ff7c934e1f',1,'flow::cfg::Option_set']]], - ['mutable_5fvalues_5fptr_432',['Mutable_values_ptr',['../classflow_1_1cfg_1_1Option__set.html#a03ec172ee1f15c091ca78102faa55987',1,'flow::cfg::Option_set']]], - ['mutex_433',['Mutex',['../classflow_1_1log_1_1Async__file__logger.html#a2f21285253ab0f9a81cf991f99ce6549',1,'flow::log::Async_file_logger::Mutex()'],['../classflow_1_1net__flow_1_1Event__set.html#a47e4e6d304a6a381e7469fe87c547738',1,'flow::net_flow::Event_set::Mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad1e36619c78b15f46576a18678a4ee67',1,'flow::net_flow::Peer_socket::Mutex()'],['../classflow_1_1net__flow_1_1Server__socket.html#a15e9fa900dfa1a0a2d693bf8ffb5b07d',1,'flow::net_flow::Server_socket::Mutex()']]], - ['mutex_5fnon_5frecursive_434',['Mutex_non_recursive',['../namespaceflow_1_1util.html#add6ade273326f27eaf9bfd170a909626',1,'flow::util']]], - ['mutex_5fnoop_5fshared_5fnon_5frecursive_435',['Mutex_noop_shared_non_recursive',['../namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112',1,'flow::util']]], - ['mutex_5frecursive_436',['Mutex_recursive',['../namespaceflow_1_1util.html#a9c7a5df07c2e86c788de9e6bbaee77d5',1,'flow::util']]], - ['mutex_5fshared_5fnon_5frecursive_437',['Mutex_shared_non_recursive',['../namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421',1,'flow::util']]] + ['m_5fname_167',['m_name',['../classflow_1_1perf_1_1Checkpointing__timer.html#a25981d44a91e1315bd92711d6e18a91b',1,'flow::perf::Checkpointing_timer::m_name()'],['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a6ea09e3aa22c8e4ba234f465bdc0e0fd',1,'flow::perf::Checkpointing_timer::Aggregator::m_name()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a6c0363e3e1ef330464b87363e4287758',1,'flow::perf::Checkpointing_timer::Checkpoint::m_name()']]], + ['m_5fnc_168',['m_nc',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a589654d5b07e021e82fa80455863f548',1,'flow::net_flow::Ack_packet::Individual_ack::m_nc()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#af6ffacd3b12b70bf06b70bc8645315c5',1,'flow::net_flow::Peer_socket::Individual_ack::m_nc()']]], + ['m_5fnet_5fenv_5fsim_169',['m_net_env_sim',['../classflow_1_1net__flow_1_1Node.html#a43472c3277cdf5e3f28d4f4f51e3bcc0',1,'flow::net_flow::Node']]], + ['m_5fnickname_170',['m_nickname',['../classflow_1_1cfg_1_1Option__set.html#a5e5cf9a5efd81ba6d851171a109005f6',1,'flow::cfg::Option_set::m_nickname()'],['../classflow_1_1cfg_1_1Config__manager.html#a68da387dad566805b969aded698661cb',1,'flow::cfg::Config_manager::m_nickname()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a91d90d8816538bbb529e9f6da7209103',1,'flow::async::Cross_thread_task_loop::m_nickname()'],['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a02a10c00df613d1da478e97163dec523',1,'flow::async::Segregated_thread_task_loop::m_nickname()']]], + ['m_5fno_5facks_5fyet_171',['m_no_acks_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#adc8e7ca2c14f74a85beb863c145b97ba',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fno_5fsamples_5fyet_172',['m_no_samples_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac89711897d0c265eb3b18a748c03d3aa',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fnode_173',['m_node',['../classflow_1_1net__flow_1_1Event__set.html#af635301685a4a331142e1ac8a791a65d',1,'flow::net_flow::Event_set::m_node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a36ab27af6886c7699f9965a5eb296cd6',1,'flow::net_flow::Peer_socket::m_node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8e8e3363803b2fe2c862b9fac1dfbb77',1,'flow::net_flow::Server_socket::m_node()']]], + ['m_5fnode_5fopts_174',['m_node_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a05abba2bde50995af42cd6cf02d0b167',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fnode_5ftask_5fengine_175',['m_node_task_engine',['../classflow_1_1net__flow_1_1Drop__timer.html#ac3cfab1594111b3c3254eebc84591908',1,'flow::net_flow::Drop_timer']]], + ['m_5fnull_176',['m_null',['../classflow_1_1cfg_1_1Option__set.html#a18227d957ee16e50977dd4bb34d489ab',1,'flow::cfg::Option_set']]], + ['m_5fnum_177',['m_num',['../classflow_1_1net__flow_1_1Sequence__number.html#ac6e88639a0c1b5a1da2bf5b7f203b38c',1,'flow::net_flow::Sequence_number']]], + ['m_5fnum_5fline_5fid_178',['m_num_line_id',['../classflow_1_1net__flow_1_1Sequence__number.html#ae457e665c370f16e9196b1a88010dcbb',1,'flow::net_flow::Sequence_number']]], + ['m_5fofs_179',['m_ofs',['../classflow_1_1log_1_1Serial__file__logger.html#ac42c4ddfd3b664363edf6c38ce942fde',1,'flow::log::Serial_file_logger']]], + ['m_5fofs_5fwriter_180',['m_ofs_writer',['../classflow_1_1log_1_1Serial__file__logger.html#a92ed6ae3183bbd1f4905245f485cb531',1,'flow::log::Serial_file_logger']]], + ['m_5fon_5fdynamic_5fchange_5ffuncs_181',['m_on_dynamic_change_funcs',['../classflow_1_1cfg_1_1Config__manager.html#a08ba012812d46fcc6588d4bb8c4d04c9',1,'flow::cfg::Config_manager']]], + ['m_5fon_5fevent_182',['m_on_event',['../classflow_1_1net__flow_1_1Event__set.html#a59f6ddb0d0258cc029c435a8ed0f89f7',1,'flow::net_flow::Event_set']]], + ['m_5fopen_5fsub_5fstate_183',['m_open_sub_state',['../classflow_1_1net__flow_1_1Peer__socket.html#ae5d47460784cc20c9e44237edffaac95',1,'flow::net_flow::Peer_socket']]], + ['m_5fops_184',['m_ops',['../classflow_1_1async_1_1Op__list.html#abbbe77231b22d8db7bfaf9181e6028fe',1,'flow::async::Op_list']]], + ['m_5fopt_5fnames_185',['m_opt_names',['../classflow_1_1cfg_1_1Option__set.html#a650edbbffb9f75ed102f2bab5e355feb',1,'flow::cfg::Option_set']]], + ['m_5fopt_5frexmit_5fon_186',['m_opt_rexmit_on',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#acc2a10d19e8e54c88518ad2e02a08b68',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fopt_5frexmit_5fon_5fraw_187',['m_opt_rexmit_on_raw',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a22799fa7c7948cc2f35a411523c12479',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], + ['m_5foption_5fset_188',['m_option_set',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a0ed8c54022a5d7c61abc03efaae17f88',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fopts_189',['m_opts',['../classflow_1_1net__flow_1_1Node.html#ade08f0457943f803c23b55649139c0d3',1,'flow::net_flow::Node::m_opts()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad59c09f34003873a3c207cc590236773',1,'flow::net_flow::Peer_socket::m_opts()']]], + ['m_5fopts_5ffor_5fhelp_190',['m_opts_for_help',['../classflow_1_1cfg_1_1Option__set.html#aaeb9b41e8ac4c9f5a2437cedb0f3472a',1,'flow::cfg::Option_set']]], + ['m_5fopts_5ffor_5fparsing_191',['m_opts_for_parsing',['../classflow_1_1cfg_1_1Option__set.html#a381ff2ba7989b90cec0040e3b833d238',1,'flow::cfg::Option_set']]], + ['m_5fopts_5fmutex_192',['m_opts_mutex',['../classflow_1_1net__flow_1_1Node.html#a449ef757abee4c5d12f8fc62a5ca66b4',1,'flow::net_flow::Node::m_opts_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#addfbe1487c621d4a9c464aec61bc108a',1,'flow::net_flow::Peer_socket::m_opts_mutex()']]], + ['m_5forder_5fnum_193',['m_order_num',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#a5265c3824ad25d1de4f888fa811dd4e6',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5foriginating_5fserv_194',['m_originating_serv',['../classflow_1_1net__flow_1_1Peer__socket.html#a5629d810d2c7252eaa2243e076dde83f',1,'flow::net_flow::Peer_socket']]], + ['m_5fos_195',['m_os',['../classflow_1_1log_1_1Buffer__logger.html#a143ed6107ce07817f0c7b59354387db3',1,'flow::log::Buffer_logger::m_os()'],['../classflow_1_1log_1_1Ostream__log__msg__writer.html#ac37b6d6bbfb5c9feefd35fd78cc66dad',1,'flow::log::Ostream_log_msg_writer::m_os()']]], + ['m_5fos_5fwriter_196',['m_os_writer',['../classflow_1_1log_1_1Buffer__logger.html#a5f61d68308b597e131094e4bbcf08b21',1,'flow::log::Buffer_logger']]], + ['m_5fos_5fwriters_197',['m_os_writers',['../classflow_1_1log_1_1Simple__ostream__logger.html#a1ef85d2192fb0cd3977944a20bfa61f9',1,'flow::log::Simple_ostream_logger']]], + ['m_5fown_5ftarget_5fstr_198',['m_own_target_str',['../classflow_1_1util_1_1String__ostream.html#a0ac450344a0464a634f78288f6c357c8',1,'flow::util::String_ostream']]], + ['m_5fown_5ftask_5fengine_199',['m_own_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a0a80c87ce824a15fb84a73d99f5d61ac',1,'flow::async::Task_qing_thread']]], + ['m_5fpacked_200',['m_packed',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a3e7152648c0098491512da590b47b464',1,'flow::net_flow::Low_lvl_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__packet.html#aaf2fa9221da49c413441aa8fec93ce91',1,'flow::net_flow::Syn_ack_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a1a0bad5bc4e9c966709f7bc8a2469bf6',1,'flow::net_flow::Syn_ack_ack_packet::m_packed()']]], + ['m_5fpacket_201',['m_packet',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf',1,'flow::net_flow::Peer_socket::Sent_packet']]], + ['m_5fpacket_5fdata_202',['m_packet_data',['../classflow_1_1net__flow_1_1Node.html#acea4db94c4fb86ddaa2502c2d7e128ea',1,'flow::net_flow::Node']]], + ['m_5fpacket_5fq_203',['m_packet_q',['../structflow_1_1net__flow_1_1Send__pacing__data.html#aed68c9912e8c2ada5a9fcef0f9df2331',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fparsing_204',['m_parsing',['../classflow_1_1cfg_1_1Option__set.html#ac3f6c86292b4f6040c655f6bdcb05a3e',1,'flow::cfg::Option_set']]], + ['m_5fpayload_5fenum_5fraw_5fvalue_205',['m_payload_enum_raw_value',['../classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6',1,'flow::log::Component']]], + ['m_5fpayload_5ftype_5for_5fnull_206',['m_payload_type_or_null',['../classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac',1,'flow::log::Component']]], + ['m_5fpending_5flogs_5fsz_207',['m_pending_logs_sz',['../classflow_1_1log_1_1Async__file__logger.html#a7cce9184c2137aa4c2d09894e1aaa7c9',1,'flow::log::Async_file_logger']]], + ['m_5fper_5fthread_5fops_208',['m_per_thread_ops',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a3e643b2f348746d57b1e2ddb81a1150a',1,'flow::async::Segregated_thread_task_loop']]], + ['m_5fper_5fthread_5fstrands_209',['m_per_thread_strands',['../classflow_1_1async_1_1Cross__thread__task__loop.html#addbcc2e22d4a57b89b82130bb0f3e482',1,'flow::async::Cross_thread_task_loop']]], + ['m_5fports_210',['m_ports',['../classflow_1_1net__flow_1_1Node.html#afd6388a362531ada956a864fefff6011',1,'flow::net_flow::Node']]], + ['m_5fpos_211',['m_pos',['../structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html#a6d4eafd7d31261d7bdc8eb88a558fb2f',1,'flow::cfg::Config_manager::On_dynamic_change_func_handle']]], + ['m_5fpresumed_5fdropped_5fdata_5fsize_212',['m_presumed_dropped_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ab1b46c0670b98a87e106a91758a02f35',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fq_213',['m_q',['../classflow_1_1net__flow_1_1Socket__buffer.html#ab9d0faeeb2a8d1058b24319e8a14e52a',1,'flow::net_flow::Socket_buffer']]], + ['m_5fqing_5fthreads_214',['m_qing_threads',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a15c616fe03a6deb80e4c1f556b023bba',1,'flow::async::Segregated_thread_task_loop::m_qing_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a2e93cd0649bf68bdeda1cb844f53c5a8',1,'flow::async::Cross_thread_task_loop::m_qing_threads()']]], + ['m_5fraw_5ftype_5fid_215',['m_raw_type_id',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a167901d7c0f96f240dd789027ad99dc5',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], + ['m_5frcv_216',['m_rcv',['../structflow_1_1net__flow_1_1Peer__socket__info.html#af8234f1645d63b9eee57f6937dc222de',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5facked_5fpackets_217',['m_rcv_acked_packets',['../structflow_1_1net__flow_1_1Ack__packet.html#a232e22e04614ead19fa4531a89838015',1,'flow::net_flow::Ack_packet::m_rcv_acked_packets()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8229396adfd306d15e8a05dac3fe8c29',1,'flow::net_flow::Peer_socket::m_rcv_acked_packets()']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5foff_5fout_218',['m_rcv_acked_packets_rexmit_off_out',['../structflow_1_1net__flow_1_1Ack__packet.html#aebad844e9061da02db8f168374869f9e',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5fon_5fout_219',['m_rcv_acked_packets_rexmit_on_out',['../structflow_1_1net__flow_1_1Ack__packet.html#abfcb97c4f3f8552c619b6aba07674063',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5fout_5fsize_220',['m_rcv_acked_packets_rexmit_out_size',['../structflow_1_1net__flow_1_1Ack__packet.html#aae3806ebf76e628494fd6f7681c01409',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5fbuf_221',['m_rcv_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#aae9cb8f2dbd50ddaa0265d940b149ef3',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fbuf_5fsize_222',['m_rcv_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a127a03a0b0e2f73d1059b7b42f251fa2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fdelayed_5fack_5ftimer_223',['m_rcv_delayed_ack_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a88f967e74f8618c94088113e918ab52f',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fin_5frcv_5fwnd_5frecovery_224',['m_rcv_in_rcv_wnd_recovery',['../classflow_1_1net__flow_1_1Peer__socket.html#ad7414dfca4b869dd3a4e0de39195c69e',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5finit_5fseq_5fnum_225',['m_rcv_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a5dc05d1f5deb71e1259c5d5aad1fcf84',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5flast_5fsent_5frcv_5fwnd_226',['m_rcv_last_sent_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a7fa76b609ef0aa5962d8de77338cf9ee',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fnext_5fseq_5fnum_227',['m_rcv_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a13c640ebd14a75df3894e7d885d16f5f',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fpackets_5fwith_5fgaps_228',['m_rcv_packets_with_gaps',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8c3326fea94763621c47c8b0e4d31eb2',1,'flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ae82958ed6d71be46b96eceaca6214143',1,'flow::net_flow::Peer_socket::m_rcv_packets_with_gaps()']]], + ['m_5frcv_5fpending_5facks_229',['m_rcv_pending_acks',['../classflow_1_1net__flow_1_1Peer__socket.html#ad46ed439a3d118eb2b540e9f99a7b0ca',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fpending_5facks_5fsize_5fat_5frecv_5fhandler_5fstart_230',['m_rcv_pending_acks_size_at_recv_handler_start',['../classflow_1_1net__flow_1_1Peer__socket.html#a780f86759f861a3a84de8c5c768736b7',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5freassembly_5fq_5fdata_5fsize_231',['m_rcv_reassembly_q_data_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3a38b2a47235621222eb58e6212a4f05',1,'flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa7398394052c8e634365fb979c294644',1,'flow::net_flow::Peer_socket::m_rcv_reassembly_q_data_size()']]], + ['m_5frcv_5fstats_232',['m_rcv_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#a7d1f1d381749473f7a2471b8be20d6a8',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fcumulative_5fsize_233',['m_rcv_syn_rcvd_data_cumulative_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a4f97c94357653fe6df91677ef070d3e8',1,'flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a1553bbefc3407cf84eaa8e256c6cffff',1,'flow::net_flow::Peer_socket::m_rcv_syn_rcvd_data_cumulative_size()']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_234',['m_rcv_syn_rcvd_data_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a48320d96118a37626f1852626965e6ed',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_5fsize_235',['m_rcv_syn_rcvd_data_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6210e5a1ecd85ed1cb46be696f5faec4',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fwnd_236',['m_rcv_wnd',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a1ed3bdee2d19c2adaaf00fda9b5a7ca8',1,'flow::net_flow::Syn_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a3a3a3d676ec71eee0d2daa56a3b73403',1,'flow::net_flow::Syn_ack_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Ack__packet.html#a56b2560b87540a3cf5c7bba9e9666641',1,'flow::net_flow::Ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a84ae8091d89ae59304fd5ebd18539d8b',1,'flow::net_flow::Peer_socket_info::m_rcv_wnd()']]], + ['m_5frcv_5fwnd_5fexhausted_237',['m_rcv_wnd_exhausted',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a7c23d15ff0f3350cca96e38322f3cbf0',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5frcv_5fwnd_5flast_5fadvertised_238',['m_rcv_wnd_last_advertised',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a2562eebd9be1837147fef6fa616cb920',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fwnd_5frecovery_5fcount_239',['m_rcv_wnd_recovery_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ae2d0497f399e890eb6cec9bc85427d63',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5frcv_5fwnd_5frecovery_5fscheduled_5ftask_240',['m_rcv_wnd_recovery_scheduled_task',['../classflow_1_1net__flow_1_1Peer__socket.html#afd590cc70d06b8e903027e4924fd095a',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fwnd_5frecovery_5fstart_5ftime_241',['m_rcv_wnd_recovery_start_time',['../classflow_1_1net__flow_1_1Peer__socket.html#a5476d9206f997fc9119b2a80b078ee87',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fwnd_5frecovery_5fsuccess_5fcount_242',['m_rcv_wnd_recovery_success_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a11b5b29017bd45bdf822282d75c61bfc',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5frcv_5fwnd_5frecovery_5ftimeout_5fcount_243',['m_rcv_wnd_recovery_timeout_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a49f930549d48f8dd8239080707a236c2',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5freceived_5fack_5fcount_244',['m_received_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a49fd72447e2eda5168855963f6f55fdf',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5flow_5flvl_5fack_5fcount_245',['m_received_low_lvl_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#acca7ee65f331c8d6b1ed9c1c64f941c6',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5flow_5flvl_5frcv_5fwnd_5fonly_5fack_5fcount_246',['m_received_low_lvl_rcv_wnd_only_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#ab16d86a43937ff1a082c8eb9710ae24b',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5fwhen_247',['m_received_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad6e1407a2a3fc95e568b00f31e423b25',1,'flow::net_flow::Peer_socket::Individual_ack']]], + ['m_5frecent_5fephemeral_5fports_248',['m_recent_ephemeral_ports',['../classflow_1_1net__flow_1_1Port__space.html#ae401e02d49ce557bbc5474e049eb5455',1,'flow::net_flow::Port_space']]], + ['m_5frecv_5flatency_5fdistribution_5fmsec_249',['m_recv_latency_distribution_msec',['../classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5flatency_5fseq_250',['m_recv_latency_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5fdup_5fdistribution_251',['m_recv_packet_dup_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5fdup_5fseq_252',['m_recv_packet_dup_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5floss_5fdistribution_253',['m_recv_packet_loss_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5floss_5fseq_254',['m_recv_packet_loss_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138',1,'flow::net_flow::Net_env_simulator']]], + ['m_5fremote_5fendpoint_255',['m_remote_endpoint',['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a23527fa6deadda111d7c4c194a0ce177',1,'flow::net_flow::Node::Socket_id::m_remote_endpoint()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a218ec098984b754b43940001f59ab787',1,'flow::net_flow::Peer_socket::m_remote_endpoint()']]], + ['m_5fremote_5frcv_5fwnd_5fexhaustion_5fevents_256',['m_remote_rcv_wnd_exhaustion_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#af3976b80514468082ca36eb00857a5bb',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fremote_5frcv_5fwnd_5frecovery_5fevents_257',['m_remote_rcv_wnd_recovery_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a146759e1b8603f000b85e90ce02f7327',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freopening_258',['m_reopening',['../classflow_1_1log_1_1Serial__file__logger.html#a1e8b20725c1ce10cd996da75fc098a87',1,'flow::log::Serial_file_logger']]], + ['m_5freserved2_259',['m_reserved2',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a244e09a3f5318c25a120e3d29379adc8',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], + ['m_5freset_5frtt_5fmin_260',['m_reset_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#a5b3a333ae29bd009cd22919c1e01c19f',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], + ['m_5frexmit_5fid_261',['m_rexmit_id',['../structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0',1,'flow::net_flow::Data_packet::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae17b658ee88e60bdb6606af607b00de2',1,'flow::net_flow::Ack_packet::Individual_ack::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#a0324b8de1d20023e10507d527ee93cfe',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a29080d01ac5bc0d51ad407587c6721ab',1,'flow::net_flow::Peer_socket::Individual_ack::m_rexmit_id()']]], + ['m_5frnd_5fgenerator_262',['m_rnd_generator',['../classflow_1_1net__flow_1_1Port__space.html#ae4714945b23e588b1554240fa590560a',1,'flow::net_flow::Port_space::m_rnd_generator()'],['../classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43',1,'flow::net_flow::Net_env_simulator::m_rnd_generator()']]], + ['m_5frnd_5fop_5fidx_263',['m_rnd_op_idx',['../classflow_1_1async_1_1Op__list.html#a55134b36cc93325a85131a8efc0843c2',1,'flow::async::Op_list']]], + ['m_5frnd_5fsecurity_5ftokens_264',['m_rnd_security_tokens',['../classflow_1_1net__flow_1_1Node.html#ae536f016607677a945ad42034a21e82a',1,'flow::net_flow::Node']]], + ['m_5froot_5fto_5ftarget_5ffunc_265',['m_root_to_target_func',['../classflow_1_1cfg_1_1Dynamic__cfg__context.html#a33801a2e601913865719ecb5767dd0c8',1,'flow::cfg::Dynamic_cfg_context']]], + ['m_5fround_5ftrip_5ftime_5fvariance_266',['m_round_trip_time_variance',['../classflow_1_1net__flow_1_1Peer__socket.html#a27ce5b19ab4abcf61aa07153c46b2be3',1,'flow::net_flow::Peer_socket']]], + ['m_5frtt_5fmin_267',['m_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#aac8260cf710dc42843a478873ed8b649',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], + ['m_5fs_5fd_5fopt_5fsets_268',['m_s_d_opt_sets',['../classflow_1_1cfg_1_1Config__manager.html#a4e724d9d455ea31439c6832d0bc645bd',1,'flow::cfg::Config_manager']]], + ['m_5fsaved_5fvalue_269',['m_saved_value',['../classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202',1,'flow::util::Scoped_setter']]], + ['m_5fsecurity_5ftoken_270',['m_security_token',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a46bb776a13c77d7109469c0c29565a30',1,'flow::net_flow::Syn_ack_packet::m_security_token()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#ab2537625fa282f302e586dee1c24cd19',1,'flow::net_flow::Syn_ack_ack_packet::m_security_token()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a33a90b123612cc2e6a119cfa95ba4f6d',1,'flow::net_flow::Peer_socket::m_security_token()']]], + ['m_5fseed_271',['m_seed',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2',1,'flow::net_flow::Net_env_simulator']]], + ['m_5fsent_5fcwnd_5fbytes_272',['m_sent_cwnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#abc5bf2e627dad5d2dcfb0324853b37f7',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5fsent_5fdata_5fcount_273',['m_sent_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a72a061170ab84cd19aabb1c40238d65f',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5fdata_5fsize_274',['m_sent_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a702a7e3fa092414f80190a783f478aeb',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5findividual_5facks_5fcount_275',['m_sent_individual_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a77855f9a844be7513158191875d1c4f2',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5flow_5flvl_5facks_5fcount_276',['m_sent_low_lvl_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a7de6b1c501fee009e63639a177589a0c',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5flow_5flvl_5frcv_5fwnd_5fonly_5facks_5fcount_277',['m_sent_low_lvl_rcv_wnd_only_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a95629aa4094c8e9496081df11ca43787',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5frexmitted_5fdata_5fcount_278',['m_sent_rexmitted_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a0bde533fd087669e6dc356e45be975b4',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5frexmitted_5fdata_5fsize_279',['m_sent_rexmitted_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a3e00dce3ed58630d79a8cdaa7b76c8ee',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5ftime_280',['m_sent_time',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#ad513e58f4eb611c3a91d96df26f53f2c',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5fsent_5fwhen_281',['m_sent_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e',1,'flow::net_flow::Peer_socket::Sent_packet']]], + ['m_5fseq_282',['m_seq',['../classflow_1_1util_1_1Rnd__gen__uniform__range.html#ac216ad57ff7d9a116bc13b71510231bf',1,'flow::util::Rnd_gen_uniform_range']]], + ['m_5fseq_5fnum_283',['m_seq_num',['../structflow_1_1net__flow_1_1Data__packet.html#a94d817529e94ac88ee2cea6f3dd1badb',1,'flow::net_flow::Data_packet::m_seq_num()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1d027f817b86cc377d76bc38434229a4',1,'flow::net_flow::Ack_packet::Individual_ack::m_seq_num()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a8a237605b83d8a0d1b175395a83ad768',1,'flow::net_flow::Peer_socket::Individual_ack::m_seq_num()']]], + ['m_5fseq_5fnum_5fgenerator_284',['m_seq_num_generator',['../classflow_1_1net__flow_1_1Node.html#a8938c4a091edf1c1c77e2cc8f505f0ff',1,'flow::net_flow::Node']]], + ['m_5fseq_5fnum_5fraw_285',['m_seq_num_raw',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#a8952017a9b9267971a8d79eaa82f358a',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], + ['m_5fserial_5flogger_286',['m_serial_logger',['../classflow_1_1log_1_1Async__file__logger.html#a5c06c592797c70077fc02c98ebf231da',1,'flow::log::Async_file_logger']]], + ['m_5fserialized_5fmetadata_287',['m_serialized_metadata',['../structflow_1_1net__flow_1_1Syn__packet.html#abde26e74af2154fda517d6125353f305',1,'flow::net_flow::Syn_packet::m_serialized_metadata()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a322dddf34a06bb199dab02c993bad686',1,'flow::net_flow::Peer_socket::m_serialized_metadata()']]], + ['m_5fservice_5fports_288',['m_service_ports',['../classflow_1_1net__flow_1_1Port__space.html#a1f8e8e52bf4ec90e0b13d9159c403eae',1,'flow::net_flow::Port_space']]], + ['m_5fservs_289',['m_servs',['../classflow_1_1net__flow_1_1Node.html#aae28990628a86a07327f49973f2390df',1,'flow::net_flow::Node']]], + ['m_5fshared_5ftask_5fengine_290',['m_shared_task_engine',['../classflow_1_1async_1_1Cross__thread__task__loop.html#a3fb892d50647ad249eea983b7a664315',1,'flow::async::Cross_thread_task_loop']]], + ['m_5fsignal_5fset_291',['m_signal_set',['../classflow_1_1log_1_1Async__file__logger.html#a7192ad2ad8de3014dba6805cd60d5166',1,'flow::log::Async_file_logger::m_signal_set()'],['../classflow_1_1net__flow_1_1Node.html#abecf0f8111af82fa081c71fda490608a',1,'flow::net_flow::Node::m_signal_set()']]], + ['m_5fsince_5flast_292',['m_since_last',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#aacbec1a1e5600aeac4e7ca876060552f',1,'flow::perf::Checkpointing_timer::Checkpoint']]], + ['m_5fsize_293',['m_size',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b',1,'flow::net_flow::Peer_socket::Sent_packet::m_size()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html#a7d0760b1dead081bdcf775fbca7f708b',1,'flow::net_flow::Peer_socket::Received_packet::m_size()'],['../classflow_1_1util_1_1Basic__blob.html#ac008b60f7fe4253be9527436b0661dcc',1,'flow::util::Basic_blob::m_size()']]], + ['m_5fslice_5fperiod_294',['m_slice_period',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af0c881081c6706dba393ef814386b143',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslice_5fstart_295',['m_slice_start',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af1e8f11a36db3b967d9a5f61b115750a',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslice_5ftimer_296',['m_slice_timer',['../structflow_1_1net__flow_1_1Send__pacing__data.html#a100a406213a5edf2854440397719bb91',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslow_5fstart_5fthresh_5fbytes_297',['m_slow_start_thresh_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a239c6315ca562c4e782431879f39c74d',1,'flow::net_flow::Congestion_control_classic_data']]], + ['m_5fsnd_298',['m_snd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a02c61270ec35141affc5bb9f6edc5cd0',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fbandwidth_5festimator_299',['m_snd_bandwidth_estimator',['../classflow_1_1net__flow_1_1Peer__socket.html#a2dd08c5fed4d179e4fde3a632c084751',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fbuf_300',['m_snd_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#a993edf95f6bce2e57e7111e42533dc74',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fbuf_5fsize_301',['m_snd_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a45e2cdb7f0a7e0fd470adeab4009f44a',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_302',['m_snd_cong_ctl',['../classflow_1_1net__flow_1_1Peer__socket.html#a35eb43f2b5d7dd46a941def4523f673c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fbytes_303',['m_snd_cong_ctl_in_flight_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a784bd75264e26acbccd966e48c07dab9',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fcount_304',['m_snd_cong_ctl_in_flight_count',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a76f59a6c658d45c3283865b97dd01489',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fwnd_5fbytes_305',['m_snd_cong_ctl_wnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a959898645f07733966840b7b8309e6c2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fwnd_5fcount_5fapprox_306',['m_snd_cong_ctl_wnd_count_approx',['../structflow_1_1net__flow_1_1Peer__socket__info.html#ab9da1d80bbed4b286c084dba3ed5b12e',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fdrop_5ftimeout_307',['m_snd_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__info.html#afe104d81f760a454df6d3b0273a2d101',1,'flow::net_flow::Peer_socket_info::m_snd_drop_timeout()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a2d8aded3761028967fd3abb464e64936',1,'flow::net_flow::Peer_socket::m_snd_drop_timeout()']]], + ['m_5fsnd_5fdrop_5ftimer_308',['m_snd_drop_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a037459e6f1345cedf45e490d544c8567',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fest_5fbandwidth_5fmbit_5fper_5fsec_309',['m_snd_est_bandwidth_mbit_per_sec',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a788325f467420b83a92adce8302f2e18',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fflying_5fbytes_310',['m_snd_flying_bytes',['../classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fflying_5fpkts_5fby_5fsent_5fwhen_311',['m_snd_flying_pkts_by_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#a5ea56c54a98289211fef4a672432a2ad',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fflying_5fpkts_5fby_5fseq_5fnum_312',['m_snd_flying_pkts_by_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a2db7d11ece920d4adcacd00eaa2253fd',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5finit_5fseq_5fnum_313',['m_snd_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#aca66d1cb582ca027745d1ef847266cc4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5fdata_5fsent_5fwhen_314',['m_snd_last_data_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#af392484f79ffcead4f74ca351672d8d4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5floss_5fevent_5fwhen_315',['m_snd_last_loss_event_when',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9f77167af54cfe2921fab5fd143eff4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5forder_5fnum_316',['m_snd_last_order_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1ec79951579d595bb790be87189d6e6c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fnext_5fseq_5fnum_317',['m_snd_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1f8bebf649551131e6ed6e75c6f98d54',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fpacing_5fbytes_5fallowed_5fthis_5fslice_318',['m_snd_pacing_bytes_allowed_this_slice',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3ac6229cdcd3e949523658b02fa7d0e0',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fdata_319',['m_snd_pacing_data',['../classflow_1_1net__flow_1_1Peer__socket.html#a55b44104a2c305b9679434ba623a7357',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fpacing_5fpacket_5fq_5fsize_320',['m_snd_pacing_packet_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#accd2ed68fd975dfa113f9f66c41d152a',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fslice_5fperiod_321',['m_snd_pacing_slice_period',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a36ab155050d2cc96c5dc7dc9a2d1e2b1',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fslice_5fstart_322',['m_snd_pacing_slice_start',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6b03bba60c815cb17c40802eee400ae2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpending_5frcv_5fwnd_323',['m_snd_pending_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a07d885e5c8ec85e7ef8718dc0468ffe9',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frcv_5fwnd_324',['m_snd_rcv_wnd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#abb8b267eb5fa888e21e415f0e0d26a87',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fremote_5frcv_5fwnd_325',['m_snd_remote_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a12611e0ac9e8b86b8304b855050a8c8c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frexmit_5fq_326',['m_snd_rexmit_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a845f21b754ef641b65b1fe44727fb429',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frexmit_5fq_5fsize_327',['m_snd_rexmit_q_size',['../classflow_1_1net__flow_1_1Peer__socket.html#a9f5063c85a2070822cf69a530f0af1f5',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fround_5ftrip_5ftime_5fvariance_328',['m_snd_round_trip_time_variance',['../structflow_1_1net__flow_1_1Peer__socket__info.html#aedadfb406ca6842ab1ecc0c4020e2a58',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fsmoothed_5fround_5ftrip_5ftime_329',['m_snd_smoothed_round_trip_time',['../classflow_1_1net__flow_1_1Peer__socket.html#ad08b53052e7eedfa7a925258f5ef1cba',1,'flow::net_flow::Peer_socket::m_snd_smoothed_round_trip_time()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a9fafa98dd848eb3944591472c6ce0548',1,'flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time()']]], + ['m_5fsnd_5fstats_330',['m_snd_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#ab4aff3e65ef9551b6c5ab890173b741e',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5ftemp_5fpkts_5fmarked_5fto_5fdrop_331',['m_snd_temp_pkts_marked_to_drop',['../classflow_1_1net__flow_1_1Peer__socket.html#aea98297d775f2085c21daf41c6582200',1,'flow::net_flow::Peer_socket']]], + ['m_5fsock_332',['m_sock',['../classflow_1_1net__flow_1_1Congestion__control__strategy.html#a1da6833e0c23d111432cbdd3f5451180',1,'flow::net_flow::Congestion_control_strategy::m_sock()'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#ae8b85cd84e7e0496ad10814008fbd9fc',1,'flow::net_flow::Congestion_control_classic_data::m_sock()'],['../classflow_1_1net__flow_1_1Drop__timer.html#a7ab957ddc07d6289d1b42d6686173533',1,'flow::net_flow::Drop_timer::m_sock()'],['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#a380927913e47235684ce014b14371920',1,'flow::net_flow::Send_bandwidth_estimator::m_sock()']]], + ['m_5fsock_5fdrop_5ftimeout_333',['m_sock_drop_timeout',['../classflow_1_1net__flow_1_1Drop__timer.html#ad9db83f50aec60604de55d01e15ea403',1,'flow::net_flow::Drop_timer']]], + ['m_5fsock_5fevents_334',['m_sock_events',['../classflow_1_1net__flow_1_1Node.html#ab0026feecdb74eda904d00d2c7016bab',1,'flow::net_flow::Node']]], + ['m_5fsock_5fopts_335',['m_sock_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a437ab79b98100ec9f8ee4f2195b24430',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsocks_336',['m_socks',['../classflow_1_1net__flow_1_1Node.html#a90244d69d550370158bbe843ab595a7a',1,'flow::net_flow::Node']]], + ['m_5fsocks_5fwith_5faccumulated_5facks_337',['m_socks_with_accumulated_acks',['../classflow_1_1net__flow_1_1Node.html#a7d9f418a3c99197e58f71ce2fff2997f',1,'flow::net_flow::Node']]], + ['m_5fsocks_5fwith_5faccumulated_5fpending_5facks_338',['m_socks_with_accumulated_pending_acks',['../classflow_1_1net__flow_1_1Node.html#a7bea132db0e45ea01b9a6bd22fd0fadb',1,'flow::net_flow::Node']]], + ['m_5fsrc_5fport_339',['m_src_port',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae5bd1ed0883b4827d8a81d70c10fd271',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fst_5fcapture_5finterrupt_5fsignals_5finternally_340',['m_st_capture_interrupt_signals_internally',['../structflow_1_1net__flow_1_1Node__options.html#aea7861f3c7739f8e588293d16a2de447',1,'flow::net_flow::Node_options']]], + ['m_5fst_5fcong_5fctl_5fclassic_5fwnd_5fdecay_5fpercent_341',['m_st_cong_ctl_classic_wnd_decay_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeccfe97128c9f5f62ff26d73047dec2e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fcong_5favoidance_5fincrement_5fblocks_342',['m_st_cong_ctl_cong_avoidance_increment_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a7ab1e27acd52d8fa3aadc9eb13d116',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fcong_5fwnd_5fon_5fdrop_5ftimeout_5fblocks_343',['m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2c8fcb08dfb0d1ebcc21e02940c149e8',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5finit_5fcong_5fwnd_5fblocks_344',['m_st_cong_ctl_init_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a637811d19d4a2b4d9b3ab79742aadff8',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fmax_5fcong_5fwnd_5fblocks_345',['m_st_cong_ctl_max_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a1bdc21e84373dd96494a76f11603335e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fstrategy_346',['m_st_cong_ctl_strategy',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aca69056d3029193823f0c0ae630f5759',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fconnect_5fretransmit_5fperiod_347',['m_st_connect_retransmit_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8f18c8222ade5f99b83a85e0203ff130',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fconnect_5fretransmit_5ftimeout_348',['m_st_connect_retransmit_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac75171c4f1086d0aa38248ae5ffba884',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdelayed_5fack_5ftimer_5fperiod_349',['m_st_delayed_ack_timer_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#add7ccb9e8cd0715ca78e0710d2a6db06',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdrop_5fall_5fon_5fdrop_5ftimeout_350',['m_st_drop_all_on_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac6f4da1892e2157e60772ed74298b2b2',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdrop_5fpacket_5fexactly_5fafter_5fdrop_5ftimeout_351',['m_st_drop_packet_exactly_after_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a638ca4ecd9d8bfc8710bda71687c4ea3',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5finit_5fdrop_5ftimeout_352',['m_st_init_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a02afb5ed4201d83c87a3a30fcbdda489',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5flow_5flvl_5fmax_5fbuf_5fsize_353',['m_st_low_lvl_max_buf_size',['../structflow_1_1net__flow_1_1Node__options.html#a78baaf1a911c8d490a13278422307e8a',1,'flow::net_flow::Node_options']]], + ['m_5fst_5fmax_5fblock_5fsize_354',['m_st_max_block_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeaaf832a38a5e334789e81e214686ea7',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fmax_5ffull_5fblocks_5fbefore_5fack_5fsend_355',['m_st_max_full_blocks_before_ack_send',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7a76f7ae03e258b30b04c7350481de6',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fmax_5frexmissions_5fper_5fpacket_356',['m_st_max_rexmissions_per_packet',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a0b37da87848d01220c7e58f90e6764ba',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fout_5fof_5forder_5fack_5frestarts_5fdrop_5ftimer_357',['m_st_out_of_order_ack_restarts_drop_timer',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ae7d5eb1b4e37317478c3b25bc3c8c245',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_358',['m_st_rcv_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a171480324f26432928738532cb3c8556',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fslack_5fpercent_359',['m_st_rcv_buf_max_size_slack_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aa6d16c98186187fdffadcfb853d58410',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fto_5fadvertise_5fpercent_360',['m_st_rcv_buf_max_size_to_advertise_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af483d0292f363e7dbf14dc7a2dd49f3f',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fflow_5fcontrol_5fon_361',['m_st_rcv_flow_control_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad9a31f63eea6f89952a89ea0385d9a2e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fmax_5fpackets_5fafter_5funrecvd_5fpacket_5fratio_5fpercent_362',['m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af78ca6cf3c6da3bc24cea40d522f0bdb',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frexmit_5fon_363',['m_st_rexmit_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a6c35e6014182ccfcbee6bed4571a8360',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fbandwidth_5fest_5fsample_5fperiod_5ffloor_364',['m_st_snd_bandwidth_est_sample_period_floor',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a3d420992e19e5addb7193d607e82e4',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fbuf_5fmax_5fsize_365',['m_st_snd_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8ca6086022691700f5e5d2dc87ca92fd',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fpacing_5fenabled_366',['m_st_snd_pacing_enabled',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7cbcdd64a4366740ff9e55b39c977ba',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5ftimer_5fmin_5fperiod_367',['m_st_timer_min_period',['../structflow_1_1net__flow_1_1Node__options.html#abef8889be34024b07eff3211a3213d5f',1,'flow::net_flow::Node_options']]], + ['m_5fstart_368',['m_start',['../classflow_1_1util_1_1Basic__blob.html#aae53d36a27090ef5da931bc17d4f2bcd',1,'flow::util::Basic_blob']]], + ['m_5fstart_5fwhen_369',['m_start_when',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac16b16c3192e287ae3f08be786626f1a',1,'flow::perf::Checkpointing_timer']]], + ['m_5fstarted_5fthread_5fid_5for_5fnone_370',['m_started_thread_id_or_none',['../classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05',1,'flow::async::Single_thread_task_loop']]], + ['m_5fstate_371',['m_state',['../classflow_1_1net__flow_1_1Event__set.html#a56925e15b38d285f387e10bfb18f93c9',1,'flow::net_flow::Event_set::m_state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a05a765055fd54412c63e57e43697f1bc',1,'flow::net_flow::Peer_socket::m_state()'],['../classflow_1_1net__flow_1_1Server__socket.html#a783f81f10b50f62a638aa26b72d49e36',1,'flow::net_flow::Server_socket::m_state()']]], + ['m_5ftarget_372',['m_target',['../classflow_1_1util_1_1String__ostream.html#afa87f2303455e62c0be244deb37cb65e',1,'flow::util::String_ostream']]], + ['m_5ftarget_5fappender_5fostream_373',['m_target_appender_ostream',['../classflow_1_1log_1_1Thread__local__string__appender.html#a7bb2cd7d173ddc0ca3075d0475015f96',1,'flow::log::Thread_local_string_appender::m_target_appender_ostream()'],['../classflow_1_1util_1_1String__ostream.html#abaf52be7b420f87d9a75edec7be2fc6b',1,'flow::util::String_ostream::m_target_appender_ostream()']]], + ['m_5ftarget_5fappender_5fostream_5fprev_5fos_5fstate_374',['m_target_appender_ostream_prev_os_state',['../classflow_1_1log_1_1Thread__local__string__appender.html#aebc7ceab35e8201f0c60b59a0cc93ca3',1,'flow::log::Thread_local_string_appender']]], + ['m_5ftarget_5finserter_375',['m_target_inserter',['../classflow_1_1util_1_1String__ostream.html#ab8866da6531e449b80b1b7bb18a3b7b9',1,'flow::util::String_ostream']]], + ['m_5ftarget_5fopts_376',['m_target_opts',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a94df262d2c85c677916cb5f57f9c1559',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5ftarget_5for_5fnull_377',['m_target_or_null',['../classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c',1,'flow::util::Scoped_setter']]], + ['m_5ftarget_5ftask_5fengine_378',['m_target_task_engine',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a5b688a4071b8ad58a776de8d3816b757',1,'flow::net_flow::asio::Node::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a714f570918cfa8d225d75c787e7ac573',1,'flow::net_flow::asio::Peer_socket::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#ae236d96a176b209b217f04bb94119efe',1,'flow::net_flow::asio::Server_socket::m_target_task_engine()']]], + ['m_5ftask_5fengine_379',['m_task_engine',['../classflow_1_1net__flow_1_1Node.html#af5597a417d03e2bed87cd772ef5cef29',1,'flow::net_flow::Node::m_task_engine()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#af3eb85a490f1386423fe4a6a32979a93',1,'flow::util::Scheduled_task_handle_state::m_task_engine()'],['../classflow_1_1async_1_1Task__qing__thread.html#a1f4a96efdc1820ddbb4a4bf49c0d38e6',1,'flow::async::Task_qing_thread::m_task_engine()']]], + ['m_5ftask_5fengines_380',['m_task_engines',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#ad09c2d973e3794f36bf06bd001ca860e',1,'flow::async::Segregated_thread_task_loop']]], + ['m_5fthis_5fsample_5fstart_5ftime_381',['m_this_sample_start_time',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac627f8c9ae6c51c2ea14dd46af4f4150',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fthrottling_5factive_382',['m_throttling_active',['../classflow_1_1log_1_1Async__file__logger.html#a5bbad8cea27134844e73daff014cc82a',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fbegins_383',['m_throttling_begins',['../structflow_1_1log_1_1Async__file__logger_1_1Log__request.html#aee7f652b0e17e39d0afdb721bc956cf7',1,'flow::log::Async_file_logger::Log_request']]], + ['m_5fthrottling_5fcfg_384',['m_throttling_cfg',['../classflow_1_1log_1_1Async__file__logger.html#aa3d544ab96299a8c2b53b7be485d1a6e',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fmutex_385',['m_throttling_mutex',['../classflow_1_1log_1_1Async__file__logger.html#a99cd4faff109ef35720fbed9837973dc',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fnow_386',['m_throttling_now',['../classflow_1_1log_1_1Async__file__logger.html#aa13ef30bc2d66758c29c31dc76a130aa',1,'flow::log::Async_file_logger']]], + ['m_5ftime_5faccumulator_387',['m_time_accumulator',['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a55aa9c680221d64b44715256713a5bee',1,'flow::async::Timed_concurrent_task_loop_impl']]], + ['m_5ftimed_5floop_388',['m_timed_loop',['../classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9',1,'flow::async::Timed_single_thread_task_loop']]], + ['m_5ftimer_389',['m_timer',['../classflow_1_1net__flow_1_1Drop__timer.html#ad5dfc3cd2f8e5e4d28c49e28ee5c221f',1,'flow::net_flow::Drop_timer::m_timer()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a5934d785b54bb71e739c262b6db8dda9',1,'flow::util::Scheduled_task_handle_state::m_timer()']]], + ['m_5ftimer_5ffailure_390',['m_timer_failure',['../classflow_1_1net__flow_1_1Drop__timer.html#a21e78b9da6196043e1c05589c46911fa',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimer_5ffired_391',['m_timer_fired',['../classflow_1_1net__flow_1_1Drop__timer.html#a862595a7ec5d4bea05ad0e85c52e88ac',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimer_5frunning_392',['m_timer_running',['../classflow_1_1net__flow_1_1Drop__timer.html#a9528326a35b021bb859bed948ae3d7a4',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimers_393',['m_timers',['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#af1c4f46ce680b979e98a3e255c88d063',1,'flow::perf::Checkpointing_timer::Aggregator']]], + ['m_5ftotal_5fdata_5fcount_394',['m_total_data_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a893ca5129ab56fd57de0cdee92e59bd7',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fdata_5fsize_395',['m_total_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a132cb2a966ede1bf5fe363e5885a0f64',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fto_5fsend_5facks_5fcount_396',['m_total_to_send_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a66c7d92f84d1a1f7b1039a926b1a8f00',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fto_5fsend_5facks_5fdata_5fsize_397',['m_total_to_send_acks_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a6946add6977b28e244c69606fd14db03',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftype_5fid_5fstr_398',['m_type_id_str',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a8dc054626823cb59a1570214349b8450',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], + ['m_5ftype_5fostream_5fmanip_399',['m_type_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a7f4fd9ce69e293477e96fbad0a2298ed',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fudp_5fendpoint_400',['m_udp_endpoint',['../structflow_1_1net__flow_1_1Remote__endpoint.html#a582f3a55d828cd4e36369682315c7629',1,'flow::net_flow::Remote_endpoint']]], + ['m_5funaccepted_5fsocks_401',['m_unaccepted_socks',['../classflow_1_1net__flow_1_1Server__socket.html#a7ba32040008ffe0637d3a1847deb76c5',1,'flow::net_flow::Server_socket']]], + ['m_5funderlying_5floop_402',['m_underlying_loop',['../classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4',1,'flow::async::Single_thread_task_loop']]], + ['m_5fuse_5fhuman_5ffriendly_5ftime_5fstamps_403',['m_use_human_friendly_time_stamps',['../classflow_1_1log_1_1Config.html#a1b16be31f5dcfba9536a377c9d29abb6',1,'flow::log::Config']]], + ['m_5fvalidate_5fstored_5fvals_5fargs_404',['m_validate_stored_vals_args',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#ae780a398078db2299e8a5c3714bcb987',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalue_5flist_405',['m_value_list',['../classflow_1_1util_1_1Linked__hash__map.html#a3c2ebf269951f5fe2412b6a77303b5ba',1,'flow::util::Linked_hash_map::m_value_list()'],['../classflow_1_1util_1_1Linked__hash__set.html#a4bae43bd9a1b68903af4b6f9452ccf9e',1,'flow::util::Linked_hash_set::m_value_list()']]], + ['m_5fvalues_406',['m_values',['../classflow_1_1cfg_1_1Option__set.html#a7bda9a32640f89d1c8a2306b8b368a13',1,'flow::cfg::Option_set::m_values()'],['../structflow_1_1perf_1_1Time__pt__set.html#a9867f05832f22c6aceb340c0ba697dbc',1,'flow::perf::Time_pt_set::m_values()'],['../structflow_1_1perf_1_1Duration__set.html#ae7d89b9e16f45dc59b27092e0496ce4f',1,'flow::perf::Duration_set::m_values()']]], + ['m_5fvalues_5fcandidate_407',['m_values_candidate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#acbaeb3dd021040e15bff6e85b8da5253',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_candidate()'],['../classflow_1_1cfg_1_1Option__set.html#adfd72b4b73913193252a02d35acdff09',1,'flow::cfg::Option_set::m_values_candidate()']]], + ['m_5fvalues_5fcurrent_408',['m_values_current',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a19683d3ea7c64e3abf96f85b60e9e610',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fdefault_409',['m_values_default',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a7c91f3db7161cf30816e0fe1fccc39c0',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_default()'],['../classflow_1_1cfg_1_1Option__set.html#aea72e19fce43c10c84f6445f1892de41',1,'flow::cfg::Option_set::m_values_default()']]], + ['m_5fvalues_5fdefault_5fno_5facc_410',['m_values_default_no_acc',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#adc8e05f6d6528755712280a812a6ad4d',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fto_5fload_411',['m_values_to_load',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a838e0b0c1f25e167a102e11de272de4e',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fto_5fvalidate_412',['m_values_to_validate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a75ab66920b874488bed052a90bc716d5',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fverbose_5fostream_5fmanip_413',['m_verbose_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae3e64b049838a690384a899209ffca7b',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fverbosities_5fby_5fcomponent_414',['m_verbosities_by_component',['../classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f',1,'flow::log::Config']]], + ['m_5fverbosity_5fdefault_415',['m_verbosity_default',['../classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c',1,'flow::log::Config']]], + ['m_5fwant_416',['m_want',['../classflow_1_1net__flow_1_1Event__set.html#af4fa5dbda4ffd95b35dee57fc01b90ce',1,'flow::net_flow::Event_set']]], + ['m_5fwhich_5fclocks_417',['m_which_clocks',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac5518c3fdc58f8867ca114186562575b',1,'flow::perf::Checkpointing_timer']]], + ['m_5fworker_418',['m_worker',['../classflow_1_1net__flow_1_1Node.html#a84b7e03ae7b13dae0f59db1475e46fd3',1,'flow::net_flow::Node']]], + ['m_5fworker_5fthread_419',['m_worker_thread',['../classflow_1_1async_1_1Task__qing__thread.html#a75b218e1b5f137ead984588107ef02b0',1,'flow::async::Task_qing_thread']]], + ['m_5fzero_5fpoint_5fnum_420',['m_zero_point_num',['../classflow_1_1net__flow_1_1Sequence__number.html#adcd83d66fac1a77d9e94f13d1c4671b0',1,'flow::net_flow::Sequence_number']]], + ['make_5ferror_5fcode_421',['make_error_code',['../namespaceflow_1_1net__flow_1_1error.html#a6d35c37eb70a494bb27aa807c41de176',1,'flow::net_flow::error']]], + ['make_5fzero_422',['make_zero',['../classflow_1_1util_1_1Basic__blob.html#af431f32bde5ed1ba255e3e1cbbcbd906',1,'flow::util::Basic_blob::make_zero()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a024fdd8b9f0389201c25b6601af2c3d4',1,'flow::util::Blob_with_log_context::make_zero()']]], + ['mapped_5ftype_423',['mapped_type',['../classflow_1_1util_1_1Linked__hash__map.html#add4b2bf1d3c8c99b5b6667ace94c8ff2',1,'flow::util::Linked_hash_map']]], + ['mark_5fdata_5fpacket_5fsent_424',['mark_data_packet_sent',['../classflow_1_1net__flow_1_1Node.html#a2983d0d8a4d4eb5c3402f63f68ef44d8',1,'flow::net_flow::Node']]], + ['max_5fblock_5fsize_425',['max_block_size',['../classflow_1_1net__flow_1_1Node.html#a4bd7b471dd6cd3e3570930b48d30e577',1,'flow::net_flow::Node::max_block_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa1f821dde38a7aa572651730744edbd8',1,'flow::net_flow::Peer_socket::max_block_size() const']]], + ['max_5fblock_5fsize_5fmultiple_426',['max_block_size_multiple',['../classflow_1_1net__flow_1_1Peer__socket.html#a102b78eaac9c8add512238ec5f26fcfc',1,'flow::net_flow::Peer_socket']]], + ['max_5fsize_427',['max_size',['../classflow_1_1util_1_1Linked__hash__map.html#a2b07a93e11051e1cdb17ee9478b61321',1,'flow::util::Linked_hash_map::max_size()'],['../classflow_1_1util_1_1Linked__hash__set.html#ac1bfed582b7ee057afe92be2bbabb422',1,'flow::util::Linked_hash_set::max_size()']]], + ['mem_5fcost_428',['mem_cost',['../classflow_1_1log_1_1Async__file__logger.html#a6d74d81cb726a30f33f4fc106e3be5b6',1,'flow::log::Async_file_logger']]], + ['message_429',['message',['../classflow_1_1net__flow_1_1error_1_1Category.html#ae01ad7da6ba4d494a5455a82fc03481e',1,'flow::net_flow::error::Category']]], + ['msg_5fmetadata_430',['Msg_metadata',['../structflow_1_1log_1_1Msg__metadata.html',1,'flow::log']]], + ['mutable_5fbuffer_431',['mutable_buffer',['../classflow_1_1util_1_1Basic__blob.html#a2bd3cb0b6b3f304fb6fb771c1b76ec66',1,'flow::util::Basic_blob']]], + ['mutable_5fvalues_5fcopy_432',['mutable_values_copy',['../classflow_1_1cfg_1_1Option__set.html#a45eebf6c9d7384bcc95c10ff7c934e1f',1,'flow::cfg::Option_set']]], + ['mutable_5fvalues_5fptr_433',['Mutable_values_ptr',['../classflow_1_1cfg_1_1Option__set.html#a03ec172ee1f15c091ca78102faa55987',1,'flow::cfg::Option_set']]], + ['mutex_434',['Mutex',['../classflow_1_1log_1_1Async__file__logger.html#a2f21285253ab0f9a81cf991f99ce6549',1,'flow::log::Async_file_logger::Mutex()'],['../classflow_1_1net__flow_1_1Event__set.html#a47e4e6d304a6a381e7469fe87c547738',1,'flow::net_flow::Event_set::Mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad1e36619c78b15f46576a18678a4ee67',1,'flow::net_flow::Peer_socket::Mutex()'],['../classflow_1_1net__flow_1_1Server__socket.html#a15e9fa900dfa1a0a2d693bf8ffb5b07d',1,'flow::net_flow::Server_socket::Mutex()']]], + ['mutex_5fnon_5frecursive_435',['Mutex_non_recursive',['../namespaceflow_1_1util.html#add6ade273326f27eaf9bfd170a909626',1,'flow::util']]], + ['mutex_5fnoop_5fshared_5fnon_5frecursive_436',['Mutex_noop_shared_non_recursive',['../namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112',1,'flow::util']]], + ['mutex_5frecursive_437',['Mutex_recursive',['../namespaceflow_1_1util.html#a9c7a5df07c2e86c788de9e6bbaee77d5',1,'flow::util']]], + ['mutex_5fshared_5fnon_5frecursive_438',['Mutex_shared_non_recursive',['../namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421',1,'flow::util']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/all_c.js b/doc/flow_doc/generated/html_full/search/all_c.js index 2602fdb06..2221f2ec3 100644 --- a/doc/flow_doc/generated/html_full/search/all_c.js +++ b/doc/flow_doc/generated/html_full/search/all_c.js @@ -1,7 +1,7 @@ var searchData= [ ['n_5fbytes_5ft_0',['n_bytes_t',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#a40993b2699c5e8ab69dfd56e57ecdd28',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['n_5fthreads_1',['n_threads',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a28d7c70f0d3147ba48a10afa84ef98c1',1,'flow::async::Segregated_thread_task_loop::n_threads()'],['../classflow_1_1async_1_1Concurrent__task__loop.html#a131335863b19446dbc349de181d4b5a1',1,'flow::async::Concurrent_task_loop::n_threads()'],['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a2138f93d5fd11407973a7b7b13ca7353',1,'flow::async::Timed_concurrent_task_loop_impl::n_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a5c9a3da291fa961bb4d8c4be13c39bb8',1,'flow::async::Cross_thread_task_loop::n_threads()']]], + ['n_5fthreads_1',['n_threads',['../classflow_1_1async_1_1Concurrent__task__loop.html#a131335863b19446dbc349de181d4b5a1',1,'flow::async::Concurrent_task_loop::n_threads()'],['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a28d7c70f0d3147ba48a10afa84ef98c1',1,'flow::async::Segregated_thread_task_loop::n_threads()'],['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a2138f93d5fd11407973a7b7b13ca7353',1,'flow::async::Timed_concurrent_task_loop_impl::n_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a5c9a3da291fa961bb4d8c4be13c39bb8',1,'flow::async::Cross_thread_task_loop::n_threads()']]], ['name_2',['name',['../classflow_1_1net__flow_1_1error_1_1Category.html#a48d79d77f1fa3f1f41452250378af552',1,'flow::net_flow::error::Category']]], ['native_5fis_5fbig_5fendian_3',['native_is_big_endian',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a57c06fd2d0b1c3ac058c13f9081067f0',1,'flow::net_flow::Low_lvl_packet']]], ['net_5fenv_5fsimulator_4',['Net_env_simulator',['../classflow_1_1net__flow_1_1Net__env__simulator.html',1,'flow::net_flow::Net_env_simulator'],['../classflow_1_1net__flow_1_1Net__env__simulator.html#a29cbd6ad9be0d9bf7ac72a4e0675d4b8',1,'flow::net_flow::Net_env_simulator::Net_env_simulator()']]], @@ -11,18 +11,18 @@ var searchData= ['net_5fflow_5futil_2ecpp_8',['net_flow_util.cpp',['../net__flow__util_8cpp.html',1,'']]], ['new_5fround_5ftrip_5ftime_5fsample_9',['new_round_trip_time_sample',['../classflow_1_1net__flow_1_1Node.html#ae9b88eadca41228fe6a671f2f14ead0b',1,'flow::net_flow::Node']]], ['newest_10',['newest',['../classflow_1_1util_1_1Linked__hash__map.html#a4b796f7ddb4dbc2f2e64ea25985d43b8',1,'flow::util::Linked_hash_map::newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#ac2d182fa6a6b6814527477991bc6ca68',1,'flow::util::Linked_hash_set::newest()']]], - ['node_11',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#aa929c4c93d814d46bf195c874af63fee',1,'flow::net_flow::asio::Peer_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#aa929c4c93d814d46bf195c874af63fee',1,'flow::net_flow::asio::Server_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::asio::Server_socket::Node()'],['../classflow_1_1net__flow_1_1Event__set.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Event_set::Node()'],['../structflow_1_1net__flow_1_1Node__options.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Node_options::Node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Peer_socket::Node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Server_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()'],['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()']]], - ['node_12',['node',['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set']]], - ['node_13',['Node',['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::asio::Peer_socket']]], - ['node_14',['node',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()']]], - ['node_2ecpp_15',['node.cpp',['../node_8cpp.html',1,'(Global Namespace)'],['../asio_2node_8cpp.html',1,'(Global Namespace)']]], - ['node_2ehpp_16',['node.hpp',['../node_8hpp.html',1,'(Global Namespace)'],['../asio_2node_8hpp.html',1,'(Global Namespace)']]], - ['node_5foptions_17',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow::Node_options'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ade95ba3f5a7ed233a2e5f9e244ed6170',1,'flow::net_flow::Peer_socket_options::Node_options()'],['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options::Node_options()']]], - ['node_5for_5fpost_5ferror_18',['node_or_post_error',['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#aa9e96966c7a8f5d35a34c0f5b3f65eb6',1,'flow::net_flow::asio::Peer_socket']]], - ['node_5freceive_19',['node_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#af3ac1b0b3c9b1c3a5ec246148595c657',1,'flow::net_flow::Peer_socket']]], - ['node_5fsend_20',['node_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a83ba2b4c39555afad67932ea6ed39bbe',1,'flow::net_flow::Peer_socket']]], - ['node_5fsync_5freceive_21',['node_sync_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#a8abde92d5189bf2a058fe8741789f814',1,'flow::net_flow::Peer_socket']]], - ['node_5fsync_5fsend_22',['node_sync_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a34e2c7dfb5596269a6f86a716015f1a6',1,'flow::net_flow::Peer_socket']]], + ['node_11',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#aa929c4c93d814d46bf195c874af63fee',1,'flow::net_flow::asio::Peer_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#aa929c4c93d814d46bf195c874af63fee',1,'flow::net_flow::asio::Server_socket::Node()'],['../structflow_1_1net__flow_1_1Node__options.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Node_options::Node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Peer_socket::Node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Server_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()'],['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()']]], + ['node_12',['node',['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()']]], + ['node_13',['Node',['../classflow_1_1net__flow_1_1Event__set.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::Event_set::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::asio::Server_socket::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a6db9d28bd448a131448276ee03de1e6d',1,'flow::net_flow::asio::Peer_socket::Node()']]], + ['node_2ecpp_14',['node.cpp',['../node_8cpp.html',1,'(Global Namespace)'],['../asio_2node_8cpp.html',1,'(Global Namespace)']]], + ['node_2ehpp_15',['node.hpp',['../node_8hpp.html',1,'(Global Namespace)'],['../asio_2node_8hpp.html',1,'(Global Namespace)']]], + ['node_5foptions_16',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow::Node_options'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ade95ba3f5a7ed233a2e5f9e244ed6170',1,'flow::net_flow::Peer_socket_options::Node_options()'],['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options::Node_options()']]], + ['node_5for_5fpost_5ferror_17',['node_or_post_error',['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#aa9e96966c7a8f5d35a34c0f5b3f65eb6',1,'flow::net_flow::asio::Peer_socket']]], + ['node_5freceive_18',['node_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#af3ac1b0b3c9b1c3a5ec246148595c657',1,'flow::net_flow::Peer_socket']]], + ['node_5fsend_19',['node_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a83ba2b4c39555afad67932ea6ed39bbe',1,'flow::net_flow::Peer_socket']]], + ['node_5fsync_5freceive_20',['node_sync_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#a8abde92d5189bf2a058fe8741789f814',1,'flow::net_flow::Peer_socket']]], + ['node_5fsync_5fsend_21',['node_sync_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a34e2c7dfb5596269a6f86a716015f1a6',1,'flow::net_flow::Peer_socket']]], + ['noncopyable_22',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html',1,'flow::util::Noncopyable'],['../structflow_1_1util_1_1Noncopyable.html#ac59627ad248129dd7b37d2d9286761cf',1,'flow::util::Noncopyable::Noncopyable()=default'],['../structflow_1_1util_1_1Noncopyable.html#a14a71cd2314f39996c2609ab383145e8',1,'flow::util::Noncopyable::Noncopyable(const Noncopyable &)=delete']]], ['normalize_5fcomponent_5fname_23',['normalize_component_name',['../classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b',1,'flow::log::Config']]], ['normalized_5fcomponent_5fname_24',['normalized_component_name',['../classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de',1,'flow::log::Config']]], ['now_25',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], diff --git a/doc/flow_doc/generated/html_full/search/all_d.js b/doc/flow_doc/generated/html_full/search/all_d.js index 9b4967f49..af4953788 100644 --- a/doc/flow_doc/generated/html_full/search/all_d.js +++ b/doc/flow_doc/generated/html_full/search/all_d.js @@ -33,13 +33,13 @@ var searchData= ['operator_2d_3d_30',['operator-=',['../classflow_1_1net__flow_1_1Sequence__number.html#aab26c0d5ac005a150ec9c31c3d83802c',1,'flow::net_flow::Sequence_number']]], ['operator_2f_3d_31',['operator/=',['../structflow_1_1perf_1_1Duration__set.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::Duration_set::operator/=()'],['../namespaceflow_1_1perf.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::operator/=()']]], ['operator_3c_32',['operator<',['../classflow_1_1net__flow_1_1Sequence__number.html#a40b55e448b1ef23467e9f33b2c62d01f',1,'flow::net_flow::Sequence_number']]], - ['operator_3c_3c_33',['operator<<',['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_info &stats)'],['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1net__flow.html#a5b19eb9e5f0043bcad407520bd90c1f9',1,'flow::net_flow::operator<<(std::ostream &os, const Sequence_number &seq_num)'],['../namespaceflow_1_1net__flow.html#a23129de20e68f8e125ed8a9bbc483402',1,'flow::net_flow::operator<<(std::ostream &os, const Socket_buffer &sock_buf)'],['../namespaceflow_1_1net__flow.html#a141b6e0eb37057ae02d08d4b34818f4b',1,'flow::net_flow::operator<<(std::ostream &os, const Function< std::ostream &(std::ostream &)> &os_manip)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options::Congestion_control_strategy_choice &strategy_choice)'],['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<(std::ostream &os, const Verbosity_config &val)'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<(std::ostream &os, Sev val)'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<()'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a03ea7069aa4779abaf274989bd4c2fb6',1,'flow::net_flow::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Node__options.html#a6a3a56f6379c0d5b075bc35f078f9e3d',1,'flow::net_flow::Node_options::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#a3954beff8f73e2d6f566f4e15c30219c',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1Socket__buffer.html#aea121167c0d24fe6d493db2717c71a22',1,'flow::net_flow::Socket_buffer::operator<<()'],['../classflow_1_1net__flow_1_1Sequence__number.html#a1883ad1ea308ad6fe72f75b45b5d32e8',1,'flow::net_flow::Sequence_number::operator<<()'],['../classflow_1_1net__flow_1_1Congestion__control__selector.html#a0b2749c14e5458e40eb2d40d0d4f1144',1,'flow::net_flow::Congestion_control_selector::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1net__flow.html#ad9a8fc9f0d8cdfef76158add1f1d1ddc',1,'flow::net_flow::operator<<(std::ostream &os, Peer_socket::Int_state state)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<(std::ostream &os, const Server_socket *serv)'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()']]], + ['operator_3c_3c_33',['operator<<',['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_info &stats)'],['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1net__flow.html#a5b19eb9e5f0043bcad407520bd90c1f9',1,'flow::net_flow::operator<<(std::ostream &os, const Sequence_number &seq_num)'],['../namespaceflow_1_1net__flow.html#a23129de20e68f8e125ed8a9bbc483402',1,'flow::net_flow::operator<<(std::ostream &os, const Socket_buffer &sock_buf)'],['../namespaceflow_1_1net__flow.html#a141b6e0eb37057ae02d08d4b34818f4b',1,'flow::net_flow::operator<<(std::ostream &os, const Function< std::ostream &(std::ostream &)> &os_manip)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options::Congestion_control_strategy_choice &strategy_choice)'],['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<()'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<()'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<()'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a03ea7069aa4779abaf274989bd4c2fb6',1,'flow::net_flow::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Node__options.html#a6a3a56f6379c0d5b075bc35f078f9e3d',1,'flow::net_flow::Node_options::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#a3954beff8f73e2d6f566f4e15c30219c',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1Socket__buffer.html#aea121167c0d24fe6d493db2717c71a22',1,'flow::net_flow::Socket_buffer::operator<<()'],['../classflow_1_1net__flow_1_1Sequence__number.html#a1883ad1ea308ad6fe72f75b45b5d32e8',1,'flow::net_flow::Sequence_number::operator<<()'],['../classflow_1_1net__flow_1_1Congestion__control__selector.html#a0b2749c14e5458e40eb2d40d0d4f1144',1,'flow::net_flow::Congestion_control_selector::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1net__flow.html#ad9a8fc9f0d8cdfef76158add1f1d1ddc',1,'flow::net_flow::operator<<(std::ostream &os, Peer_socket::Int_state state)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<(std::ostream &os, const Server_socket *serv)'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()']]], ['operator_3c_3d_34',['operator<=',['../classflow_1_1net__flow_1_1Sequence__number.html#a426ba917e01cba32ddad0d8c245a731b',1,'flow::net_flow::Sequence_number']]], - ['operator_3d_35',['operator=',['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()'],['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set &&src)'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set const &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map &&src)'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map const &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad261f9c8073e31fe328734c97a9d384b',1,'flow::net_flow::Peer_socket::Individual_ack::operator=()'],['../classflow_1_1net__flow_1_1Sequence__number.html#aad867d849f5c76125dc9ea1abb649c15',1,'flow::net_flow::Sequence_number::operator=()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a3fc4ecbc56e28b299a4bd70325d313a0',1,'flow::net_flow::Ack_packet::Individual_ack::operator=()'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete']]], - ['operator_3d_3d_36',['operator==',['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()'],['../classflow_1_1net__flow_1_1Sequence__number.html#a24819702817b8730ec27a39675768d55',1,'flow::net_flow::Sequence_number::operator==()'],['../classflow_1_1net__flow_1_1Node.html#a99561404e8389fef08fa4ac5c16a7f36',1,'flow::net_flow::Node::operator==()'],['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==(const Remote_endpoint &lhs, const Remote_endpoint &rhs)'],['../namespaceflow_1_1net__flow.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::operator==(const Node::Socket_id &lhs, const Node::Socket_id &rhs)'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()'],['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::Node::Socket_id::operator==()']]], + ['operator_3d_35',['operator=',['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()'],['../structflow_1_1util_1_1Noncopyable.html#a50501b7b5fcc26f2bcb4503c7b32a360',1,'flow::util::Noncopyable::operator=()'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set &&src)'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set const &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=(const Blob_with_log_context &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=(Blob_with_log_context &&moved_src)'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete'],['../classflow_1_1net__flow_1_1Sequence__number.html#aad867d849f5c76125dc9ea1abb649c15',1,'flow::net_flow::Sequence_number::operator=()'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete']]], + ['operator_3d_3d_36',['operator==',['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::Node::Socket_id::operator==()'],['../classflow_1_1net__flow_1_1Sequence__number.html#a24819702817b8730ec27a39675768d55',1,'flow::net_flow::Sequence_number::operator==()'],['../classflow_1_1net__flow_1_1Node.html#a99561404e8389fef08fa4ac5c16a7f36',1,'flow::net_flow::Node::operator==()'],['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()'],['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==(const Remote_endpoint &lhs, const Remote_endpoint &rhs)'],['../namespaceflow_1_1net__flow.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::operator==(const Node::Socket_id &lhs, const Node::Socket_id &rhs)']]], ['operator_3e_37',['operator>',['../classflow_1_1net__flow_1_1Sequence__number.html#ae5ee8f6f299fbc5e578bcfd337bf520b',1,'flow::net_flow::Sequence_number']]], ['operator_3e_3d_38',['operator>=',['../classflow_1_1net__flow_1_1Sequence__number.html#af5b74ff5645f0bf49d0e20773fa5dca7',1,'flow::net_flow::Sequence_number']]], - ['operator_3e_3e_39',['operator>>',['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>(std::istream &is, Sev &val)'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>(std::istream &is, Verbosity_config &val)'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()'],['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380',1,'flow::net_flow::Congestion_control_selector::operator>>()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()']]], + ['operator_3e_3e_39',['operator>>',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380',1,'flow::net_flow::Congestion_control_selector::operator>>()'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>(std::istream &is, Sev &val)'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>(std::istream &is, Verbosity_config &val)'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()'],['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()']]], ['operator_5b_5d_40',['operator[]',['../classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265',1,'flow::async::Op_list::operator[]()'],['../classflow_1_1util_1_1Linked__hash__map.html#a60d1d95f11148f7ed30a7dd92193563a',1,'flow::util::Linked_hash_map::operator[]()']]], ['ops_5fsequence_41',['ops_sequence',['../classflow_1_1async_1_1Op__list.html#a70726f4c547b813687419f3c7cc9f977',1,'flow::async::Op_list']]], ['opt_42',['opt',['../classflow_1_1net__flow_1_1Node.html#a43c42121d48a55a43a48e3a84bd10595',1,'flow::net_flow::Node::opt()'],['../classflow_1_1net__flow_1_1Peer__socket.html#accf6d724ed1f145716ae3d4567f582f3',1,'flow::net_flow::Peer_socket::opt()']]], @@ -73,6 +73,6 @@ var searchData= ['output_5fcomponent_5fto_5fostream_70',['output_component_to_ostream',['../classflow_1_1log_1_1Config.html#a6376bf2af57f655c1cdf00791e6a2f7f',1,'flow::log::Config']]], ['output_5fmap_5fof_5fpkt_5fcounts_71',['output_map_of_pkt_counts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a116259f40c07caafe63017dddb9a837c',1,'flow::net_flow::Peer_socket_info']]], ['output_5fpkt_5fcount_5fkey_72',['output_pkt_count_key',['../structflow_1_1net__flow_1_1Peer__socket__info.html#ad7f9a5c76ba47a6c55f539bb685b5223',1,'flow::net_flow::Peer_socket_info::output_pkt_count_key(std::ostream *os, const std::type_index &type_id)'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a48e6fb07bddd067a9a28cdcf0de62eed',1,'flow::net_flow::Peer_socket_info::output_pkt_count_key(std::ostream *os, Xfer_op_result op_result)']]], - ['output_5fpkt_5fcount_5fvalue_73',['output_pkt_count_value',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8d591fcdf6736f6b8a9ce5f247a5d296',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, const std::map< Xfer_op_result, uint64_t > &value_by_op_result)'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a35cbe27e5945ee2bcfbd104780973e04',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, const boost::array< uint64_t, 2 > &value_by_delay_type)'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#acb82e68bb8681201e735bf2fe1a2e620',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, uint64_t value)']]], + ['output_5fpkt_5fcount_5fvalue_73',['output_pkt_count_value',['../structflow_1_1net__flow_1_1Peer__socket__info.html#acb82e68bb8681201e735bf2fe1a2e620',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, uint64_t value)'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8d591fcdf6736f6b8a9ce5f247a5d296',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, const std::map< Xfer_op_result, uint64_t > &value_by_op_result)'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a35cbe27e5945ee2bcfbd104780973e04',1,'flow::net_flow::Peer_socket_info::output_pkt_count_value(std::ostream *os, const boost::array< uint64_t, 2 > &value_by_delay_type)']]], ['output_5fwhether_5fshould_5flog_74',['output_whether_should_log',['../classflow_1_1log_1_1Config.html#ae429a329e31a41ba75f94578b0e7f26c',1,'flow::log::Config']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/classes_a.js b/doc/flow_doc/generated/html_full/search/classes_a.js index 9979b117a..d2d24ae8b 100644 --- a/doc/flow_doc/generated/html_full/search/classes_a.js +++ b/doc/flow_doc/generated/html_full/search/classes_a.js @@ -3,6 +3,7 @@ var searchData= ['net_5fenv_5fsimulator_0',['Net_env_simulator',['../classflow_1_1net__flow_1_1Net__env__simulator.html',1,'flow::net_flow']]], ['node_1',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node']]], ['node_5foptions_2',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow']]], - ['null_5finterface_3',['Null_interface',['../classflow_1_1util_1_1Null__interface.html',1,'flow::util']]], - ['null_5fvalue_5fset_4',['Null_value_set',['../structflow_1_1cfg_1_1Null__value__set.html',1,'flow::cfg']]] + ['noncopyable_3',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html',1,'flow::util']]], + ['null_5finterface_4',['Null_interface',['../classflow_1_1util_1_1Null__interface.html',1,'flow::util']]], + ['null_5fvalue_5fset_5',['Null_value_set',['../structflow_1_1cfg_1_1Null__value__set.html',1,'flow::cfg']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/functions_8.js b/doc/flow_doc/generated/html_full/search/functions_8.js index 5767e65b5..f473835d7 100644 --- a/doc/flow_doc/generated/html_full/search/functions_8.js +++ b/doc/flow_doc/generated/html_full/search/functions_8.js @@ -7,20 +7,19 @@ var searchData= ['in_5fopen_5fopen_5frange_4',['in_open_open_range',['../namespaceflow_1_1util.html#a733448fee07c2a77e343a3f1590ff82e',1,'flow::util']]], ['in_5fslow_5fstart_5',['in_slow_start',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#aecb03f208c177ec3cbce5242f19efee0',1,'flow::net_flow::Congestion_control_classic_data::in_slow_start() const'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a1468dbf1d36eff05d61657f46df8489b',1,'flow::net_flow::Congestion_control_classic_data::in_slow_start(size_t cong_wnd_bytes, size_t slow_start_thresh_bytes)']]], ['in_5fthread_6',['in_thread',['../classflow_1_1async_1_1Single__thread__task__loop.html#ac282eacf6615eca207ce3cc74f419933',1,'flow::async::Single_thread_task_loop']]], - ['individual_5fack_7',['Individual_ack',['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ac31bcdf4026275cb6fa90947a68d562a',1,'flow::net_flow::Peer_socket::Individual_ack::Individual_ack()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae557559e4c611fafc3d43a19fb161316',1,'flow::net_flow::Ack_packet::Individual_ack::Individual_ack(const Individual_ack &)=delete'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1cfc30a36e8b572f3cedaf045b05f448',1,'flow::net_flow::Ack_packet::Individual_ack::Individual_ack()=delete']]], - ['individual_5fack_5frexmit_5foff_8',['Individual_ack_rexmit_off',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#ab8f16251d8bd583cf6ad114a56b10463',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], - ['individual_5fack_5frexmit_5fon_9',['Individual_ack_rexmit_on',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#ac75ea2d2954f67520dd4ed4c800c06c8',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on']]], - ['info_10',['info',['../classflow_1_1net__flow_1_1Peer__socket.html#aad81cc16fc6f0d353fdc1379e1dd4712',1,'flow::net_flow::Peer_socket']]], - ['init_5fcomponent_5fnames_11',['init_component_names',['../classflow_1_1log_1_1Config.html#a146a60d96256dbaed4f5f0e7dcd8f529',1,'flow::log::Config']]], - ['init_5fcomponent_5fto_5funion_5fidx_5fmapping_12',['init_component_to_union_idx_mapping',['../classflow_1_1log_1_1Config.html#a116df84f1735ade2c4b9b265c4bdd36a',1,'flow::log::Config']]], - ['init_5fcongestion_5fwindow_5fbytes_13',['init_congestion_window_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#acaa476e1821e7ed1344de8c5bfc0c9a7',1,'flow::net_flow::Congestion_control_classic_data']]], - ['insert_14',['insert',['../classflow_1_1util_1_1Linked__hash__set.html#a517b9b0ac9d6ab2c56e27ba380f87180',1,'flow::util::Linked_hash_set::insert()'],['../classflow_1_1util_1_1Linked__hash__map.html#aae7a4a3047c90f0ab26ae1a4ec7b9963',1,'flow::util::Linked_hash_map::insert()']]], - ['insert_5fimpl_15',['insert_impl',['../classflow_1_1util_1_1Linked__hash__set.html#a0a37ac9af14d0061e5b44436f939bc5c',1,'flow::util::Linked_hash_set::insert_impl()'],['../classflow_1_1util_1_1Linked__hash__map.html#ad4ae26c5077ae7f7c6799b53f6efc8a8',1,'flow::util::Linked_hash_map::insert_impl()']]], - ['interrupt_5fall_5fwaits_16',['interrupt_all_waits',['../classflow_1_1net__flow_1_1Node.html#a1124027c715d674f113f2d961e4c6861',1,'flow::net_flow::Node']]], - ['interrupt_5fall_5fwaits_5finternal_5fsig_5fhandler_17',['interrupt_all_waits_internal_sig_handler',['../classflow_1_1net__flow_1_1Node.html#ae996cab95eb139d00f0d430093e64a5f',1,'flow::net_flow::Node']]], - ['interrupt_5fall_5fwaits_5fworker_18',['interrupt_all_waits_worker',['../classflow_1_1net__flow_1_1Node.html#ad2840a7a95f16b7e222e449e3d6b9aca',1,'flow::net_flow::Node']]], - ['invoke_5fdynamic_5fchange_5flisteners_19',['invoke_dynamic_change_listeners',['../classflow_1_1cfg_1_1Config__manager.html#a57140907e43a66705625d391e85e3c52',1,'flow::cfg::Config_manager']]], - ['is_5fservice_5fport_20',['is_service_port',['../classflow_1_1net__flow_1_1Port__space.html#ac43e4303aac2bde697b99bf03901ec85',1,'flow::net_flow::Port_space']]], - ['istream_5fto_5fenum_21',['istream_to_enum',['../namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266',1,'flow::util']]], - ['iterator_5fsans_5fconst_22',['iterator_sans_const',['../classflow_1_1util_1_1Basic__blob.html#a9c8a51530bc17f779215970f3097a1f2',1,'flow::util::Basic_blob']]] + ['individual_5fack_5frexmit_5foff_7',['Individual_ack_rexmit_off',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#ab8f16251d8bd583cf6ad114a56b10463',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], + ['individual_5fack_5frexmit_5fon_8',['Individual_ack_rexmit_on',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#ac75ea2d2954f67520dd4ed4c800c06c8',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on']]], + ['info_9',['info',['../classflow_1_1net__flow_1_1Peer__socket.html#aad81cc16fc6f0d353fdc1379e1dd4712',1,'flow::net_flow::Peer_socket']]], + ['init_5fcomponent_5fnames_10',['init_component_names',['../classflow_1_1log_1_1Config.html#a146a60d96256dbaed4f5f0e7dcd8f529',1,'flow::log::Config']]], + ['init_5fcomponent_5fto_5funion_5fidx_5fmapping_11',['init_component_to_union_idx_mapping',['../classflow_1_1log_1_1Config.html#a116df84f1735ade2c4b9b265c4bdd36a',1,'flow::log::Config']]], + ['init_5fcongestion_5fwindow_5fbytes_12',['init_congestion_window_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#acaa476e1821e7ed1344de8c5bfc0c9a7',1,'flow::net_flow::Congestion_control_classic_data']]], + ['insert_13',['insert',['../classflow_1_1util_1_1Linked__hash__map.html#aae7a4a3047c90f0ab26ae1a4ec7b9963',1,'flow::util::Linked_hash_map::insert()'],['../classflow_1_1util_1_1Linked__hash__set.html#a517b9b0ac9d6ab2c56e27ba380f87180',1,'flow::util::Linked_hash_set::insert()']]], + ['insert_5fimpl_14',['insert_impl',['../classflow_1_1util_1_1Linked__hash__map.html#ad4ae26c5077ae7f7c6799b53f6efc8a8',1,'flow::util::Linked_hash_map::insert_impl()'],['../classflow_1_1util_1_1Linked__hash__set.html#a0a37ac9af14d0061e5b44436f939bc5c',1,'flow::util::Linked_hash_set::insert_impl()']]], + ['interrupt_5fall_5fwaits_15',['interrupt_all_waits',['../classflow_1_1net__flow_1_1Node.html#a1124027c715d674f113f2d961e4c6861',1,'flow::net_flow::Node']]], + ['interrupt_5fall_5fwaits_5finternal_5fsig_5fhandler_16',['interrupt_all_waits_internal_sig_handler',['../classflow_1_1net__flow_1_1Node.html#ae996cab95eb139d00f0d430093e64a5f',1,'flow::net_flow::Node']]], + ['interrupt_5fall_5fwaits_5fworker_17',['interrupt_all_waits_worker',['../classflow_1_1net__flow_1_1Node.html#ad2840a7a95f16b7e222e449e3d6b9aca',1,'flow::net_flow::Node']]], + ['invoke_5fdynamic_5fchange_5flisteners_18',['invoke_dynamic_change_listeners',['../classflow_1_1cfg_1_1Config__manager.html#a57140907e43a66705625d391e85e3c52',1,'flow::cfg::Config_manager']]], + ['is_5fservice_5fport_19',['is_service_port',['../classflow_1_1net__flow_1_1Port__space.html#ac43e4303aac2bde697b99bf03901ec85',1,'flow::net_flow::Port_space']]], + ['istream_5fto_5fenum_20',['istream_to_enum',['../namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266',1,'flow::util']]], + ['iterator_5fsans_5fconst_21',['iterator_sans_const',['../classflow_1_1util_1_1Basic__blob.html#a9c8a51530bc17f779215970f3097a1f2',1,'flow::util::Basic_blob']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/functions_a.js b/doc/flow_doc/generated/html_full/search/functions_a.js index 0f5d8d181..7bc55b3a9 100644 --- a/doc/flow_doc/generated/html_full/search/functions_a.js +++ b/doc/flow_doc/generated/html_full/search/functions_a.js @@ -25,8 +25,8 @@ var searchData= ['log_5fvalues_22',['log_values',['../classflow_1_1cfg_1_1Option__set.html#acb1c681c600d989cd3ae4fe834501214',1,'flow::cfg::Option_set']]], ['logs_5fasynchronously_23',['logs_asynchronously',['../classflow_1_1log_1_1Async__file__logger.html#afd773546633aec017f2041feb3a75dd3',1,'flow::log::Async_file_logger::logs_asynchronously()'],['../classflow_1_1log_1_1Simple__ostream__logger.html#a1548d51e8314a9cff0669f20cae9ae76',1,'flow::log::Simple_ostream_logger::logs_asynchronously()'],['../classflow_1_1log_1_1Logger.html#ae04868e2a384e60a349ecba8340cd731',1,'flow::log::Logger::logs_asynchronously()'],['../classflow_1_1log_1_1Serial__file__logger.html#a591d96ecc030af0b40c42a33e2a616d9',1,'flow::log::Serial_file_logger::logs_asynchronously()'],['../classflow_1_1log_1_1Buffer__logger.html#ac5d382dae85e7c9f0f51e5e6eebd99a5',1,'flow::log::Buffer_logger::logs_asynchronously()']]], ['loss_5fevent_24',['loss_event',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a71b1e4e4384319db571edfbd825bd6ea',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], - ['low_5flvl_5fpacket_25',['Low_lvl_packet',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a4a0585d1abae63af891161f1719bc582',1,'flow::net_flow::Low_lvl_packet']]], - ['low_5flvl_5fpacket_26',['low_lvl_packet',['../classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html#a49544d0d58bbf13d099eb7fb0798f9c6',1,'flow::net_flow::Peer_socket_receive_stats_accumulator']]], + ['low_5flvl_5fpacket_25',['low_lvl_packet',['../classflow_1_1net__flow_1_1Peer__socket__receive__stats__accumulator.html#a49544d0d58bbf13d099eb7fb0798f9c6',1,'flow::net_flow::Peer_socket_receive_stats_accumulator']]], + ['low_5flvl_5fpacket_26',['Low_lvl_packet',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a4a0585d1abae63af891161f1719bc582',1,'flow::net_flow::Low_lvl_packet']]], ['low_5flvl_5fpacket_5fsent_27',['low_lvl_packet_sent',['../classflow_1_1net__flow_1_1Node.html#a0055a25892990585561e69ceb02214d5',1,'flow::net_flow::Node']]], ['low_5flvl_5fpacket_5fxfer_5fcalled_28',['low_lvl_packet_xfer_called',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a664e608952d250f7f5d41bdf04abf68b',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], ['low_5flvl_5fpacket_5fxfer_5fcompleted_29',['low_lvl_packet_xfer_completed',['../classflow_1_1net__flow_1_1Peer__socket__send__stats__accumulator.html#a186fb12bc19cf00e50b80116f782ff94',1,'flow::net_flow::Peer_socket_send_stats_accumulator']]], diff --git a/doc/flow_doc/generated/html_full/search/functions_c.js b/doc/flow_doc/generated/html_full/search/functions_c.js index 92af3e47a..88403f08c 100644 --- a/doc/flow_doc/generated/html_full/search/functions_c.js +++ b/doc/flow_doc/generated/html_full/search/functions_c.js @@ -6,20 +6,21 @@ var searchData= ['net_5fenv_5fsimulator_3',['Net_env_simulator',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a29cbd6ad9be0d9bf7ac72a4e0675d4b8',1,'flow::net_flow::Net_env_simulator']]], ['new_5fround_5ftrip_5ftime_5fsample_4',['new_round_trip_time_sample',['../classflow_1_1net__flow_1_1Node.html#ae9b88eadca41228fe6a671f2f14ead0b',1,'flow::net_flow::Node']]], ['newest_5',['newest',['../classflow_1_1util_1_1Linked__hash__map.html#a4b796f7ddb4dbc2f2e64ea25985d43b8',1,'flow::util::Linked_hash_map::newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#ac2d182fa6a6b6814527477991bc6ca68',1,'flow::util::Linked_hash_set::newest()']]], - ['node_6',['node',['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()']]], - ['node_7',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()'],['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()']]], + ['node_6',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()'],['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()']]], + ['node_7',['node',['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()']]], ['node_5foptions_8',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options']]], ['node_5for_5fpost_5ferror_9',['node_or_post_error',['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#aa9e96966c7a8f5d35a34c0f5b3f65eb6',1,'flow::net_flow::asio::Peer_socket']]], ['node_5freceive_10',['node_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#af3ac1b0b3c9b1c3a5ec246148595c657',1,'flow::net_flow::Peer_socket']]], ['node_5fsend_11',['node_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a83ba2b4c39555afad67932ea6ed39bbe',1,'flow::net_flow::Peer_socket']]], ['node_5fsync_5freceive_12',['node_sync_receive',['../classflow_1_1net__flow_1_1Peer__socket.html#a8abde92d5189bf2a058fe8741789f814',1,'flow::net_flow::Peer_socket']]], ['node_5fsync_5fsend_13',['node_sync_send',['../classflow_1_1net__flow_1_1Peer__socket.html#a34e2c7dfb5596269a6f86a716015f1a6',1,'flow::net_flow::Peer_socket']]], - ['normalize_5fcomponent_5fname_14',['normalize_component_name',['../classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b',1,'flow::log::Config']]], - ['normalized_5fcomponent_5fname_15',['normalized_component_name',['../classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de',1,'flow::log::Config']]], - ['now_16',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], - ['now_5fcpu_5flo_5fres_17',['now_cpu_lo_res',['../classflow_1_1perf_1_1Checkpointing__timer.html#a82e717d5b1f6df56dc70b26c7da100f3',1,'flow::perf::Checkpointing_timer']]], - ['now_5fcpu_5flo_5fres_5fraw_18',['now_cpu_lo_res_raw',['../classflow_1_1perf_1_1Checkpointing__timer.html#a7c799f400ceddd5ad5529fa66f026fd0',1,'flow::perf::Checkpointing_timer']]], - ['null_19',['null',['../structflow_1_1cfg_1_1Final__validator__func.html#aa930ac2fbe3ad6abc07994984f875c81',1,'flow::cfg::Final_validator_func::null()'],['../classflow_1_1cfg_1_1Option__set.html#accd086867406387070ac766b03e7998c',1,'flow::cfg::Option_set::null()']]], - ['null_5fdeclare_5fopts_5ffunc_20',['null_declare_opts_func',['../namespaceflow_1_1cfg.html#adfe41c8484a878742976ddb84aa9e2d8',1,'flow::cfg']]], - ['null_5ffinal_5fvalidator_5ffunc_21',['null_final_validator_func',['../namespaceflow_1_1cfg.html#af1a4e0a153ec8216ead76450e900e386',1,'flow::cfg']]] + ['noncopyable_14',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html#ac59627ad248129dd7b37d2d9286761cf',1,'flow::util::Noncopyable::Noncopyable()=default'],['../structflow_1_1util_1_1Noncopyable.html#a14a71cd2314f39996c2609ab383145e8',1,'flow::util::Noncopyable::Noncopyable(const Noncopyable &)=delete']]], + ['normalize_5fcomponent_5fname_15',['normalize_component_name',['../classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b',1,'flow::log::Config']]], + ['normalized_5fcomponent_5fname_16',['normalized_component_name',['../classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de',1,'flow::log::Config']]], + ['now_17',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], + ['now_5fcpu_5flo_5fres_18',['now_cpu_lo_res',['../classflow_1_1perf_1_1Checkpointing__timer.html#a82e717d5b1f6df56dc70b26c7da100f3',1,'flow::perf::Checkpointing_timer']]], + ['now_5fcpu_5flo_5fres_5fraw_19',['now_cpu_lo_res_raw',['../classflow_1_1perf_1_1Checkpointing__timer.html#a7c799f400ceddd5ad5529fa66f026fd0',1,'flow::perf::Checkpointing_timer']]], + ['null_20',['null',['../structflow_1_1cfg_1_1Final__validator__func.html#aa930ac2fbe3ad6abc07994984f875c81',1,'flow::cfg::Final_validator_func::null()'],['../classflow_1_1cfg_1_1Option__set.html#accd086867406387070ac766b03e7998c',1,'flow::cfg::Option_set::null()']]], + ['null_5fdeclare_5fopts_5ffunc_21',['null_declare_opts_func',['../namespaceflow_1_1cfg.html#adfe41c8484a878742976ddb84aa9e2d8',1,'flow::cfg']]], + ['null_5ffinal_5fvalidator_5ffunc_22',['null_final_validator_func',['../namespaceflow_1_1cfg.html#af1a4e0a153ec8216ead76450e900e386',1,'flow::cfg']]] ]; diff --git a/doc/flow_doc/generated/html_full/search/functions_d.js b/doc/flow_doc/generated/html_full/search/functions_d.js index 3ed24991e..d6456ef8f 100644 --- a/doc/flow_doc/generated/html_full/search/functions_d.js +++ b/doc/flow_doc/generated/html_full/search/functions_d.js @@ -29,11 +29,11 @@ var searchData= ['operator_3c_26',['operator<',['../classflow_1_1net__flow_1_1Sequence__number.html#a40b55e448b1ef23467e9f33b2c62d01f',1,'flow::net_flow::Sequence_number']]], ['operator_3c_3c_27',['operator<<',['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_info &stats)'],['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1net__flow.html#a5b19eb9e5f0043bcad407520bd90c1f9',1,'flow::net_flow::operator<<(std::ostream &os, const Sequence_number &seq_num)'],['../namespaceflow_1_1net__flow.html#a23129de20e68f8e125ed8a9bbc483402',1,'flow::net_flow::operator<<(std::ostream &os, const Socket_buffer &sock_buf)'],['../namespaceflow_1_1net__flow.html#a141b6e0eb37057ae02d08d4b34818f4b',1,'flow::net_flow::operator<<(std::ostream &os, const Function< std::ostream &(std::ostream &)> &os_manip)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options::Congestion_control_strategy_choice &strategy_choice)'],['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<(std::ostream &os, const Verbosity_config &val)'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<(std::ostream &os, Sev val)'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<()'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<()'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1net__flow.html#ad9a8fc9f0d8cdfef76158add1f1d1ddc',1,'flow::net_flow::operator<<(std::ostream &os, Peer_socket::Int_state state)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<(std::ostream &os, const Node_options &opts)'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)']]], ['operator_3c_3d_28',['operator<=',['../classflow_1_1net__flow_1_1Sequence__number.html#a426ba917e01cba32ddad0d8c245a731b',1,'flow::net_flow::Sequence_number']]], - ['operator_3d_29',['operator=',['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=()'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map &&src)'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map const &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=(const Blob_with_log_context &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=(Blob_with_log_context &&moved_src)'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad261f9c8073e31fe328734c97a9d384b',1,'flow::net_flow::Peer_socket::Individual_ack::operator=()'],['../classflow_1_1net__flow_1_1Sequence__number.html#aad867d849f5c76125dc9ea1abb649c15',1,'flow::net_flow::Sequence_number::operator=()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a3fc4ecbc56e28b299a4bd70325d313a0',1,'flow::net_flow::Ack_packet::Individual_ack::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=(Log_context &&src)'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=(const Log_context &src)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete']]], - ['operator_3d_3d_30',['operator==',['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==(const Remote_endpoint &lhs, const Remote_endpoint &rhs)'],['../namespaceflow_1_1net__flow.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::operator==(const Node::Socket_id &lhs, const Node::Socket_id &rhs)'],['../classflow_1_1net__flow_1_1Sequence__number.html#a24819702817b8730ec27a39675768d55',1,'flow::net_flow::Sequence_number::operator==()'],['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()'],['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::Node::Socket_id::operator==()']]], + ['operator_3d_29',['operator=',['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../structflow_1_1util_1_1Noncopyable.html#a50501b7b5fcc26f2bcb4503c7b32a360',1,'flow::util::Noncopyable::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set &&src)'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set const &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map &&src)'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map const &src)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete'],['../classflow_1_1net__flow_1_1Sequence__number.html#aad867d849f5c76125dc9ea1abb649c15',1,'flow::net_flow::Sequence_number::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=(Log_context &&src)'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=(const Log_context &src)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=()'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=()']]], + ['operator_3d_3d_30',['operator==',['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../classflow_1_1net__flow_1_1Sequence__number.html#a24819702817b8730ec27a39675768d55',1,'flow::net_flow::Sequence_number::operator==()'],['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()'],['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::Node::Socket_id::operator==()'],['../namespaceflow_1_1net__flow.html#a9e6b5a60123429cfdfde6149a88ac508',1,'flow::net_flow::operator==(const Node::Socket_id &lhs, const Node::Socket_id &rhs)'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==(const Remote_endpoint &lhs, const Remote_endpoint &rhs)']]], ['operator_3e_31',['operator>',['../classflow_1_1net__flow_1_1Sequence__number.html#ae5ee8f6f299fbc5e578bcfd337bf520b',1,'flow::net_flow::Sequence_number']]], ['operator_3e_3d_32',['operator>=',['../classflow_1_1net__flow_1_1Sequence__number.html#af5b74ff5645f0bf49d0e20773fa5dca7',1,'flow::net_flow::Sequence_number']]], - ['operator_3e_3e_33',['operator>>',['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>()'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>()']]], + ['operator_3e_3e_33',['operator>>',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>(std::istream &is, Verbosity_config &val)'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>(std::istream &is, Sev &val)'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()']]], ['operator_5b_5d_34',['operator[]',['../classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265',1,'flow::async::Op_list::operator[]()'],['../classflow_1_1util_1_1Linked__hash__map.html#a60d1d95f11148f7ed30a7dd92193563a',1,'flow::util::Linked_hash_map::operator[]()']]], ['ops_5fsequence_35',['ops_sequence',['../classflow_1_1async_1_1Op__list.html#a70726f4c547b813687419f3c7cc9f977',1,'flow::async::Op_list']]], ['opt_36',['opt',['../classflow_1_1net__flow_1_1Node.html#a43c42121d48a55a43a48e3a84bd10595',1,'flow::net_flow::Node::opt()'],['../classflow_1_1net__flow_1_1Peer__socket.html#accf6d724ed1f145716ae3d4567f582f3',1,'flow::net_flow::Peer_socket::opt()']]], diff --git a/doc/flow_doc/generated/html_full/search/typedefs_2.js b/doc/flow_doc/generated/html_full/search/typedefs_2.js index 507af0433..8b0eb5b95 100644 --- a/doc/flow_doc/generated/html_full/search/typedefs_2.js +++ b/doc/flow_doc/generated/html_full/search/typedefs_2.js @@ -12,10 +12,10 @@ var searchData= ['component_5funion_5fidx_5fto_5fsev_5fmap_9',['Component_union_idx_to_sev_map',['../classflow_1_1log_1_1Config.html#a3c5c7d62daba9625b0309b31da287585',1,'flow::log::Config']]], ['const_5fbuffer_10',['Const_buffer',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ab735867345855ad43e5e3ff788cf5a9a',1,'flow::net_flow::Low_lvl_packet']]], ['const_5fbuffer_5fsequence_11',['Const_buffer_sequence',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a6e16e9c355c6d5e2acff5f9bdc24f397',1,'flow::net_flow::Low_lvl_packet']]], - ['const_5fiterator_12',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context::Const_iterator()']]], - ['const_5fiterator_13',['const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context::const_iterator()']]], - ['const_5fiterator_14',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map']]], - ['const_5fiterator_15',['const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()']]], + ['const_5fiterator_12',['const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context::const_iterator()']]], + ['const_5fiterator_13',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context::Const_iterator()']]], + ['const_5fiterator_14',['const_iterator',['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map']]], + ['const_5fiterator_15',['Const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()']]], ['const_5fpointer_16',['const_pointer',['../classflow_1_1util_1_1Linked__hash__map.html#a657eef8b8299a7c87d48a6e373a6db3a',1,'flow::util::Linked_hash_map::const_pointer()'],['../classflow_1_1util_1_1Basic__blob.html#ab73d1c26268670495dda161f95d33ec1',1,'flow::util::Basic_blob::const_pointer()'],['../classflow_1_1util_1_1Linked__hash__set.html#a9c16ed9c8ac77595d66f3d1593ed0a4d',1,'flow::util::Linked_hash_set::const_pointer()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a950e0692366572312b48ba56d98668ae',1,'flow::util::Blob_with_log_context::const_pointer()']]], ['const_5fptr_17',['Const_ptr',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a55bebcb04b4cc192e38023e58bfd761c',1,'flow::net_flow::Ack_packet::Individual_ack::Const_ptr()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a209d79e058d103c84fc10be84d492a8b',1,'flow::net_flow::Peer_socket::Individual_ack::Const_ptr()'],['../classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886',1,'flow::util::Shared_ptr_alias_holder::Const_ptr()']]], ['const_5freference_18',['const_reference',['../classflow_1_1util_1_1Basic__blob.html#a8b5a94572c51f89991987ca9f5bcf2b2',1,'flow::util::Basic_blob::const_reference()'],['../classflow_1_1util_1_1Blob__with__log__context.html#ac4ed9c11ae020e314ce51c46dbb14afd',1,'flow::util::Blob_with_log_context::const_reference()'],['../classflow_1_1util_1_1Linked__hash__map.html#a82d0a782f7dee3fefaae51e85d05657b',1,'flow::util::Linked_hash_map::const_reference()'],['../classflow_1_1util_1_1Linked__hash__set.html#a39f45d5e6ea44d01a3921116c76e3043',1,'flow::util::Linked_hash_set::const_reference()']]], diff --git a/doc/flow_doc/generated/html_full/search/variables_0.js b/doc/flow_doc/generated/html_full/search/variables_0.js index d828d48c5..f762306ff 100644 --- a/doc/flow_doc/generated/html_full/search/variables_0.js +++ b/doc/flow_doc/generated/html_full/search/variables_0.js @@ -164,260 +164,261 @@ var searchData= ['m_5fmsg_5fsrc_5fline_161',['m_msg_src_line',['../structflow_1_1log_1_1Msg__metadata.html#a2f17801fae328d1fdc070edc2578dd91',1,'flow::log::Msg_metadata']]], ['m_5fmulti_5fsrc_5fupdate_5fin_5fprogress_162',['m_multi_src_update_in_progress',['../classflow_1_1cfg_1_1Config__manager.html#ac74b46ed066f012a633ca16c400441ac',1,'flow::cfg::Config_manager']]], ['m_5fmultiple_5fsize_163',['m_multiple_size',['../classflow_1_1net__flow_1_1Sequence__number.html#a18436b6983e89f83d139e6c94dbd1e19',1,'flow::net_flow::Sequence_number']]], - ['m_5fmutex_164',['m_mutex',['../classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html#add632fccb79ec2178b9d2250ae0fef54',1,'flow::util::Rnd_gen_uniform_range_mt::m_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ab41b19ed4e62cb14fcd7dac81e4a8f41',1,'flow::net_flow::Peer_socket::m_mutex()'],['../classflow_1_1net__flow_1_1Event__set.html#a0dda853ab017dd9bfcfb71b601d15698',1,'flow::net_flow::Event_set::m_mutex()'],['../classflow_1_1net__flow_1_1Server__socket.html#a40967c1981ffde4f7b75c6bb5e5b279b',1,'flow::net_flow::Server_socket::m_mutex()']]], + ['m_5fmutex_164',['m_mutex',['../classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html#add632fccb79ec2178b9d2250ae0fef54',1,'flow::util::Rnd_gen_uniform_range_mt::m_mutex()'],['../classflow_1_1net__flow_1_1Server__socket.html#a40967c1981ffde4f7b75c6bb5e5b279b',1,'flow::net_flow::Server_socket::m_mutex()'],['../classflow_1_1net__flow_1_1Event__set.html#a0dda853ab017dd9bfcfb71b601d15698',1,'flow::net_flow::Event_set::m_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ab41b19ed4e62cb14fcd7dac81e4a8f41',1,'flow::net_flow::Peer_socket::m_mutex()']]], ['m_5fmutex_5funless_5fsingle_5fthreaded_165',['m_mutex_unless_single_threaded',['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a521f4d604b987b3bd81ad8a0d0e82836',1,'flow::util::Scheduled_task_handle_state']]], ['m_5fn_5fthreads_5for_5fzero_166',['m_n_threads_or_zero',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a606e8d4566cbbca893b9ac73dd949516',1,'flow::async::Segregated_thread_task_loop::m_n_threads_or_zero()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#ab1f8b7e68ffc431d74f1d1460597b05d',1,'flow::async::Cross_thread_task_loop::m_n_threads_or_zero()']]], ['m_5fname_167',['m_name',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a6c0363e3e1ef330464b87363e4287758',1,'flow::perf::Checkpointing_timer::Checkpoint::m_name()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a25981d44a91e1315bd92711d6e18a91b',1,'flow::perf::Checkpointing_timer::m_name()'],['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a6ea09e3aa22c8e4ba234f465bdc0e0fd',1,'flow::perf::Checkpointing_timer::Aggregator::m_name()']]], - ['m_5fnet_5fenv_5fsim_168',['m_net_env_sim',['../classflow_1_1net__flow_1_1Node.html#a43472c3277cdf5e3f28d4f4f51e3bcc0',1,'flow::net_flow::Node']]], - ['m_5fnickname_169',['m_nickname',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a02a10c00df613d1da478e97163dec523',1,'flow::async::Segregated_thread_task_loop::m_nickname()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a91d90d8816538bbb529e9f6da7209103',1,'flow::async::Cross_thread_task_loop::m_nickname()'],['../classflow_1_1cfg_1_1Config__manager.html#a68da387dad566805b969aded698661cb',1,'flow::cfg::Config_manager::m_nickname()'],['../classflow_1_1cfg_1_1Option__set.html#a5e5cf9a5efd81ba6d851171a109005f6',1,'flow::cfg::Option_set::m_nickname()']]], - ['m_5fno_5facks_5fyet_170',['m_no_acks_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#adc8e7ca2c14f74a85beb863c145b97ba',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fno_5fsamples_5fyet_171',['m_no_samples_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac89711897d0c265eb3b18a748c03d3aa',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fnode_172',['m_node',['../classflow_1_1net__flow_1_1Peer__socket.html#a36ab27af6886c7699f9965a5eb296cd6',1,'flow::net_flow::Peer_socket::m_node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8e8e3363803b2fe2c862b9fac1dfbb77',1,'flow::net_flow::Server_socket::m_node()'],['../classflow_1_1net__flow_1_1Event__set.html#af635301685a4a331142e1ac8a791a65d',1,'flow::net_flow::Event_set::m_node()']]], - ['m_5fnode_5fopts_173',['m_node_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a05abba2bde50995af42cd6cf02d0b167',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fnode_5ftask_5fengine_174',['m_node_task_engine',['../classflow_1_1net__flow_1_1Drop__timer.html#ac3cfab1594111b3c3254eebc84591908',1,'flow::net_flow::Drop_timer']]], - ['m_5fnull_175',['m_null',['../classflow_1_1cfg_1_1Option__set.html#a18227d957ee16e50977dd4bb34d489ab',1,'flow::cfg::Option_set']]], - ['m_5fnum_176',['m_num',['../classflow_1_1net__flow_1_1Sequence__number.html#ac6e88639a0c1b5a1da2bf5b7f203b38c',1,'flow::net_flow::Sequence_number']]], - ['m_5fnum_5fline_5fid_177',['m_num_line_id',['../classflow_1_1net__flow_1_1Sequence__number.html#ae457e665c370f16e9196b1a88010dcbb',1,'flow::net_flow::Sequence_number']]], - ['m_5fofs_178',['m_ofs',['../classflow_1_1log_1_1Serial__file__logger.html#ac42c4ddfd3b664363edf6c38ce942fde',1,'flow::log::Serial_file_logger']]], - ['m_5fofs_5fwriter_179',['m_ofs_writer',['../classflow_1_1log_1_1Serial__file__logger.html#a92ed6ae3183bbd1f4905245f485cb531',1,'flow::log::Serial_file_logger']]], - ['m_5fon_5fdynamic_5fchange_5ffuncs_180',['m_on_dynamic_change_funcs',['../classflow_1_1cfg_1_1Config__manager.html#a08ba012812d46fcc6588d4bb8c4d04c9',1,'flow::cfg::Config_manager']]], - ['m_5fon_5fevent_181',['m_on_event',['../classflow_1_1net__flow_1_1Event__set.html#a59f6ddb0d0258cc029c435a8ed0f89f7',1,'flow::net_flow::Event_set']]], - ['m_5fopen_5fsub_5fstate_182',['m_open_sub_state',['../classflow_1_1net__flow_1_1Peer__socket.html#ae5d47460784cc20c9e44237edffaac95',1,'flow::net_flow::Peer_socket']]], - ['m_5fops_183',['m_ops',['../classflow_1_1async_1_1Op__list.html#abbbe77231b22d8db7bfaf9181e6028fe',1,'flow::async::Op_list']]], - ['m_5fopt_5fnames_184',['m_opt_names',['../classflow_1_1cfg_1_1Option__set.html#a650edbbffb9f75ed102f2bab5e355feb',1,'flow::cfg::Option_set']]], - ['m_5fopt_5frexmit_5fon_185',['m_opt_rexmit_on',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#acc2a10d19e8e54c88518ad2e02a08b68',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fopt_5frexmit_5fon_5fraw_186',['m_opt_rexmit_on_raw',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a22799fa7c7948cc2f35a411523c12479',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], - ['m_5foption_5fset_187',['m_option_set',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a0ed8c54022a5d7c61abc03efaae17f88',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fopts_188',['m_opts',['../classflow_1_1net__flow_1_1Node.html#ade08f0457943f803c23b55649139c0d3',1,'flow::net_flow::Node::m_opts()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad59c09f34003873a3c207cc590236773',1,'flow::net_flow::Peer_socket::m_opts()']]], - ['m_5fopts_5ffor_5fhelp_189',['m_opts_for_help',['../classflow_1_1cfg_1_1Option__set.html#aaeb9b41e8ac4c9f5a2437cedb0f3472a',1,'flow::cfg::Option_set']]], - ['m_5fopts_5ffor_5fparsing_190',['m_opts_for_parsing',['../classflow_1_1cfg_1_1Option__set.html#a381ff2ba7989b90cec0040e3b833d238',1,'flow::cfg::Option_set']]], - ['m_5fopts_5fmutex_191',['m_opts_mutex',['../classflow_1_1net__flow_1_1Node.html#a449ef757abee4c5d12f8fc62a5ca66b4',1,'flow::net_flow::Node::m_opts_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#addfbe1487c621d4a9c464aec61bc108a',1,'flow::net_flow::Peer_socket::m_opts_mutex()']]], - ['m_5forder_5fnum_192',['m_order_num',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#a5265c3824ad25d1de4f888fa811dd4e6',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5foriginating_5fserv_193',['m_originating_serv',['../classflow_1_1net__flow_1_1Peer__socket.html#a5629d810d2c7252eaa2243e076dde83f',1,'flow::net_flow::Peer_socket']]], - ['m_5fos_194',['m_os',['../classflow_1_1log_1_1Buffer__logger.html#a143ed6107ce07817f0c7b59354387db3',1,'flow::log::Buffer_logger::m_os()'],['../classflow_1_1log_1_1Ostream__log__msg__writer.html#ac37b6d6bbfb5c9feefd35fd78cc66dad',1,'flow::log::Ostream_log_msg_writer::m_os()']]], - ['m_5fos_5fwriter_195',['m_os_writer',['../classflow_1_1log_1_1Buffer__logger.html#a5f61d68308b597e131094e4bbcf08b21',1,'flow::log::Buffer_logger']]], - ['m_5fos_5fwriters_196',['m_os_writers',['../classflow_1_1log_1_1Simple__ostream__logger.html#a1ef85d2192fb0cd3977944a20bfa61f9',1,'flow::log::Simple_ostream_logger']]], - ['m_5fown_5ftarget_5fstr_197',['m_own_target_str',['../classflow_1_1util_1_1String__ostream.html#a0ac450344a0464a634f78288f6c357c8',1,'flow::util::String_ostream']]], - ['m_5fown_5ftask_5fengine_198',['m_own_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a0a80c87ce824a15fb84a73d99f5d61ac',1,'flow::async::Task_qing_thread']]], - ['m_5fpacked_199',['m_packed',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a3e7152648c0098491512da590b47b464',1,'flow::net_flow::Low_lvl_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__packet.html#aaf2fa9221da49c413441aa8fec93ce91',1,'flow::net_flow::Syn_ack_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a1a0bad5bc4e9c966709f7bc8a2469bf6',1,'flow::net_flow::Syn_ack_ack_packet::m_packed()']]], - ['m_5fpacket_200',['m_packet',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf',1,'flow::net_flow::Peer_socket::Sent_packet']]], - ['m_5fpacket_5fdata_201',['m_packet_data',['../classflow_1_1net__flow_1_1Node.html#acea4db94c4fb86ddaa2502c2d7e128ea',1,'flow::net_flow::Node']]], - ['m_5fpacket_5fq_202',['m_packet_q',['../structflow_1_1net__flow_1_1Send__pacing__data.html#aed68c9912e8c2ada5a9fcef0f9df2331',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fparsing_203',['m_parsing',['../classflow_1_1cfg_1_1Option__set.html#ac3f6c86292b4f6040c655f6bdcb05a3e',1,'flow::cfg::Option_set']]], - ['m_5fpayload_5fenum_5fraw_5fvalue_204',['m_payload_enum_raw_value',['../classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6',1,'flow::log::Component']]], - ['m_5fpayload_5ftype_5for_5fnull_205',['m_payload_type_or_null',['../classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac',1,'flow::log::Component']]], - ['m_5fpending_5flogs_5fsz_206',['m_pending_logs_sz',['../classflow_1_1log_1_1Async__file__logger.html#a7cce9184c2137aa4c2d09894e1aaa7c9',1,'flow::log::Async_file_logger']]], - ['m_5fper_5fthread_5fops_207',['m_per_thread_ops',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a3e643b2f348746d57b1e2ddb81a1150a',1,'flow::async::Segregated_thread_task_loop']]], - ['m_5fper_5fthread_5fstrands_208',['m_per_thread_strands',['../classflow_1_1async_1_1Cross__thread__task__loop.html#addbcc2e22d4a57b89b82130bb0f3e482',1,'flow::async::Cross_thread_task_loop']]], - ['m_5fports_209',['m_ports',['../classflow_1_1net__flow_1_1Node.html#afd6388a362531ada956a864fefff6011',1,'flow::net_flow::Node']]], - ['m_5fpos_210',['m_pos',['../structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html#a6d4eafd7d31261d7bdc8eb88a558fb2f',1,'flow::cfg::Config_manager::On_dynamic_change_func_handle']]], - ['m_5fpresumed_5fdropped_5fdata_5fsize_211',['m_presumed_dropped_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ab1b46c0670b98a87e106a91758a02f35',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fq_212',['m_q',['../classflow_1_1net__flow_1_1Socket__buffer.html#ab9d0faeeb2a8d1058b24319e8a14e52a',1,'flow::net_flow::Socket_buffer']]], - ['m_5fqing_5fthreads_213',['m_qing_threads',['../classflow_1_1async_1_1Cross__thread__task__loop.html#a2e93cd0649bf68bdeda1cb844f53c5a8',1,'flow::async::Cross_thread_task_loop::m_qing_threads()'],['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a15c616fe03a6deb80e4c1f556b023bba',1,'flow::async::Segregated_thread_task_loop::m_qing_threads()']]], - ['m_5fraw_5ftype_5fid_214',['m_raw_type_id',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a167901d7c0f96f240dd789027ad99dc5',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], - ['m_5frcv_215',['m_rcv',['../structflow_1_1net__flow_1_1Peer__socket__info.html#af8234f1645d63b9eee57f6937dc222de',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5facked_5fpackets_216',['m_rcv_acked_packets',['../classflow_1_1net__flow_1_1Peer__socket.html#a8229396adfd306d15e8a05dac3fe8c29',1,'flow::net_flow::Peer_socket::m_rcv_acked_packets()'],['../structflow_1_1net__flow_1_1Ack__packet.html#a232e22e04614ead19fa4531a89838015',1,'flow::net_flow::Ack_packet::m_rcv_acked_packets()']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5foff_5fout_217',['m_rcv_acked_packets_rexmit_off_out',['../structflow_1_1net__flow_1_1Ack__packet.html#aebad844e9061da02db8f168374869f9e',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5fon_5fout_218',['m_rcv_acked_packets_rexmit_on_out',['../structflow_1_1net__flow_1_1Ack__packet.html#abfcb97c4f3f8552c619b6aba07674063',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5facked_5fpackets_5frexmit_5fout_5fsize_219',['m_rcv_acked_packets_rexmit_out_size',['../structflow_1_1net__flow_1_1Ack__packet.html#aae3806ebf76e628494fd6f7681c01409',1,'flow::net_flow::Ack_packet']]], - ['m_5frcv_5fbuf_220',['m_rcv_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#aae9cb8f2dbd50ddaa0265d940b149ef3',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fbuf_5fsize_221',['m_rcv_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a127a03a0b0e2f73d1059b7b42f251fa2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fdelayed_5fack_5ftimer_222',['m_rcv_delayed_ack_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a88f967e74f8618c94088113e918ab52f',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fin_5frcv_5fwnd_5frecovery_223',['m_rcv_in_rcv_wnd_recovery',['../classflow_1_1net__flow_1_1Peer__socket.html#ad7414dfca4b869dd3a4e0de39195c69e',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5finit_5fseq_5fnum_224',['m_rcv_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a5dc05d1f5deb71e1259c5d5aad1fcf84',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5flast_5fsent_5frcv_5fwnd_225',['m_rcv_last_sent_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a7fa76b609ef0aa5962d8de77338cf9ee',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fnext_5fseq_5fnum_226',['m_rcv_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a13c640ebd14a75df3894e7d885d16f5f',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fpackets_5fwith_5fgaps_227',['m_rcv_packets_with_gaps',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8c3326fea94763621c47c8b0e4d31eb2',1,'flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ae82958ed6d71be46b96eceaca6214143',1,'flow::net_flow::Peer_socket::m_rcv_packets_with_gaps()']]], - ['m_5frcv_5fpending_5facks_228',['m_rcv_pending_acks',['../classflow_1_1net__flow_1_1Peer__socket.html#ad46ed439a3d118eb2b540e9f99a7b0ca',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fpending_5facks_5fsize_5fat_5frecv_5fhandler_5fstart_229',['m_rcv_pending_acks_size_at_recv_handler_start',['../classflow_1_1net__flow_1_1Peer__socket.html#a780f86759f861a3a84de8c5c768736b7',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5freassembly_5fq_5fdata_5fsize_230',['m_rcv_reassembly_q_data_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3a38b2a47235621222eb58e6212a4f05',1,'flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa7398394052c8e634365fb979c294644',1,'flow::net_flow::Peer_socket::m_rcv_reassembly_q_data_size()']]], - ['m_5frcv_5fstats_231',['m_rcv_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#a7d1f1d381749473f7a2471b8be20d6a8',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fcumulative_5fsize_232',['m_rcv_syn_rcvd_data_cumulative_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a4f97c94357653fe6df91677ef070d3e8',1,'flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a1553bbefc3407cf84eaa8e256c6cffff',1,'flow::net_flow::Peer_socket::m_rcv_syn_rcvd_data_cumulative_size()']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_233',['m_rcv_syn_rcvd_data_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a48320d96118a37626f1852626965e6ed',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_5fsize_234',['m_rcv_syn_rcvd_data_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6210e5a1ecd85ed1cb46be696f5faec4',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fwnd_235',['m_rcv_wnd',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a1ed3bdee2d19c2adaaf00fda9b5a7ca8',1,'flow::net_flow::Syn_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a3a3a3d676ec71eee0d2daa56a3b73403',1,'flow::net_flow::Syn_ack_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Ack__packet.html#a56b2560b87540a3cf5c7bba9e9666641',1,'flow::net_flow::Ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a84ae8091d89ae59304fd5ebd18539d8b',1,'flow::net_flow::Peer_socket_info::m_rcv_wnd()']]], - ['m_5frcv_5fwnd_5fexhausted_236',['m_rcv_wnd_exhausted',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a7c23d15ff0f3350cca96e38322f3cbf0',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5frcv_5fwnd_5flast_5fadvertised_237',['m_rcv_wnd_last_advertised',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a2562eebd9be1837147fef6fa616cb920',1,'flow::net_flow::Peer_socket_info']]], - ['m_5frcv_5fwnd_5frecovery_5fcount_238',['m_rcv_wnd_recovery_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ae2d0497f399e890eb6cec9bc85427d63',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5frcv_5fwnd_5frecovery_5fscheduled_5ftask_239',['m_rcv_wnd_recovery_scheduled_task',['../classflow_1_1net__flow_1_1Peer__socket.html#afd590cc70d06b8e903027e4924fd095a',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fwnd_5frecovery_5fstart_5ftime_240',['m_rcv_wnd_recovery_start_time',['../classflow_1_1net__flow_1_1Peer__socket.html#a5476d9206f997fc9119b2a80b078ee87',1,'flow::net_flow::Peer_socket']]], - ['m_5frcv_5fwnd_5frecovery_5fsuccess_5fcount_241',['m_rcv_wnd_recovery_success_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a11b5b29017bd45bdf822282d75c61bfc',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5frcv_5fwnd_5frecovery_5ftimeout_5fcount_242',['m_rcv_wnd_recovery_timeout_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a49f930549d48f8dd8239080707a236c2',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5freceived_5fack_5fcount_243',['m_received_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a49fd72447e2eda5168855963f6f55fdf',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5flow_5flvl_5fack_5fcount_244',['m_received_low_lvl_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#acca7ee65f331c8d6b1ed9c1c64f941c6',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5flow_5flvl_5frcv_5fwnd_5fonly_5fack_5fcount_245',['m_received_low_lvl_rcv_wnd_only_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#ab16d86a43937ff1a082c8eb9710ae24b',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freceived_5fwhen_246',['m_received_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad6e1407a2a3fc95e568b00f31e423b25',1,'flow::net_flow::Peer_socket::Individual_ack']]], - ['m_5frecent_5fephemeral_5fports_247',['m_recent_ephemeral_ports',['../classflow_1_1net__flow_1_1Port__space.html#ae401e02d49ce557bbc5474e049eb5455',1,'flow::net_flow::Port_space']]], - ['m_5frecv_5flatency_5fdistribution_5fmsec_248',['m_recv_latency_distribution_msec',['../classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5flatency_5fseq_249',['m_recv_latency_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5fdup_5fdistribution_250',['m_recv_packet_dup_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5fdup_5fseq_251',['m_recv_packet_dup_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5floss_5fdistribution_252',['m_recv_packet_loss_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac',1,'flow::net_flow::Net_env_simulator']]], - ['m_5frecv_5fpacket_5floss_5fseq_253',['m_recv_packet_loss_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138',1,'flow::net_flow::Net_env_simulator']]], - ['m_5fremote_5fendpoint_254',['m_remote_endpoint',['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a23527fa6deadda111d7c4c194a0ce177',1,'flow::net_flow::Node::Socket_id::m_remote_endpoint()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a218ec098984b754b43940001f59ab787',1,'flow::net_flow::Peer_socket::m_remote_endpoint()']]], - ['m_5fremote_5frcv_5fwnd_5fexhaustion_5fevents_255',['m_remote_rcv_wnd_exhaustion_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#af3976b80514468082ca36eb00857a5bb',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fremote_5frcv_5fwnd_5frecovery_5fevents_256',['m_remote_rcv_wnd_recovery_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a146759e1b8603f000b85e90ce02f7327',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5freopening_257',['m_reopening',['../classflow_1_1log_1_1Serial__file__logger.html#a1e8b20725c1ce10cd996da75fc098a87',1,'flow::log::Serial_file_logger']]], - ['m_5freserved2_258',['m_reserved2',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a244e09a3f5318c25a120e3d29379adc8',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], - ['m_5freset_5frtt_5fmin_259',['m_reset_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#a5b3a333ae29bd009cd22919c1e01c19f',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], - ['m_5frexmit_5fid_260',['m_rexmit_id',['../structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0',1,'flow::net_flow::Data_packet::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae17b658ee88e60bdb6606af607b00de2',1,'flow::net_flow::Ack_packet::Individual_ack::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#a0324b8de1d20023e10507d527ee93cfe',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a29080d01ac5bc0d51ad407587c6721ab',1,'flow::net_flow::Peer_socket::Individual_ack::m_rexmit_id()']]], - ['m_5frnd_5fgenerator_261',['m_rnd_generator',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43',1,'flow::net_flow::Net_env_simulator::m_rnd_generator()'],['../classflow_1_1net__flow_1_1Port__space.html#ae4714945b23e588b1554240fa590560a',1,'flow::net_flow::Port_space::m_rnd_generator()']]], - ['m_5frnd_5fop_5fidx_262',['m_rnd_op_idx',['../classflow_1_1async_1_1Op__list.html#a55134b36cc93325a85131a8efc0843c2',1,'flow::async::Op_list']]], - ['m_5frnd_5fsecurity_5ftokens_263',['m_rnd_security_tokens',['../classflow_1_1net__flow_1_1Node.html#ae536f016607677a945ad42034a21e82a',1,'flow::net_flow::Node']]], - ['m_5froot_5fto_5ftarget_5ffunc_264',['m_root_to_target_func',['../classflow_1_1cfg_1_1Dynamic__cfg__context.html#a33801a2e601913865719ecb5767dd0c8',1,'flow::cfg::Dynamic_cfg_context']]], - ['m_5fround_5ftrip_5ftime_5fvariance_265',['m_round_trip_time_variance',['../classflow_1_1net__flow_1_1Peer__socket.html#a27ce5b19ab4abcf61aa07153c46b2be3',1,'flow::net_flow::Peer_socket']]], - ['m_5frtt_5fmin_266',['m_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#aac8260cf710dc42843a478873ed8b649',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], - ['m_5fs_5fd_5fopt_5fsets_267',['m_s_d_opt_sets',['../classflow_1_1cfg_1_1Config__manager.html#a4e724d9d455ea31439c6832d0bc645bd',1,'flow::cfg::Config_manager']]], - ['m_5fsaved_5fvalue_268',['m_saved_value',['../classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202',1,'flow::util::Scoped_setter']]], - ['m_5fsecurity_5ftoken_269',['m_security_token',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a46bb776a13c77d7109469c0c29565a30',1,'flow::net_flow::Syn_ack_packet::m_security_token()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#ab2537625fa282f302e586dee1c24cd19',1,'flow::net_flow::Syn_ack_ack_packet::m_security_token()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a33a90b123612cc2e6a119cfa95ba4f6d',1,'flow::net_flow::Peer_socket::m_security_token()']]], - ['m_5fseed_270',['m_seed',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2',1,'flow::net_flow::Net_env_simulator']]], - ['m_5fsent_5fcwnd_5fbytes_271',['m_sent_cwnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#abc5bf2e627dad5d2dcfb0324853b37f7',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5fsent_5fdata_5fcount_272',['m_sent_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a72a061170ab84cd19aabb1c40238d65f',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5fdata_5fsize_273',['m_sent_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a702a7e3fa092414f80190a783f478aeb',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5findividual_5facks_5fcount_274',['m_sent_individual_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a77855f9a844be7513158191875d1c4f2',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5flow_5flvl_5facks_5fcount_275',['m_sent_low_lvl_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a7de6b1c501fee009e63639a177589a0c',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5flow_5flvl_5frcv_5fwnd_5fonly_5facks_5fcount_276',['m_sent_low_lvl_rcv_wnd_only_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a95629aa4094c8e9496081df11ca43787',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5fsent_5frexmitted_5fdata_5fcount_277',['m_sent_rexmitted_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a0bde533fd087669e6dc356e45be975b4',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5frexmitted_5fdata_5fsize_278',['m_sent_rexmitted_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a3e00dce3ed58630d79a8cdaa7b76c8ee',1,'flow::net_flow::Peer_socket_send_stats']]], - ['m_5fsent_5ftime_279',['m_sent_time',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#ad513e58f4eb611c3a91d96df26f53f2c',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], - ['m_5fsent_5fwhen_280',['m_sent_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e',1,'flow::net_flow::Peer_socket::Sent_packet']]], - ['m_5fseq_281',['m_seq',['../classflow_1_1util_1_1Rnd__gen__uniform__range.html#ac216ad57ff7d9a116bc13b71510231bf',1,'flow::util::Rnd_gen_uniform_range']]], - ['m_5fseq_5fnum_282',['m_seq_num',['../structflow_1_1net__flow_1_1Data__packet.html#a94d817529e94ac88ee2cea6f3dd1badb',1,'flow::net_flow::Data_packet::m_seq_num()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1d027f817b86cc377d76bc38434229a4',1,'flow::net_flow::Ack_packet::Individual_ack::m_seq_num()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a8a237605b83d8a0d1b175395a83ad768',1,'flow::net_flow::Peer_socket::Individual_ack::m_seq_num()']]], - ['m_5fseq_5fnum_5fgenerator_283',['m_seq_num_generator',['../classflow_1_1net__flow_1_1Node.html#a8938c4a091edf1c1c77e2cc8f505f0ff',1,'flow::net_flow::Node']]], - ['m_5fseq_5fnum_5fraw_284',['m_seq_num_raw',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#a8952017a9b9267971a8d79eaa82f358a',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], - ['m_5fserial_5flogger_285',['m_serial_logger',['../classflow_1_1log_1_1Async__file__logger.html#a5c06c592797c70077fc02c98ebf231da',1,'flow::log::Async_file_logger']]], - ['m_5fserialized_5fmetadata_286',['m_serialized_metadata',['../structflow_1_1net__flow_1_1Syn__packet.html#abde26e74af2154fda517d6125353f305',1,'flow::net_flow::Syn_packet::m_serialized_metadata()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a322dddf34a06bb199dab02c993bad686',1,'flow::net_flow::Peer_socket::m_serialized_metadata()']]], - ['m_5fservice_5fports_287',['m_service_ports',['../classflow_1_1net__flow_1_1Port__space.html#a1f8e8e52bf4ec90e0b13d9159c403eae',1,'flow::net_flow::Port_space']]], - ['m_5fservs_288',['m_servs',['../classflow_1_1net__flow_1_1Node.html#aae28990628a86a07327f49973f2390df',1,'flow::net_flow::Node']]], - ['m_5fshared_5ftask_5fengine_289',['m_shared_task_engine',['../classflow_1_1async_1_1Cross__thread__task__loop.html#a3fb892d50647ad249eea983b7a664315',1,'flow::async::Cross_thread_task_loop']]], - ['m_5fsignal_5fset_290',['m_signal_set',['../classflow_1_1log_1_1Async__file__logger.html#a7192ad2ad8de3014dba6805cd60d5166',1,'flow::log::Async_file_logger::m_signal_set()'],['../classflow_1_1net__flow_1_1Node.html#abecf0f8111af82fa081c71fda490608a',1,'flow::net_flow::Node::m_signal_set()']]], - ['m_5fsince_5flast_291',['m_since_last',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#aacbec1a1e5600aeac4e7ca876060552f',1,'flow::perf::Checkpointing_timer::Checkpoint']]], - ['m_5fsize_292',['m_size',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b',1,'flow::net_flow::Peer_socket::Sent_packet::m_size()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html#a7d0760b1dead081bdcf775fbca7f708b',1,'flow::net_flow::Peer_socket::Received_packet::m_size()'],['../classflow_1_1util_1_1Basic__blob.html#ac008b60f7fe4253be9527436b0661dcc',1,'flow::util::Basic_blob::m_size()']]], - ['m_5fslice_5fperiod_293',['m_slice_period',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af0c881081c6706dba393ef814386b143',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslice_5fstart_294',['m_slice_start',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af1e8f11a36db3b967d9a5f61b115750a',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslice_5ftimer_295',['m_slice_timer',['../structflow_1_1net__flow_1_1Send__pacing__data.html#a100a406213a5edf2854440397719bb91',1,'flow::net_flow::Send_pacing_data']]], - ['m_5fslow_5fstart_5fthresh_5fbytes_296',['m_slow_start_thresh_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a239c6315ca562c4e782431879f39c74d',1,'flow::net_flow::Congestion_control_classic_data']]], - ['m_5fsnd_297',['m_snd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a02c61270ec35141affc5bb9f6edc5cd0',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fbandwidth_5festimator_298',['m_snd_bandwidth_estimator',['../classflow_1_1net__flow_1_1Peer__socket.html#a2dd08c5fed4d179e4fde3a632c084751',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fbuf_299',['m_snd_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#a993edf95f6bce2e57e7111e42533dc74',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fbuf_5fsize_300',['m_snd_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a45e2cdb7f0a7e0fd470adeab4009f44a',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_301',['m_snd_cong_ctl',['../classflow_1_1net__flow_1_1Peer__socket.html#a35eb43f2b5d7dd46a941def4523f673c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fbytes_302',['m_snd_cong_ctl_in_flight_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a784bd75264e26acbccd966e48c07dab9',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fcount_303',['m_snd_cong_ctl_in_flight_count',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a76f59a6c658d45c3283865b97dd01489',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fwnd_5fbytes_304',['m_snd_cong_ctl_wnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a959898645f07733966840b7b8309e6c2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fcong_5fctl_5fwnd_5fcount_5fapprox_305',['m_snd_cong_ctl_wnd_count_approx',['../structflow_1_1net__flow_1_1Peer__socket__info.html#ab9da1d80bbed4b286c084dba3ed5b12e',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fdrop_5ftimeout_306',['m_snd_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__info.html#afe104d81f760a454df6d3b0273a2d101',1,'flow::net_flow::Peer_socket_info::m_snd_drop_timeout()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a2d8aded3761028967fd3abb464e64936',1,'flow::net_flow::Peer_socket::m_snd_drop_timeout()']]], - ['m_5fsnd_5fdrop_5ftimer_307',['m_snd_drop_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a037459e6f1345cedf45e490d544c8567',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fest_5fbandwidth_5fmbit_5fper_5fsec_308',['m_snd_est_bandwidth_mbit_per_sec',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a788325f467420b83a92adce8302f2e18',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fflying_5fbytes_309',['m_snd_flying_bytes',['../classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fflying_5fpkts_5fby_5fsent_5fwhen_310',['m_snd_flying_pkts_by_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#a5ea56c54a98289211fef4a672432a2ad',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fflying_5fpkts_5fby_5fseq_5fnum_311',['m_snd_flying_pkts_by_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a2db7d11ece920d4adcacd00eaa2253fd',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5finit_5fseq_5fnum_312',['m_snd_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#aca66d1cb582ca027745d1ef847266cc4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5fdata_5fsent_5fwhen_313',['m_snd_last_data_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#af392484f79ffcead4f74ca351672d8d4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5floss_5fevent_5fwhen_314',['m_snd_last_loss_event_when',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9f77167af54cfe2921fab5fd143eff4',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5flast_5forder_5fnum_315',['m_snd_last_order_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1ec79951579d595bb790be87189d6e6c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fnext_5fseq_5fnum_316',['m_snd_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1f8bebf649551131e6ed6e75c6f98d54',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fpacing_5fbytes_5fallowed_5fthis_5fslice_317',['m_snd_pacing_bytes_allowed_this_slice',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3ac6229cdcd3e949523658b02fa7d0e0',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fdata_318',['m_snd_pacing_data',['../classflow_1_1net__flow_1_1Peer__socket.html#a55b44104a2c305b9679434ba623a7357',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fpacing_5fpacket_5fq_5fsize_319',['m_snd_pacing_packet_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#accd2ed68fd975dfa113f9f66c41d152a',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fslice_5fperiod_320',['m_snd_pacing_slice_period',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a36ab155050d2cc96c5dc7dc9a2d1e2b1',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpacing_5fslice_5fstart_321',['m_snd_pacing_slice_start',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6b03bba60c815cb17c40802eee400ae2',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fpending_5frcv_5fwnd_322',['m_snd_pending_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a07d885e5c8ec85e7ef8718dc0468ffe9',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frcv_5fwnd_323',['m_snd_rcv_wnd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#abb8b267eb5fa888e21e415f0e0d26a87',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fremote_5frcv_5fwnd_324',['m_snd_remote_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a12611e0ac9e8b86b8304b855050a8c8c',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frexmit_5fq_325',['m_snd_rexmit_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a845f21b754ef641b65b1fe44727fb429',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5frexmit_5fq_5fsize_326',['m_snd_rexmit_q_size',['../classflow_1_1net__flow_1_1Peer__socket.html#a9f5063c85a2070822cf69a530f0af1f5',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5fround_5ftrip_5ftime_5fvariance_327',['m_snd_round_trip_time_variance',['../structflow_1_1net__flow_1_1Peer__socket__info.html#aedadfb406ca6842ab1ecc0c4020e2a58',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsnd_5fsmoothed_5fround_5ftrip_5ftime_328',['m_snd_smoothed_round_trip_time',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a9fafa98dd848eb3944591472c6ce0548',1,'flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad08b53052e7eedfa7a925258f5ef1cba',1,'flow::net_flow::Peer_socket::m_snd_smoothed_round_trip_time()']]], - ['m_5fsnd_5fstats_329',['m_snd_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#ab4aff3e65ef9551b6c5ab890173b741e',1,'flow::net_flow::Peer_socket']]], - ['m_5fsnd_5ftemp_5fpkts_5fmarked_5fto_5fdrop_330',['m_snd_temp_pkts_marked_to_drop',['../classflow_1_1net__flow_1_1Peer__socket.html#aea98297d775f2085c21daf41c6582200',1,'flow::net_flow::Peer_socket']]], - ['m_5fsock_331',['m_sock',['../classflow_1_1net__flow_1_1Congestion__control__strategy.html#a1da6833e0c23d111432cbdd3f5451180',1,'flow::net_flow::Congestion_control_strategy::m_sock()'],['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#a380927913e47235684ce014b14371920',1,'flow::net_flow::Send_bandwidth_estimator::m_sock()'],['../classflow_1_1net__flow_1_1Drop__timer.html#a7ab957ddc07d6289d1b42d6686173533',1,'flow::net_flow::Drop_timer::m_sock()'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#ae8b85cd84e7e0496ad10814008fbd9fc',1,'flow::net_flow::Congestion_control_classic_data::m_sock()']]], - ['m_5fsock_5fdrop_5ftimeout_332',['m_sock_drop_timeout',['../classflow_1_1net__flow_1_1Drop__timer.html#ad9db83f50aec60604de55d01e15ea403',1,'flow::net_flow::Drop_timer']]], - ['m_5fsock_5fevents_333',['m_sock_events',['../classflow_1_1net__flow_1_1Node.html#ab0026feecdb74eda904d00d2c7016bab',1,'flow::net_flow::Node']]], - ['m_5fsock_5fopts_334',['m_sock_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a437ab79b98100ec9f8ee4f2195b24430',1,'flow::net_flow::Peer_socket_info']]], - ['m_5fsocks_335',['m_socks',['../classflow_1_1net__flow_1_1Node.html#a90244d69d550370158bbe843ab595a7a',1,'flow::net_flow::Node']]], - ['m_5fsocks_5fwith_5faccumulated_5facks_336',['m_socks_with_accumulated_acks',['../classflow_1_1net__flow_1_1Node.html#a7d9f418a3c99197e58f71ce2fff2997f',1,'flow::net_flow::Node']]], - ['m_5fsocks_5fwith_5faccumulated_5fpending_5facks_337',['m_socks_with_accumulated_pending_acks',['../classflow_1_1net__flow_1_1Node.html#a7bea132db0e45ea01b9a6bd22fd0fadb',1,'flow::net_flow::Node']]], - ['m_5fsrc_5fport_338',['m_src_port',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae5bd1ed0883b4827d8a81d70c10fd271',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fst_5fcapture_5finterrupt_5fsignals_5finternally_339',['m_st_capture_interrupt_signals_internally',['../structflow_1_1net__flow_1_1Node__options.html#aea7861f3c7739f8e588293d16a2de447',1,'flow::net_flow::Node_options']]], - ['m_5fst_5fcong_5fctl_5fclassic_5fwnd_5fdecay_5fpercent_340',['m_st_cong_ctl_classic_wnd_decay_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeccfe97128c9f5f62ff26d73047dec2e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fcong_5favoidance_5fincrement_5fblocks_341',['m_st_cong_ctl_cong_avoidance_increment_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a7ab1e27acd52d8fa3aadc9eb13d116',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fcong_5fwnd_5fon_5fdrop_5ftimeout_5fblocks_342',['m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2c8fcb08dfb0d1ebcc21e02940c149e8',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5finit_5fcong_5fwnd_5fblocks_343',['m_st_cong_ctl_init_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a637811d19d4a2b4d9b3ab79742aadff8',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fmax_5fcong_5fwnd_5fblocks_344',['m_st_cong_ctl_max_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a1bdc21e84373dd96494a76f11603335e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fcong_5fctl_5fstrategy_345',['m_st_cong_ctl_strategy',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aca69056d3029193823f0c0ae630f5759',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fconnect_5fretransmit_5fperiod_346',['m_st_connect_retransmit_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8f18c8222ade5f99b83a85e0203ff130',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fconnect_5fretransmit_5ftimeout_347',['m_st_connect_retransmit_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac75171c4f1086d0aa38248ae5ffba884',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdelayed_5fack_5ftimer_5fperiod_348',['m_st_delayed_ack_timer_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#add7ccb9e8cd0715ca78e0710d2a6db06',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdrop_5fall_5fon_5fdrop_5ftimeout_349',['m_st_drop_all_on_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac6f4da1892e2157e60772ed74298b2b2',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fdrop_5fpacket_5fexactly_5fafter_5fdrop_5ftimeout_350',['m_st_drop_packet_exactly_after_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a638ca4ecd9d8bfc8710bda71687c4ea3',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5finit_5fdrop_5ftimeout_351',['m_st_init_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a02afb5ed4201d83c87a3a30fcbdda489',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5flow_5flvl_5fmax_5fbuf_5fsize_352',['m_st_low_lvl_max_buf_size',['../structflow_1_1net__flow_1_1Node__options.html#a78baaf1a911c8d490a13278422307e8a',1,'flow::net_flow::Node_options']]], - ['m_5fst_5fmax_5fblock_5fsize_353',['m_st_max_block_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeaaf832a38a5e334789e81e214686ea7',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fmax_5ffull_5fblocks_5fbefore_5fack_5fsend_354',['m_st_max_full_blocks_before_ack_send',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7a76f7ae03e258b30b04c7350481de6',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fmax_5frexmissions_5fper_5fpacket_355',['m_st_max_rexmissions_per_packet',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a0b37da87848d01220c7e58f90e6764ba',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fout_5fof_5forder_5fack_5frestarts_5fdrop_5ftimer_356',['m_st_out_of_order_ack_restarts_drop_timer',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ae7d5eb1b4e37317478c3b25bc3c8c245',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_357',['m_st_rcv_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a171480324f26432928738532cb3c8556',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fslack_5fpercent_358',['m_st_rcv_buf_max_size_slack_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aa6d16c98186187fdffadcfb853d58410',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fto_5fadvertise_5fpercent_359',['m_st_rcv_buf_max_size_to_advertise_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af483d0292f363e7dbf14dc7a2dd49f3f',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fflow_5fcontrol_5fon_360',['m_st_rcv_flow_control_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad9a31f63eea6f89952a89ea0385d9a2e',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frcv_5fmax_5fpackets_5fafter_5funrecvd_5fpacket_5fratio_5fpercent_361',['m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af78ca6cf3c6da3bc24cea40d522f0bdb',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5frexmit_5fon_362',['m_st_rexmit_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a6c35e6014182ccfcbee6bed4571a8360',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fbandwidth_5fest_5fsample_5fperiod_5ffloor_363',['m_st_snd_bandwidth_est_sample_period_floor',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a3d420992e19e5addb7193d607e82e4',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fbuf_5fmax_5fsize_364',['m_st_snd_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8ca6086022691700f5e5d2dc87ca92fd',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5fsnd_5fpacing_5fenabled_365',['m_st_snd_pacing_enabled',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7cbcdd64a4366740ff9e55b39c977ba',1,'flow::net_flow::Peer_socket_options']]], - ['m_5fst_5ftimer_5fmin_5fperiod_366',['m_st_timer_min_period',['../structflow_1_1net__flow_1_1Node__options.html#abef8889be34024b07eff3211a3213d5f',1,'flow::net_flow::Node_options']]], - ['m_5fstart_367',['m_start',['../classflow_1_1util_1_1Basic__blob.html#aae53d36a27090ef5da931bc17d4f2bcd',1,'flow::util::Basic_blob']]], - ['m_5fstart_5fwhen_368',['m_start_when',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac16b16c3192e287ae3f08be786626f1a',1,'flow::perf::Checkpointing_timer']]], - ['m_5fstarted_5fthread_5fid_5for_5fnone_369',['m_started_thread_id_or_none',['../classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05',1,'flow::async::Single_thread_task_loop']]], - ['m_5fstate_370',['m_state',['../classflow_1_1net__flow_1_1Server__socket.html#a783f81f10b50f62a638aa26b72d49e36',1,'flow::net_flow::Server_socket::m_state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a05a765055fd54412c63e57e43697f1bc',1,'flow::net_flow::Peer_socket::m_state()'],['../classflow_1_1net__flow_1_1Event__set.html#a56925e15b38d285f387e10bfb18f93c9',1,'flow::net_flow::Event_set::m_state()']]], - ['m_5ftarget_371',['m_target',['../classflow_1_1util_1_1String__ostream.html#afa87f2303455e62c0be244deb37cb65e',1,'flow::util::String_ostream']]], - ['m_5ftarget_5fappender_5fostream_372',['m_target_appender_ostream',['../classflow_1_1util_1_1String__ostream.html#abaf52be7b420f87d9a75edec7be2fc6b',1,'flow::util::String_ostream::m_target_appender_ostream()'],['../classflow_1_1log_1_1Thread__local__string__appender.html#a7bb2cd7d173ddc0ca3075d0475015f96',1,'flow::log::Thread_local_string_appender::m_target_appender_ostream()']]], - ['m_5ftarget_5fappender_5fostream_5fprev_5fos_5fstate_373',['m_target_appender_ostream_prev_os_state',['../classflow_1_1log_1_1Thread__local__string__appender.html#aebc7ceab35e8201f0c60b59a0cc93ca3',1,'flow::log::Thread_local_string_appender']]], - ['m_5ftarget_5finserter_374',['m_target_inserter',['../classflow_1_1util_1_1String__ostream.html#ab8866da6531e449b80b1b7bb18a3b7b9',1,'flow::util::String_ostream']]], - ['m_5ftarget_5fopts_375',['m_target_opts',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a94df262d2c85c677916cb5f57f9c1559',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5ftarget_5for_5fnull_376',['m_target_or_null',['../classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c',1,'flow::util::Scoped_setter']]], - ['m_5ftarget_5ftask_5fengine_377',['m_target_task_engine',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a5b688a4071b8ad58a776de8d3816b757',1,'flow::net_flow::asio::Node::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a714f570918cfa8d225d75c787e7ac573',1,'flow::net_flow::asio::Peer_socket::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#ae236d96a176b209b217f04bb94119efe',1,'flow::net_flow::asio::Server_socket::m_target_task_engine()']]], - ['m_5ftask_5fengine_378',['m_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a1f4a96efdc1820ddbb4a4bf49c0d38e6',1,'flow::async::Task_qing_thread::m_task_engine()'],['../classflow_1_1net__flow_1_1Node.html#af5597a417d03e2bed87cd772ef5cef29',1,'flow::net_flow::Node::m_task_engine()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#af3eb85a490f1386423fe4a6a32979a93',1,'flow::util::Scheduled_task_handle_state::m_task_engine()']]], - ['m_5ftask_5fengines_379',['m_task_engines',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#ad09c2d973e3794f36bf06bd001ca860e',1,'flow::async::Segregated_thread_task_loop']]], - ['m_5fthis_5fsample_5fstart_5ftime_380',['m_this_sample_start_time',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac627f8c9ae6c51c2ea14dd46af4f4150',1,'flow::net_flow::Send_bandwidth_estimator']]], - ['m_5fthrottling_5factive_381',['m_throttling_active',['../classflow_1_1log_1_1Async__file__logger.html#a5bbad8cea27134844e73daff014cc82a',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fbegins_382',['m_throttling_begins',['../structflow_1_1log_1_1Async__file__logger_1_1Log__request.html#aee7f652b0e17e39d0afdb721bc956cf7',1,'flow::log::Async_file_logger::Log_request']]], - ['m_5fthrottling_5fcfg_383',['m_throttling_cfg',['../classflow_1_1log_1_1Async__file__logger.html#aa3d544ab96299a8c2b53b7be485d1a6e',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fmutex_384',['m_throttling_mutex',['../classflow_1_1log_1_1Async__file__logger.html#a99cd4faff109ef35720fbed9837973dc',1,'flow::log::Async_file_logger']]], - ['m_5fthrottling_5fnow_385',['m_throttling_now',['../classflow_1_1log_1_1Async__file__logger.html#aa13ef30bc2d66758c29c31dc76a130aa',1,'flow::log::Async_file_logger']]], - ['m_5ftime_5faccumulator_386',['m_time_accumulator',['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a55aa9c680221d64b44715256713a5bee',1,'flow::async::Timed_concurrent_task_loop_impl']]], - ['m_5ftimed_5floop_387',['m_timed_loop',['../classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9',1,'flow::async::Timed_single_thread_task_loop']]], - ['m_5ftimer_388',['m_timer',['../classflow_1_1net__flow_1_1Drop__timer.html#ad5dfc3cd2f8e5e4d28c49e28ee5c221f',1,'flow::net_flow::Drop_timer::m_timer()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a5934d785b54bb71e739c262b6db8dda9',1,'flow::util::Scheduled_task_handle_state::m_timer()']]], - ['m_5ftimer_5ffailure_389',['m_timer_failure',['../classflow_1_1net__flow_1_1Drop__timer.html#a21e78b9da6196043e1c05589c46911fa',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimer_5ffired_390',['m_timer_fired',['../classflow_1_1net__flow_1_1Drop__timer.html#a862595a7ec5d4bea05ad0e85c52e88ac',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimer_5frunning_391',['m_timer_running',['../classflow_1_1net__flow_1_1Drop__timer.html#a9528326a35b021bb859bed948ae3d7a4',1,'flow::net_flow::Drop_timer']]], - ['m_5ftimers_392',['m_timers',['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#af1c4f46ce680b979e98a3e255c88d063',1,'flow::perf::Checkpointing_timer::Aggregator']]], - ['m_5ftotal_5fdata_5fcount_393',['m_total_data_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a893ca5129ab56fd57de0cdee92e59bd7',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fdata_5fsize_394',['m_total_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a132cb2a966ede1bf5fe363e5885a0f64',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fto_5fsend_5facks_5fcount_395',['m_total_to_send_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a66c7d92f84d1a1f7b1039a926b1a8f00',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftotal_5fto_5fsend_5facks_5fdata_5fsize_396',['m_total_to_send_acks_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a6946add6977b28e244c69606fd14db03',1,'flow::net_flow::Peer_socket_receive_stats']]], - ['m_5ftype_5fid_5fstr_397',['m_type_id_str',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a8dc054626823cb59a1570214349b8450',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], - ['m_5ftype_5fostream_5fmanip_398',['m_type_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a7f4fd9ce69e293477e96fbad0a2298ed',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fudp_5fendpoint_399',['m_udp_endpoint',['../structflow_1_1net__flow_1_1Remote__endpoint.html#a582f3a55d828cd4e36369682315c7629',1,'flow::net_flow::Remote_endpoint']]], - ['m_5funaccepted_5fsocks_400',['m_unaccepted_socks',['../classflow_1_1net__flow_1_1Server__socket.html#a7ba32040008ffe0637d3a1847deb76c5',1,'flow::net_flow::Server_socket']]], - ['m_5funderlying_5floop_401',['m_underlying_loop',['../classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4',1,'flow::async::Single_thread_task_loop']]], - ['m_5fuse_5fhuman_5ffriendly_5ftime_5fstamps_402',['m_use_human_friendly_time_stamps',['../classflow_1_1log_1_1Config.html#a1b16be31f5dcfba9536a377c9d29abb6',1,'flow::log::Config']]], - ['m_5fvalidate_5fstored_5fvals_5fargs_403',['m_validate_stored_vals_args',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#ae780a398078db2299e8a5c3714bcb987',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalue_5flist_404',['m_value_list',['../classflow_1_1util_1_1Linked__hash__map.html#a3c2ebf269951f5fe2412b6a77303b5ba',1,'flow::util::Linked_hash_map::m_value_list()'],['../classflow_1_1util_1_1Linked__hash__set.html#a4bae43bd9a1b68903af4b6f9452ccf9e',1,'flow::util::Linked_hash_set::m_value_list()']]], - ['m_5fvalues_405',['m_values',['../classflow_1_1cfg_1_1Option__set.html#a7bda9a32640f89d1c8a2306b8b368a13',1,'flow::cfg::Option_set::m_values()'],['../structflow_1_1perf_1_1Duration__set.html#ae7d89b9e16f45dc59b27092e0496ce4f',1,'flow::perf::Duration_set::m_values()'],['../structflow_1_1perf_1_1Time__pt__set.html#a9867f05832f22c6aceb340c0ba697dbc',1,'flow::perf::Time_pt_set::m_values()']]], - ['m_5fvalues_5fcandidate_406',['m_values_candidate',['../classflow_1_1cfg_1_1Option__set.html#adfd72b4b73913193252a02d35acdff09',1,'flow::cfg::Option_set::m_values_candidate()'],['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#acbaeb3dd021040e15bff6e85b8da5253',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_candidate()']]], - ['m_5fvalues_5fcurrent_407',['m_values_current',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a19683d3ea7c64e3abf96f85b60e9e610',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fdefault_408',['m_values_default',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a7c91f3db7161cf30816e0fe1fccc39c0',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_default()'],['../classflow_1_1cfg_1_1Option__set.html#aea72e19fce43c10c84f6445f1892de41',1,'flow::cfg::Option_set::m_values_default()']]], - ['m_5fvalues_5fdefault_5fno_5facc_409',['m_values_default_no_acc',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#adc8e05f6d6528755712280a812a6ad4d',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fto_5fload_410',['m_values_to_load',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a838e0b0c1f25e167a102e11de272de4e',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fvalues_5fto_5fvalidate_411',['m_values_to_validate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a75ab66920b874488bed052a90bc716d5',1,'flow::cfg::Option_set::Declare_options_func_args']]], - ['m_5fverbose_5fostream_5fmanip_412',['m_verbose_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae3e64b049838a690384a899209ffca7b',1,'flow::net_flow::Low_lvl_packet']]], - ['m_5fverbosities_5fby_5fcomponent_413',['m_verbosities_by_component',['../classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f',1,'flow::log::Config']]], - ['m_5fverbosity_5fdefault_414',['m_verbosity_default',['../classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c',1,'flow::log::Config']]], - ['m_5fwant_415',['m_want',['../classflow_1_1net__flow_1_1Event__set.html#af4fa5dbda4ffd95b35dee57fc01b90ce',1,'flow::net_flow::Event_set']]], - ['m_5fwhich_5fclocks_416',['m_which_clocks',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac5518c3fdc58f8867ca114186562575b',1,'flow::perf::Checkpointing_timer']]], - ['m_5fworker_417',['m_worker',['../classflow_1_1net__flow_1_1Node.html#a84b7e03ae7b13dae0f59db1475e46fd3',1,'flow::net_flow::Node']]], - ['m_5fworker_5fthread_418',['m_worker_thread',['../classflow_1_1async_1_1Task__qing__thread.html#a75b218e1b5f137ead984588107ef02b0',1,'flow::async::Task_qing_thread']]], - ['m_5fzero_5fpoint_5fnum_419',['m_zero_point_num',['../classflow_1_1net__flow_1_1Sequence__number.html#adcd83d66fac1a77d9e94f13d1c4671b0',1,'flow::net_flow::Sequence_number']]] + ['m_5fnc_168',['m_nc',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a589654d5b07e021e82fa80455863f548',1,'flow::net_flow::Ack_packet::Individual_ack::m_nc()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#af6ffacd3b12b70bf06b70bc8645315c5',1,'flow::net_flow::Peer_socket::Individual_ack::m_nc()']]], + ['m_5fnet_5fenv_5fsim_169',['m_net_env_sim',['../classflow_1_1net__flow_1_1Node.html#a43472c3277cdf5e3f28d4f4f51e3bcc0',1,'flow::net_flow::Node']]], + ['m_5fnickname_170',['m_nickname',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a02a10c00df613d1da478e97163dec523',1,'flow::async::Segregated_thread_task_loop::m_nickname()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a91d90d8816538bbb529e9f6da7209103',1,'flow::async::Cross_thread_task_loop::m_nickname()'],['../classflow_1_1cfg_1_1Config__manager.html#a68da387dad566805b969aded698661cb',1,'flow::cfg::Config_manager::m_nickname()'],['../classflow_1_1cfg_1_1Option__set.html#a5e5cf9a5efd81ba6d851171a109005f6',1,'flow::cfg::Option_set::m_nickname()']]], + ['m_5fno_5facks_5fyet_171',['m_no_acks_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#adc8e7ca2c14f74a85beb863c145b97ba',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fno_5fsamples_5fyet_172',['m_no_samples_yet',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac89711897d0c265eb3b18a748c03d3aa',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fnode_173',['m_node',['../classflow_1_1net__flow_1_1Event__set.html#af635301685a4a331142e1ac8a791a65d',1,'flow::net_flow::Event_set::m_node()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8e8e3363803b2fe2c862b9fac1dfbb77',1,'flow::net_flow::Server_socket::m_node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a36ab27af6886c7699f9965a5eb296cd6',1,'flow::net_flow::Peer_socket::m_node()']]], + ['m_5fnode_5fopts_174',['m_node_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a05abba2bde50995af42cd6cf02d0b167',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fnode_5ftask_5fengine_175',['m_node_task_engine',['../classflow_1_1net__flow_1_1Drop__timer.html#ac3cfab1594111b3c3254eebc84591908',1,'flow::net_flow::Drop_timer']]], + ['m_5fnull_176',['m_null',['../classflow_1_1cfg_1_1Option__set.html#a18227d957ee16e50977dd4bb34d489ab',1,'flow::cfg::Option_set']]], + ['m_5fnum_177',['m_num',['../classflow_1_1net__flow_1_1Sequence__number.html#ac6e88639a0c1b5a1da2bf5b7f203b38c',1,'flow::net_flow::Sequence_number']]], + ['m_5fnum_5fline_5fid_178',['m_num_line_id',['../classflow_1_1net__flow_1_1Sequence__number.html#ae457e665c370f16e9196b1a88010dcbb',1,'flow::net_flow::Sequence_number']]], + ['m_5fofs_179',['m_ofs',['../classflow_1_1log_1_1Serial__file__logger.html#ac42c4ddfd3b664363edf6c38ce942fde',1,'flow::log::Serial_file_logger']]], + ['m_5fofs_5fwriter_180',['m_ofs_writer',['../classflow_1_1log_1_1Serial__file__logger.html#a92ed6ae3183bbd1f4905245f485cb531',1,'flow::log::Serial_file_logger']]], + ['m_5fon_5fdynamic_5fchange_5ffuncs_181',['m_on_dynamic_change_funcs',['../classflow_1_1cfg_1_1Config__manager.html#a08ba012812d46fcc6588d4bb8c4d04c9',1,'flow::cfg::Config_manager']]], + ['m_5fon_5fevent_182',['m_on_event',['../classflow_1_1net__flow_1_1Event__set.html#a59f6ddb0d0258cc029c435a8ed0f89f7',1,'flow::net_flow::Event_set']]], + ['m_5fopen_5fsub_5fstate_183',['m_open_sub_state',['../classflow_1_1net__flow_1_1Peer__socket.html#ae5d47460784cc20c9e44237edffaac95',1,'flow::net_flow::Peer_socket']]], + ['m_5fops_184',['m_ops',['../classflow_1_1async_1_1Op__list.html#abbbe77231b22d8db7bfaf9181e6028fe',1,'flow::async::Op_list']]], + ['m_5fopt_5fnames_185',['m_opt_names',['../classflow_1_1cfg_1_1Option__set.html#a650edbbffb9f75ed102f2bab5e355feb',1,'flow::cfg::Option_set']]], + ['m_5fopt_5frexmit_5fon_186',['m_opt_rexmit_on',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#acc2a10d19e8e54c88518ad2e02a08b68',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fopt_5frexmit_5fon_5fraw_187',['m_opt_rexmit_on_raw',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a22799fa7c7948cc2f35a411523c12479',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], + ['m_5foption_5fset_188',['m_option_set',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a0ed8c54022a5d7c61abc03efaae17f88',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fopts_189',['m_opts',['../classflow_1_1net__flow_1_1Node.html#ade08f0457943f803c23b55649139c0d3',1,'flow::net_flow::Node::m_opts()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad59c09f34003873a3c207cc590236773',1,'flow::net_flow::Peer_socket::m_opts()']]], + ['m_5fopts_5ffor_5fhelp_190',['m_opts_for_help',['../classflow_1_1cfg_1_1Option__set.html#aaeb9b41e8ac4c9f5a2437cedb0f3472a',1,'flow::cfg::Option_set']]], + ['m_5fopts_5ffor_5fparsing_191',['m_opts_for_parsing',['../classflow_1_1cfg_1_1Option__set.html#a381ff2ba7989b90cec0040e3b833d238',1,'flow::cfg::Option_set']]], + ['m_5fopts_5fmutex_192',['m_opts_mutex',['../classflow_1_1net__flow_1_1Node.html#a449ef757abee4c5d12f8fc62a5ca66b4',1,'flow::net_flow::Node::m_opts_mutex()'],['../classflow_1_1net__flow_1_1Peer__socket.html#addfbe1487c621d4a9c464aec61bc108a',1,'flow::net_flow::Peer_socket::m_opts_mutex()']]], + ['m_5forder_5fnum_193',['m_order_num',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#a5265c3824ad25d1de4f888fa811dd4e6',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5foriginating_5fserv_194',['m_originating_serv',['../classflow_1_1net__flow_1_1Peer__socket.html#a5629d810d2c7252eaa2243e076dde83f',1,'flow::net_flow::Peer_socket']]], + ['m_5fos_195',['m_os',['../classflow_1_1log_1_1Buffer__logger.html#a143ed6107ce07817f0c7b59354387db3',1,'flow::log::Buffer_logger::m_os()'],['../classflow_1_1log_1_1Ostream__log__msg__writer.html#ac37b6d6bbfb5c9feefd35fd78cc66dad',1,'flow::log::Ostream_log_msg_writer::m_os()']]], + ['m_5fos_5fwriter_196',['m_os_writer',['../classflow_1_1log_1_1Buffer__logger.html#a5f61d68308b597e131094e4bbcf08b21',1,'flow::log::Buffer_logger']]], + ['m_5fos_5fwriters_197',['m_os_writers',['../classflow_1_1log_1_1Simple__ostream__logger.html#a1ef85d2192fb0cd3977944a20bfa61f9',1,'flow::log::Simple_ostream_logger']]], + ['m_5fown_5ftarget_5fstr_198',['m_own_target_str',['../classflow_1_1util_1_1String__ostream.html#a0ac450344a0464a634f78288f6c357c8',1,'flow::util::String_ostream']]], + ['m_5fown_5ftask_5fengine_199',['m_own_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a0a80c87ce824a15fb84a73d99f5d61ac',1,'flow::async::Task_qing_thread']]], + ['m_5fpacked_200',['m_packed',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a3e7152648c0098491512da590b47b464',1,'flow::net_flow::Low_lvl_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__packet.html#aaf2fa9221da49c413441aa8fec93ce91',1,'flow::net_flow::Syn_ack_packet::m_packed()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a1a0bad5bc4e9c966709f7bc8a2469bf6',1,'flow::net_flow::Syn_ack_ack_packet::m_packed()']]], + ['m_5fpacket_201',['m_packet',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a704afa0007b8354ad78acad64d029ecf',1,'flow::net_flow::Peer_socket::Sent_packet']]], + ['m_5fpacket_5fdata_202',['m_packet_data',['../classflow_1_1net__flow_1_1Node.html#acea4db94c4fb86ddaa2502c2d7e128ea',1,'flow::net_flow::Node']]], + ['m_5fpacket_5fq_203',['m_packet_q',['../structflow_1_1net__flow_1_1Send__pacing__data.html#aed68c9912e8c2ada5a9fcef0f9df2331',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fparsing_204',['m_parsing',['../classflow_1_1cfg_1_1Option__set.html#ac3f6c86292b4f6040c655f6bdcb05a3e',1,'flow::cfg::Option_set']]], + ['m_5fpayload_5fenum_5fraw_5fvalue_205',['m_payload_enum_raw_value',['../classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6',1,'flow::log::Component']]], + ['m_5fpayload_5ftype_5for_5fnull_206',['m_payload_type_or_null',['../classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac',1,'flow::log::Component']]], + ['m_5fpending_5flogs_5fsz_207',['m_pending_logs_sz',['../classflow_1_1log_1_1Async__file__logger.html#a7cce9184c2137aa4c2d09894e1aaa7c9',1,'flow::log::Async_file_logger']]], + ['m_5fper_5fthread_5fops_208',['m_per_thread_ops',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a3e643b2f348746d57b1e2ddb81a1150a',1,'flow::async::Segregated_thread_task_loop']]], + ['m_5fper_5fthread_5fstrands_209',['m_per_thread_strands',['../classflow_1_1async_1_1Cross__thread__task__loop.html#addbcc2e22d4a57b89b82130bb0f3e482',1,'flow::async::Cross_thread_task_loop']]], + ['m_5fports_210',['m_ports',['../classflow_1_1net__flow_1_1Node.html#afd6388a362531ada956a864fefff6011',1,'flow::net_flow::Node']]], + ['m_5fpos_211',['m_pos',['../structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html#a6d4eafd7d31261d7bdc8eb88a558fb2f',1,'flow::cfg::Config_manager::On_dynamic_change_func_handle']]], + ['m_5fpresumed_5fdropped_5fdata_5fsize_212',['m_presumed_dropped_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ab1b46c0670b98a87e106a91758a02f35',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fq_213',['m_q',['../classflow_1_1net__flow_1_1Socket__buffer.html#ab9d0faeeb2a8d1058b24319e8a14e52a',1,'flow::net_flow::Socket_buffer']]], + ['m_5fqing_5fthreads_214',['m_qing_threads',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a15c616fe03a6deb80e4c1f556b023bba',1,'flow::async::Segregated_thread_task_loop::m_qing_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a2e93cd0649bf68bdeda1cb844f53c5a8',1,'flow::async::Cross_thread_task_loop::m_qing_threads()']]], + ['m_5fraw_5ftype_5fid_215',['m_raw_type_id',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a167901d7c0f96f240dd789027ad99dc5',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], + ['m_5frcv_216',['m_rcv',['../structflow_1_1net__flow_1_1Peer__socket__info.html#af8234f1645d63b9eee57f6937dc222de',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5facked_5fpackets_217',['m_rcv_acked_packets',['../structflow_1_1net__flow_1_1Ack__packet.html#a232e22e04614ead19fa4531a89838015',1,'flow::net_flow::Ack_packet::m_rcv_acked_packets()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8229396adfd306d15e8a05dac3fe8c29',1,'flow::net_flow::Peer_socket::m_rcv_acked_packets()']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5foff_5fout_218',['m_rcv_acked_packets_rexmit_off_out',['../structflow_1_1net__flow_1_1Ack__packet.html#aebad844e9061da02db8f168374869f9e',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5fon_5fout_219',['m_rcv_acked_packets_rexmit_on_out',['../structflow_1_1net__flow_1_1Ack__packet.html#abfcb97c4f3f8552c619b6aba07674063',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5facked_5fpackets_5frexmit_5fout_5fsize_220',['m_rcv_acked_packets_rexmit_out_size',['../structflow_1_1net__flow_1_1Ack__packet.html#aae3806ebf76e628494fd6f7681c01409',1,'flow::net_flow::Ack_packet']]], + ['m_5frcv_5fbuf_221',['m_rcv_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#aae9cb8f2dbd50ddaa0265d940b149ef3',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fbuf_5fsize_222',['m_rcv_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a127a03a0b0e2f73d1059b7b42f251fa2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fdelayed_5fack_5ftimer_223',['m_rcv_delayed_ack_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a88f967e74f8618c94088113e918ab52f',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fin_5frcv_5fwnd_5frecovery_224',['m_rcv_in_rcv_wnd_recovery',['../classflow_1_1net__flow_1_1Peer__socket.html#ad7414dfca4b869dd3a4e0de39195c69e',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5finit_5fseq_5fnum_225',['m_rcv_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a5dc05d1f5deb71e1259c5d5aad1fcf84',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5flast_5fsent_5frcv_5fwnd_226',['m_rcv_last_sent_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a7fa76b609ef0aa5962d8de77338cf9ee',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fnext_5fseq_5fnum_227',['m_rcv_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a13c640ebd14a75df3894e7d885d16f5f',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fpackets_5fwith_5fgaps_228',['m_rcv_packets_with_gaps',['../classflow_1_1net__flow_1_1Peer__socket.html#ae82958ed6d71be46b96eceaca6214143',1,'flow::net_flow::Peer_socket::m_rcv_packets_with_gaps()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a8c3326fea94763621c47c8b0e4d31eb2',1,'flow::net_flow::Peer_socket_info::m_rcv_packets_with_gaps()']]], + ['m_5frcv_5fpending_5facks_229',['m_rcv_pending_acks',['../classflow_1_1net__flow_1_1Peer__socket.html#ad46ed439a3d118eb2b540e9f99a7b0ca',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fpending_5facks_5fsize_5fat_5frecv_5fhandler_5fstart_230',['m_rcv_pending_acks_size_at_recv_handler_start',['../classflow_1_1net__flow_1_1Peer__socket.html#a780f86759f861a3a84de8c5c768736b7',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5freassembly_5fq_5fdata_5fsize_231',['m_rcv_reassembly_q_data_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3a38b2a47235621222eb58e6212a4f05',1,'flow::net_flow::Peer_socket_info::m_rcv_reassembly_q_data_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa7398394052c8e634365fb979c294644',1,'flow::net_flow::Peer_socket::m_rcv_reassembly_q_data_size()']]], + ['m_5frcv_5fstats_232',['m_rcv_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#a7d1f1d381749473f7a2471b8be20d6a8',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fcumulative_5fsize_233',['m_rcv_syn_rcvd_data_cumulative_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a4f97c94357653fe6df91677ef070d3e8',1,'flow::net_flow::Peer_socket_info::m_rcv_syn_rcvd_data_cumulative_size()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a1553bbefc3407cf84eaa8e256c6cffff',1,'flow::net_flow::Peer_socket::m_rcv_syn_rcvd_data_cumulative_size()']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_234',['m_rcv_syn_rcvd_data_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a48320d96118a37626f1852626965e6ed',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fsyn_5frcvd_5fdata_5fq_5fsize_235',['m_rcv_syn_rcvd_data_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6210e5a1ecd85ed1cb46be696f5faec4',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fwnd_236',['m_rcv_wnd',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a1ed3bdee2d19c2adaaf00fda9b5a7ca8',1,'flow::net_flow::Syn_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#a3a3a3d676ec71eee0d2daa56a3b73403',1,'flow::net_flow::Syn_ack_ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Ack__packet.html#a56b2560b87540a3cf5c7bba9e9666641',1,'flow::net_flow::Ack_packet::m_rcv_wnd()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a84ae8091d89ae59304fd5ebd18539d8b',1,'flow::net_flow::Peer_socket_info::m_rcv_wnd()']]], + ['m_5frcv_5fwnd_5fexhausted_237',['m_rcv_wnd_exhausted',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a7c23d15ff0f3350cca96e38322f3cbf0',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5frcv_5fwnd_5flast_5fadvertised_238',['m_rcv_wnd_last_advertised',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a2562eebd9be1837147fef6fa616cb920',1,'flow::net_flow::Peer_socket_info']]], + ['m_5frcv_5fwnd_5frecovery_5fcount_239',['m_rcv_wnd_recovery_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#ae2d0497f399e890eb6cec9bc85427d63',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5frcv_5fwnd_5frecovery_5fscheduled_5ftask_240',['m_rcv_wnd_recovery_scheduled_task',['../classflow_1_1net__flow_1_1Peer__socket.html#afd590cc70d06b8e903027e4924fd095a',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fwnd_5frecovery_5fstart_5ftime_241',['m_rcv_wnd_recovery_start_time',['../classflow_1_1net__flow_1_1Peer__socket.html#a5476d9206f997fc9119b2a80b078ee87',1,'flow::net_flow::Peer_socket']]], + ['m_5frcv_5fwnd_5frecovery_5fsuccess_5fcount_242',['m_rcv_wnd_recovery_success_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a11b5b29017bd45bdf822282d75c61bfc',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5frcv_5fwnd_5frecovery_5ftimeout_5fcount_243',['m_rcv_wnd_recovery_timeout_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a49f930549d48f8dd8239080707a236c2',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5freceived_5fack_5fcount_244',['m_received_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a49fd72447e2eda5168855963f6f55fdf',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5flow_5flvl_5fack_5fcount_245',['m_received_low_lvl_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#acca7ee65f331c8d6b1ed9c1c64f941c6',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5flow_5flvl_5frcv_5fwnd_5fonly_5fack_5fcount_246',['m_received_low_lvl_rcv_wnd_only_ack_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#ab16d86a43937ff1a082c8eb9710ae24b',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freceived_5fwhen_247',['m_received_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#ad6e1407a2a3fc95e568b00f31e423b25',1,'flow::net_flow::Peer_socket::Individual_ack']]], + ['m_5frecent_5fephemeral_5fports_248',['m_recent_ephemeral_ports',['../classflow_1_1net__flow_1_1Port__space.html#ae401e02d49ce557bbc5474e049eb5455',1,'flow::net_flow::Port_space']]], + ['m_5frecv_5flatency_5fdistribution_5fmsec_249',['m_recv_latency_distribution_msec',['../classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5flatency_5fseq_250',['m_recv_latency_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5fdup_5fdistribution_251',['m_recv_packet_dup_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5fdup_5fseq_252',['m_recv_packet_dup_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5floss_5fdistribution_253',['m_recv_packet_loss_distribution',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac',1,'flow::net_flow::Net_env_simulator']]], + ['m_5frecv_5fpacket_5floss_5fseq_254',['m_recv_packet_loss_seq',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138',1,'flow::net_flow::Net_env_simulator']]], + ['m_5fremote_5fendpoint_255',['m_remote_endpoint',['../structflow_1_1net__flow_1_1Node_1_1Socket__id.html#a23527fa6deadda111d7c4c194a0ce177',1,'flow::net_flow::Node::Socket_id::m_remote_endpoint()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a218ec098984b754b43940001f59ab787',1,'flow::net_flow::Peer_socket::m_remote_endpoint()']]], + ['m_5fremote_5frcv_5fwnd_5fexhaustion_5fevents_256',['m_remote_rcv_wnd_exhaustion_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#af3976b80514468082ca36eb00857a5bb',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fremote_5frcv_5fwnd_5frecovery_5fevents_257',['m_remote_rcv_wnd_recovery_events',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a146759e1b8603f000b85e90ce02f7327',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5freopening_258',['m_reopening',['../classflow_1_1log_1_1Serial__file__logger.html#a1e8b20725c1ce10cd996da75fc098a87',1,'flow::log::Serial_file_logger']]], + ['m_5freserved2_259',['m_reserved2',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html#a244e09a3f5318c25a120e3d29379adc8',1,'flow::net_flow::Low_lvl_packet::Aux_raw_data']]], + ['m_5freset_5frtt_5fmin_260',['m_reset_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#a5b3a333ae29bd009cd22919c1e01c19f',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], + ['m_5frexmit_5fid_261',['m_rexmit_id',['../structflow_1_1net__flow_1_1Data__packet.html#ac149f87b8915213857c707b0f3562ef0',1,'flow::net_flow::Data_packet::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#ae17b658ee88e60bdb6606af607b00de2',1,'flow::net_flow::Ack_packet::Individual_ack::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html#a0324b8de1d20023e10507d527ee93cfe',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_on::m_rexmit_id()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a29080d01ac5bc0d51ad407587c6721ab',1,'flow::net_flow::Peer_socket::Individual_ack::m_rexmit_id()']]], + ['m_5frnd_5fgenerator_262',['m_rnd_generator',['../classflow_1_1net__flow_1_1Port__space.html#ae4714945b23e588b1554240fa590560a',1,'flow::net_flow::Port_space::m_rnd_generator()'],['../classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43',1,'flow::net_flow::Net_env_simulator::m_rnd_generator()']]], + ['m_5frnd_5fop_5fidx_263',['m_rnd_op_idx',['../classflow_1_1async_1_1Op__list.html#a55134b36cc93325a85131a8efc0843c2',1,'flow::async::Op_list']]], + ['m_5frnd_5fsecurity_5ftokens_264',['m_rnd_security_tokens',['../classflow_1_1net__flow_1_1Node.html#ae536f016607677a945ad42034a21e82a',1,'flow::net_flow::Node']]], + ['m_5froot_5fto_5ftarget_5ffunc_265',['m_root_to_target_func',['../classflow_1_1cfg_1_1Dynamic__cfg__context.html#a33801a2e601913865719ecb5767dd0c8',1,'flow::cfg::Dynamic_cfg_context']]], + ['m_5fround_5ftrip_5ftime_5fvariance_266',['m_round_trip_time_variance',['../classflow_1_1net__flow_1_1Peer__socket.html#a27ce5b19ab4abcf61aa07153c46b2be3',1,'flow::net_flow::Peer_socket']]], + ['m_5frtt_5fmin_267',['m_rtt_min',['../classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html#aac8260cf710dc42843a478873ed8b649',1,'flow::net_flow::Congestion_control_classic_with_bandwidth_est']]], + ['m_5fs_5fd_5fopt_5fsets_268',['m_s_d_opt_sets',['../classflow_1_1cfg_1_1Config__manager.html#a4e724d9d455ea31439c6832d0bc645bd',1,'flow::cfg::Config_manager']]], + ['m_5fsaved_5fvalue_269',['m_saved_value',['../classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202',1,'flow::util::Scoped_setter']]], + ['m_5fsecurity_5ftoken_270',['m_security_token',['../structflow_1_1net__flow_1_1Syn__ack__packet.html#a46bb776a13c77d7109469c0c29565a30',1,'flow::net_flow::Syn_ack_packet::m_security_token()'],['../structflow_1_1net__flow_1_1Syn__ack__ack__packet.html#ab2537625fa282f302e586dee1c24cd19',1,'flow::net_flow::Syn_ack_ack_packet::m_security_token()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a33a90b123612cc2e6a119cfa95ba4f6d',1,'flow::net_flow::Peer_socket::m_security_token()']]], + ['m_5fseed_271',['m_seed',['../classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2',1,'flow::net_flow::Net_env_simulator']]], + ['m_5fsent_5fcwnd_5fbytes_272',['m_sent_cwnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#abc5bf2e627dad5d2dcfb0324853b37f7',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5fsent_5fdata_5fcount_273',['m_sent_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a72a061170ab84cd19aabb1c40238d65f',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5fdata_5fsize_274',['m_sent_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a702a7e3fa092414f80190a783f478aeb',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5findividual_5facks_5fcount_275',['m_sent_individual_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a77855f9a844be7513158191875d1c4f2',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5flow_5flvl_5facks_5fcount_276',['m_sent_low_lvl_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a7de6b1c501fee009e63639a177589a0c',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5flow_5flvl_5frcv_5fwnd_5fonly_5facks_5fcount_277',['m_sent_low_lvl_rcv_wnd_only_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a95629aa4094c8e9496081df11ca43787',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5fsent_5frexmitted_5fdata_5fcount_278',['m_sent_rexmitted_data_count',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a0bde533fd087669e6dc356e45be975b4',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5frexmitted_5fdata_5fsize_279',['m_sent_rexmitted_data_size',['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a3e00dce3ed58630d79a8cdaa7b76c8ee',1,'flow::net_flow::Peer_socket_send_stats']]], + ['m_5fsent_5ftime_280',['m_sent_time',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html#ad513e58f4eb611c3a91d96df26f53f2c',1,'flow::net_flow::Peer_socket::Sent_packet::Sent_when']]], + ['m_5fsent_5fwhen_281',['m_sent_when',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a3acccd2fcd0f4a0c5f7f0c2d6ad31c2e',1,'flow::net_flow::Peer_socket::Sent_packet']]], + ['m_5fseq_282',['m_seq',['../classflow_1_1util_1_1Rnd__gen__uniform__range.html#ac216ad57ff7d9a116bc13b71510231bf',1,'flow::util::Rnd_gen_uniform_range']]], + ['m_5fseq_5fnum_283',['m_seq_num',['../structflow_1_1net__flow_1_1Data__packet.html#a94d817529e94ac88ee2cea6f3dd1badb',1,'flow::net_flow::Data_packet::m_seq_num()'],['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html#a1d027f817b86cc377d76bc38434229a4',1,'flow::net_flow::Ack_packet::Individual_ack::m_seq_num()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html#a8a237605b83d8a0d1b175395a83ad768',1,'flow::net_flow::Peer_socket::Individual_ack::m_seq_num()']]], + ['m_5fseq_5fnum_5fgenerator_284',['m_seq_num_generator',['../classflow_1_1net__flow_1_1Node.html#a8938c4a091edf1c1c77e2cc8f505f0ff',1,'flow::net_flow::Node']]], + ['m_5fseq_5fnum_5fraw_285',['m_seq_num_raw',['../structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html#a8952017a9b9267971a8d79eaa82f358a',1,'flow::net_flow::Ack_packet::Individual_ack_rexmit_off']]], + ['m_5fserial_5flogger_286',['m_serial_logger',['../classflow_1_1log_1_1Async__file__logger.html#a5c06c592797c70077fc02c98ebf231da',1,'flow::log::Async_file_logger']]], + ['m_5fserialized_5fmetadata_287',['m_serialized_metadata',['../classflow_1_1net__flow_1_1Peer__socket.html#a322dddf34a06bb199dab02c993bad686',1,'flow::net_flow::Peer_socket::m_serialized_metadata()'],['../structflow_1_1net__flow_1_1Syn__packet.html#abde26e74af2154fda517d6125353f305',1,'flow::net_flow::Syn_packet::m_serialized_metadata()']]], + ['m_5fservice_5fports_288',['m_service_ports',['../classflow_1_1net__flow_1_1Port__space.html#a1f8e8e52bf4ec90e0b13d9159c403eae',1,'flow::net_flow::Port_space']]], + ['m_5fservs_289',['m_servs',['../classflow_1_1net__flow_1_1Node.html#aae28990628a86a07327f49973f2390df',1,'flow::net_flow::Node']]], + ['m_5fshared_5ftask_5fengine_290',['m_shared_task_engine',['../classflow_1_1async_1_1Cross__thread__task__loop.html#a3fb892d50647ad249eea983b7a664315',1,'flow::async::Cross_thread_task_loop']]], + ['m_5fsignal_5fset_291',['m_signal_set',['../classflow_1_1log_1_1Async__file__logger.html#a7192ad2ad8de3014dba6805cd60d5166',1,'flow::log::Async_file_logger::m_signal_set()'],['../classflow_1_1net__flow_1_1Node.html#abecf0f8111af82fa081c71fda490608a',1,'flow::net_flow::Node::m_signal_set()']]], + ['m_5fsince_5flast_292',['m_since_last',['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#aacbec1a1e5600aeac4e7ca876060552f',1,'flow::perf::Checkpointing_timer::Checkpoint']]], + ['m_5fsize_293',['m_size',['../structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html#a5b5762a1effba90f631c06ad76f9774b',1,'flow::net_flow::Peer_socket::Sent_packet::m_size()'],['../structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html#a7d0760b1dead081bdcf775fbca7f708b',1,'flow::net_flow::Peer_socket::Received_packet::m_size()'],['../classflow_1_1util_1_1Basic__blob.html#ac008b60f7fe4253be9527436b0661dcc',1,'flow::util::Basic_blob::m_size()']]], + ['m_5fslice_5fperiod_294',['m_slice_period',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af0c881081c6706dba393ef814386b143',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslice_5fstart_295',['m_slice_start',['../structflow_1_1net__flow_1_1Send__pacing__data.html#af1e8f11a36db3b967d9a5f61b115750a',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslice_5ftimer_296',['m_slice_timer',['../structflow_1_1net__flow_1_1Send__pacing__data.html#a100a406213a5edf2854440397719bb91',1,'flow::net_flow::Send_pacing_data']]], + ['m_5fslow_5fstart_5fthresh_5fbytes_297',['m_slow_start_thresh_bytes',['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#a239c6315ca562c4e782431879f39c74d',1,'flow::net_flow::Congestion_control_classic_data']]], + ['m_5fsnd_298',['m_snd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a02c61270ec35141affc5bb9f6edc5cd0',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fbandwidth_5festimator_299',['m_snd_bandwidth_estimator',['../classflow_1_1net__flow_1_1Peer__socket.html#a2dd08c5fed4d179e4fde3a632c084751',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fbuf_300',['m_snd_buf',['../classflow_1_1net__flow_1_1Peer__socket.html#a993edf95f6bce2e57e7111e42533dc74',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fbuf_5fsize_301',['m_snd_buf_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a45e2cdb7f0a7e0fd470adeab4009f44a',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_302',['m_snd_cong_ctl',['../classflow_1_1net__flow_1_1Peer__socket.html#a35eb43f2b5d7dd46a941def4523f673c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fbytes_303',['m_snd_cong_ctl_in_flight_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a784bd75264e26acbccd966e48c07dab9',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fin_5fflight_5fcount_304',['m_snd_cong_ctl_in_flight_count',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a76f59a6c658d45c3283865b97dd01489',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fwnd_5fbytes_305',['m_snd_cong_ctl_wnd_bytes',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a959898645f07733966840b7b8309e6c2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fcong_5fctl_5fwnd_5fcount_5fapprox_306',['m_snd_cong_ctl_wnd_count_approx',['../structflow_1_1net__flow_1_1Peer__socket__info.html#ab9da1d80bbed4b286c084dba3ed5b12e',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fdrop_5ftimeout_307',['m_snd_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__info.html#afe104d81f760a454df6d3b0273a2d101',1,'flow::net_flow::Peer_socket_info::m_snd_drop_timeout()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a2d8aded3761028967fd3abb464e64936',1,'flow::net_flow::Peer_socket::m_snd_drop_timeout()']]], + ['m_5fsnd_5fdrop_5ftimer_308',['m_snd_drop_timer',['../classflow_1_1net__flow_1_1Peer__socket.html#a037459e6f1345cedf45e490d544c8567',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fest_5fbandwidth_5fmbit_5fper_5fsec_309',['m_snd_est_bandwidth_mbit_per_sec',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a788325f467420b83a92adce8302f2e18',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fflying_5fbytes_310',['m_snd_flying_bytes',['../classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fflying_5fpkts_5fby_5fsent_5fwhen_311',['m_snd_flying_pkts_by_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#a5ea56c54a98289211fef4a672432a2ad',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fflying_5fpkts_5fby_5fseq_5fnum_312',['m_snd_flying_pkts_by_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a2db7d11ece920d4adcacd00eaa2253fd',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5finit_5fseq_5fnum_313',['m_snd_init_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#aca66d1cb582ca027745d1ef847266cc4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5fdata_5fsent_5fwhen_314',['m_snd_last_data_sent_when',['../classflow_1_1net__flow_1_1Peer__socket.html#af392484f79ffcead4f74ca351672d8d4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5floss_5fevent_5fwhen_315',['m_snd_last_loss_event_when',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9f77167af54cfe2921fab5fd143eff4',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5flast_5forder_5fnum_316',['m_snd_last_order_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1ec79951579d595bb790be87189d6e6c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fnext_5fseq_5fnum_317',['m_snd_next_seq_num',['../classflow_1_1net__flow_1_1Peer__socket.html#a1f8bebf649551131e6ed6e75c6f98d54',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fpacing_5fbytes_5fallowed_5fthis_5fslice_318',['m_snd_pacing_bytes_allowed_this_slice',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a3ac6229cdcd3e949523658b02fa7d0e0',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fdata_319',['m_snd_pacing_data',['../classflow_1_1net__flow_1_1Peer__socket.html#a55b44104a2c305b9679434ba623a7357',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fpacing_5fpacket_5fq_5fsize_320',['m_snd_pacing_packet_q_size',['../structflow_1_1net__flow_1_1Peer__socket__info.html#accd2ed68fd975dfa113f9f66c41d152a',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fslice_5fperiod_321',['m_snd_pacing_slice_period',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a36ab155050d2cc96c5dc7dc9a2d1e2b1',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpacing_5fslice_5fstart_322',['m_snd_pacing_slice_start',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a6b03bba60c815cb17c40802eee400ae2',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fpending_5frcv_5fwnd_323',['m_snd_pending_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a07d885e5c8ec85e7ef8718dc0468ffe9',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frcv_5fwnd_324',['m_snd_rcv_wnd',['../structflow_1_1net__flow_1_1Peer__socket__info.html#abb8b267eb5fa888e21e415f0e0d26a87',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fremote_5frcv_5fwnd_325',['m_snd_remote_rcv_wnd',['../classflow_1_1net__flow_1_1Peer__socket.html#a12611e0ac9e8b86b8304b855050a8c8c',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frexmit_5fq_326',['m_snd_rexmit_q',['../classflow_1_1net__flow_1_1Peer__socket.html#a845f21b754ef641b65b1fe44727fb429',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5frexmit_5fq_5fsize_327',['m_snd_rexmit_q_size',['../classflow_1_1net__flow_1_1Peer__socket.html#a9f5063c85a2070822cf69a530f0af1f5',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5fround_5ftrip_5ftime_5fvariance_328',['m_snd_round_trip_time_variance',['../structflow_1_1net__flow_1_1Peer__socket__info.html#aedadfb406ca6842ab1ecc0c4020e2a58',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsnd_5fsmoothed_5fround_5ftrip_5ftime_329',['m_snd_smoothed_round_trip_time',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a9fafa98dd848eb3944591472c6ce0548',1,'flow::net_flow::Peer_socket_info::m_snd_smoothed_round_trip_time()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad08b53052e7eedfa7a925258f5ef1cba',1,'flow::net_flow::Peer_socket::m_snd_smoothed_round_trip_time()']]], + ['m_5fsnd_5fstats_330',['m_snd_stats',['../classflow_1_1net__flow_1_1Peer__socket.html#ab4aff3e65ef9551b6c5ab890173b741e',1,'flow::net_flow::Peer_socket']]], + ['m_5fsnd_5ftemp_5fpkts_5fmarked_5fto_5fdrop_331',['m_snd_temp_pkts_marked_to_drop',['../classflow_1_1net__flow_1_1Peer__socket.html#aea98297d775f2085c21daf41c6582200',1,'flow::net_flow::Peer_socket']]], + ['m_5fsock_332',['m_sock',['../classflow_1_1net__flow_1_1Congestion__control__strategy.html#a1da6833e0c23d111432cbdd3f5451180',1,'flow::net_flow::Congestion_control_strategy::m_sock()'],['../classflow_1_1net__flow_1_1Congestion__control__classic__data.html#ae8b85cd84e7e0496ad10814008fbd9fc',1,'flow::net_flow::Congestion_control_classic_data::m_sock()'],['../classflow_1_1net__flow_1_1Drop__timer.html#a7ab957ddc07d6289d1b42d6686173533',1,'flow::net_flow::Drop_timer::m_sock()'],['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#a380927913e47235684ce014b14371920',1,'flow::net_flow::Send_bandwidth_estimator::m_sock()']]], + ['m_5fsock_5fdrop_5ftimeout_333',['m_sock_drop_timeout',['../classflow_1_1net__flow_1_1Drop__timer.html#ad9db83f50aec60604de55d01e15ea403',1,'flow::net_flow::Drop_timer']]], + ['m_5fsock_5fevents_334',['m_sock_events',['../classflow_1_1net__flow_1_1Node.html#ab0026feecdb74eda904d00d2c7016bab',1,'flow::net_flow::Node']]], + ['m_5fsock_5fopts_335',['m_sock_opts',['../structflow_1_1net__flow_1_1Peer__socket__info.html#a437ab79b98100ec9f8ee4f2195b24430',1,'flow::net_flow::Peer_socket_info']]], + ['m_5fsocks_336',['m_socks',['../classflow_1_1net__flow_1_1Node.html#a90244d69d550370158bbe843ab595a7a',1,'flow::net_flow::Node']]], + ['m_5fsocks_5fwith_5faccumulated_5facks_337',['m_socks_with_accumulated_acks',['../classflow_1_1net__flow_1_1Node.html#a7d9f418a3c99197e58f71ce2fff2997f',1,'flow::net_flow::Node']]], + ['m_5fsocks_5fwith_5faccumulated_5fpending_5facks_338',['m_socks_with_accumulated_pending_acks',['../classflow_1_1net__flow_1_1Node.html#a7bea132db0e45ea01b9a6bd22fd0fadb',1,'flow::net_flow::Node']]], + ['m_5fsrc_5fport_339',['m_src_port',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae5bd1ed0883b4827d8a81d70c10fd271',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fst_5fcapture_5finterrupt_5fsignals_5finternally_340',['m_st_capture_interrupt_signals_internally',['../structflow_1_1net__flow_1_1Node__options.html#aea7861f3c7739f8e588293d16a2de447',1,'flow::net_flow::Node_options']]], + ['m_5fst_5fcong_5fctl_5fclassic_5fwnd_5fdecay_5fpercent_341',['m_st_cong_ctl_classic_wnd_decay_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeccfe97128c9f5f62ff26d73047dec2e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fcong_5favoidance_5fincrement_5fblocks_342',['m_st_cong_ctl_cong_avoidance_increment_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a7ab1e27acd52d8fa3aadc9eb13d116',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fcong_5fwnd_5fon_5fdrop_5ftimeout_5fblocks_343',['m_st_cong_ctl_cong_wnd_on_drop_timeout_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2c8fcb08dfb0d1ebcc21e02940c149e8',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5finit_5fcong_5fwnd_5fblocks_344',['m_st_cong_ctl_init_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a637811d19d4a2b4d9b3ab79742aadff8',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fmax_5fcong_5fwnd_5fblocks_345',['m_st_cong_ctl_max_cong_wnd_blocks',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a1bdc21e84373dd96494a76f11603335e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fcong_5fctl_5fstrategy_346',['m_st_cong_ctl_strategy',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aca69056d3029193823f0c0ae630f5759',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fconnect_5fretransmit_5fperiod_347',['m_st_connect_retransmit_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8f18c8222ade5f99b83a85e0203ff130',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fconnect_5fretransmit_5ftimeout_348',['m_st_connect_retransmit_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac75171c4f1086d0aa38248ae5ffba884',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdelayed_5fack_5ftimer_5fperiod_349',['m_st_delayed_ack_timer_period',['../structflow_1_1net__flow_1_1Peer__socket__options.html#add7ccb9e8cd0715ca78e0710d2a6db06',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdrop_5fall_5fon_5fdrop_5ftimeout_350',['m_st_drop_all_on_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ac6f4da1892e2157e60772ed74298b2b2',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fdrop_5fpacket_5fexactly_5fafter_5fdrop_5ftimeout_351',['m_st_drop_packet_exactly_after_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a638ca4ecd9d8bfc8710bda71687c4ea3',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5finit_5fdrop_5ftimeout_352',['m_st_init_drop_timeout',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a02afb5ed4201d83c87a3a30fcbdda489',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5flow_5flvl_5fmax_5fbuf_5fsize_353',['m_st_low_lvl_max_buf_size',['../structflow_1_1net__flow_1_1Node__options.html#a78baaf1a911c8d490a13278422307e8a',1,'flow::net_flow::Node_options']]], + ['m_5fst_5fmax_5fblock_5fsize_354',['m_st_max_block_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aeaaf832a38a5e334789e81e214686ea7',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fmax_5ffull_5fblocks_5fbefore_5fack_5fsend_355',['m_st_max_full_blocks_before_ack_send',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7a76f7ae03e258b30b04c7350481de6',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fmax_5frexmissions_5fper_5fpacket_356',['m_st_max_rexmissions_per_packet',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a0b37da87848d01220c7e58f90e6764ba',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fout_5fof_5forder_5fack_5frestarts_5fdrop_5ftimer_357',['m_st_out_of_order_ack_restarts_drop_timer',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ae7d5eb1b4e37317478c3b25bc3c8c245',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_358',['m_st_rcv_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a171480324f26432928738532cb3c8556',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fslack_5fpercent_359',['m_st_rcv_buf_max_size_slack_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#aa6d16c98186187fdffadcfb853d58410',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fbuf_5fmax_5fsize_5fto_5fadvertise_5fpercent_360',['m_st_rcv_buf_max_size_to_advertise_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af483d0292f363e7dbf14dc7a2dd49f3f',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fflow_5fcontrol_5fon_361',['m_st_rcv_flow_control_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad9a31f63eea6f89952a89ea0385d9a2e',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frcv_5fmax_5fpackets_5fafter_5funrecvd_5fpacket_5fratio_5fpercent_362',['m_st_rcv_max_packets_after_unrecvd_packet_ratio_percent',['../structflow_1_1net__flow_1_1Peer__socket__options.html#af78ca6cf3c6da3bc24cea40d522f0bdb',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5frexmit_5fon_363',['m_st_rexmit_on',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a6c35e6014182ccfcbee6bed4571a8360',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fbandwidth_5fest_5fsample_5fperiod_5ffloor_364',['m_st_snd_bandwidth_est_sample_period_floor',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a2a3d420992e19e5addb7193d607e82e4',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fbuf_5fmax_5fsize_365',['m_st_snd_buf_max_size',['../structflow_1_1net__flow_1_1Peer__socket__options.html#a8ca6086022691700f5e5d2dc87ca92fd',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5fsnd_5fpacing_5fenabled_366',['m_st_snd_pacing_enabled',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad7cbcdd64a4366740ff9e55b39c977ba',1,'flow::net_flow::Peer_socket_options']]], + ['m_5fst_5ftimer_5fmin_5fperiod_367',['m_st_timer_min_period',['../structflow_1_1net__flow_1_1Node__options.html#abef8889be34024b07eff3211a3213d5f',1,'flow::net_flow::Node_options']]], + ['m_5fstart_368',['m_start',['../classflow_1_1util_1_1Basic__blob.html#aae53d36a27090ef5da931bc17d4f2bcd',1,'flow::util::Basic_blob']]], + ['m_5fstart_5fwhen_369',['m_start_when',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac16b16c3192e287ae3f08be786626f1a',1,'flow::perf::Checkpointing_timer']]], + ['m_5fstarted_5fthread_5fid_5for_5fnone_370',['m_started_thread_id_or_none',['../classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05',1,'flow::async::Single_thread_task_loop']]], + ['m_5fstate_371',['m_state',['../classflow_1_1net__flow_1_1Server__socket.html#a783f81f10b50f62a638aa26b72d49e36',1,'flow::net_flow::Server_socket::m_state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a05a765055fd54412c63e57e43697f1bc',1,'flow::net_flow::Peer_socket::m_state()'],['../classflow_1_1net__flow_1_1Event__set.html#a56925e15b38d285f387e10bfb18f93c9',1,'flow::net_flow::Event_set::m_state()']]], + ['m_5ftarget_372',['m_target',['../classflow_1_1util_1_1String__ostream.html#afa87f2303455e62c0be244deb37cb65e',1,'flow::util::String_ostream']]], + ['m_5ftarget_5fappender_5fostream_373',['m_target_appender_ostream',['../classflow_1_1util_1_1String__ostream.html#abaf52be7b420f87d9a75edec7be2fc6b',1,'flow::util::String_ostream::m_target_appender_ostream()'],['../classflow_1_1log_1_1Thread__local__string__appender.html#a7bb2cd7d173ddc0ca3075d0475015f96',1,'flow::log::Thread_local_string_appender::m_target_appender_ostream()']]], + ['m_5ftarget_5fappender_5fostream_5fprev_5fos_5fstate_374',['m_target_appender_ostream_prev_os_state',['../classflow_1_1log_1_1Thread__local__string__appender.html#aebc7ceab35e8201f0c60b59a0cc93ca3',1,'flow::log::Thread_local_string_appender']]], + ['m_5ftarget_5finserter_375',['m_target_inserter',['../classflow_1_1util_1_1String__ostream.html#ab8866da6531e449b80b1b7bb18a3b7b9',1,'flow::util::String_ostream']]], + ['m_5ftarget_5fopts_376',['m_target_opts',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a94df262d2c85c677916cb5f57f9c1559',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5ftarget_5for_5fnull_377',['m_target_or_null',['../classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c',1,'flow::util::Scoped_setter']]], + ['m_5ftarget_5ftask_5fengine_378',['m_target_task_engine',['../classflow_1_1net__flow_1_1asio_1_1Node.html#a5b688a4071b8ad58a776de8d3816b757',1,'flow::net_flow::asio::Node::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a714f570918cfa8d225d75c787e7ac573',1,'flow::net_flow::asio::Peer_socket::m_target_task_engine()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#ae236d96a176b209b217f04bb94119efe',1,'flow::net_flow::asio::Server_socket::m_target_task_engine()']]], + ['m_5ftask_5fengine_379',['m_task_engine',['../classflow_1_1async_1_1Task__qing__thread.html#a1f4a96efdc1820ddbb4a4bf49c0d38e6',1,'flow::async::Task_qing_thread::m_task_engine()'],['../classflow_1_1net__flow_1_1Node.html#af5597a417d03e2bed87cd772ef5cef29',1,'flow::net_flow::Node::m_task_engine()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#af3eb85a490f1386423fe4a6a32979a93',1,'flow::util::Scheduled_task_handle_state::m_task_engine()']]], + ['m_5ftask_5fengines_380',['m_task_engines',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#ad09c2d973e3794f36bf06bd001ca860e',1,'flow::async::Segregated_thread_task_loop']]], + ['m_5fthis_5fsample_5fstart_5ftime_381',['m_this_sample_start_time',['../classflow_1_1net__flow_1_1Send__bandwidth__estimator.html#ac627f8c9ae6c51c2ea14dd46af4f4150',1,'flow::net_flow::Send_bandwidth_estimator']]], + ['m_5fthrottling_5factive_382',['m_throttling_active',['../classflow_1_1log_1_1Async__file__logger.html#a5bbad8cea27134844e73daff014cc82a',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fbegins_383',['m_throttling_begins',['../structflow_1_1log_1_1Async__file__logger_1_1Log__request.html#aee7f652b0e17e39d0afdb721bc956cf7',1,'flow::log::Async_file_logger::Log_request']]], + ['m_5fthrottling_5fcfg_384',['m_throttling_cfg',['../classflow_1_1log_1_1Async__file__logger.html#aa3d544ab96299a8c2b53b7be485d1a6e',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fmutex_385',['m_throttling_mutex',['../classflow_1_1log_1_1Async__file__logger.html#a99cd4faff109ef35720fbed9837973dc',1,'flow::log::Async_file_logger']]], + ['m_5fthrottling_5fnow_386',['m_throttling_now',['../classflow_1_1log_1_1Async__file__logger.html#aa13ef30bc2d66758c29c31dc76a130aa',1,'flow::log::Async_file_logger']]], + ['m_5ftime_5faccumulator_387',['m_time_accumulator',['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a55aa9c680221d64b44715256713a5bee',1,'flow::async::Timed_concurrent_task_loop_impl']]], + ['m_5ftimed_5floop_388',['m_timed_loop',['../classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9',1,'flow::async::Timed_single_thread_task_loop']]], + ['m_5ftimer_389',['m_timer',['../classflow_1_1net__flow_1_1Drop__timer.html#ad5dfc3cd2f8e5e4d28c49e28ee5c221f',1,'flow::net_flow::Drop_timer::m_timer()'],['../structflow_1_1util_1_1Scheduled__task__handle__state.html#a5934d785b54bb71e739c262b6db8dda9',1,'flow::util::Scheduled_task_handle_state::m_timer()']]], + ['m_5ftimer_5ffailure_390',['m_timer_failure',['../classflow_1_1net__flow_1_1Drop__timer.html#a21e78b9da6196043e1c05589c46911fa',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimer_5ffired_391',['m_timer_fired',['../classflow_1_1net__flow_1_1Drop__timer.html#a862595a7ec5d4bea05ad0e85c52e88ac',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimer_5frunning_392',['m_timer_running',['../classflow_1_1net__flow_1_1Drop__timer.html#a9528326a35b021bb859bed948ae3d7a4',1,'flow::net_flow::Drop_timer']]], + ['m_5ftimers_393',['m_timers',['../classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#af1c4f46ce680b979e98a3e255c88d063',1,'flow::perf::Checkpointing_timer::Aggregator']]], + ['m_5ftotal_5fdata_5fcount_394',['m_total_data_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a893ca5129ab56fd57de0cdee92e59bd7',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fdata_5fsize_395',['m_total_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a132cb2a966ede1bf5fe363e5885a0f64',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fto_5fsend_5facks_5fcount_396',['m_total_to_send_acks_count',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a66c7d92f84d1a1f7b1039a926b1a8f00',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftotal_5fto_5fsend_5facks_5fdata_5fsize_397',['m_total_to_send_acks_data_size',['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a6946add6977b28e244c69606fd14db03',1,'flow::net_flow::Peer_socket_receive_stats']]], + ['m_5ftype_5fid_5fstr_398',['m_type_id_str',['../structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html#a8dc054626823cb59a1570214349b8450',1,'flow::net_flow::Low_lvl_packet::Packet_type_info']]], + ['m_5ftype_5fostream_5fmanip_399',['m_type_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#a7f4fd9ce69e293477e96fbad0a2298ed',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fudp_5fendpoint_400',['m_udp_endpoint',['../structflow_1_1net__flow_1_1Remote__endpoint.html#a582f3a55d828cd4e36369682315c7629',1,'flow::net_flow::Remote_endpoint']]], + ['m_5funaccepted_5fsocks_401',['m_unaccepted_socks',['../classflow_1_1net__flow_1_1Server__socket.html#a7ba32040008ffe0637d3a1847deb76c5',1,'flow::net_flow::Server_socket']]], + ['m_5funderlying_5floop_402',['m_underlying_loop',['../classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4',1,'flow::async::Single_thread_task_loop']]], + ['m_5fuse_5fhuman_5ffriendly_5ftime_5fstamps_403',['m_use_human_friendly_time_stamps',['../classflow_1_1log_1_1Config.html#a1b16be31f5dcfba9536a377c9d29abb6',1,'flow::log::Config']]], + ['m_5fvalidate_5fstored_5fvals_5fargs_404',['m_validate_stored_vals_args',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#ae780a398078db2299e8a5c3714bcb987',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalue_5flist_405',['m_value_list',['../classflow_1_1util_1_1Linked__hash__map.html#a3c2ebf269951f5fe2412b6a77303b5ba',1,'flow::util::Linked_hash_map::m_value_list()'],['../classflow_1_1util_1_1Linked__hash__set.html#a4bae43bd9a1b68903af4b6f9452ccf9e',1,'flow::util::Linked_hash_set::m_value_list()']]], + ['m_5fvalues_406',['m_values',['../classflow_1_1cfg_1_1Option__set.html#a7bda9a32640f89d1c8a2306b8b368a13',1,'flow::cfg::Option_set::m_values()'],['../structflow_1_1perf_1_1Duration__set.html#ae7d89b9e16f45dc59b27092e0496ce4f',1,'flow::perf::Duration_set::m_values()'],['../structflow_1_1perf_1_1Time__pt__set.html#a9867f05832f22c6aceb340c0ba697dbc',1,'flow::perf::Time_pt_set::m_values()']]], + ['m_5fvalues_5fcandidate_407',['m_values_candidate',['../classflow_1_1cfg_1_1Option__set.html#adfd72b4b73913193252a02d35acdff09',1,'flow::cfg::Option_set::m_values_candidate()'],['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#acbaeb3dd021040e15bff6e85b8da5253',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_candidate()']]], + ['m_5fvalues_5fcurrent_408',['m_values_current',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a19683d3ea7c64e3abf96f85b60e9e610',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fdefault_409',['m_values_default',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a7c91f3db7161cf30816e0fe1fccc39c0',1,'flow::cfg::Option_set::Declare_options_func_args::m_values_default()'],['../classflow_1_1cfg_1_1Option__set.html#aea72e19fce43c10c84f6445f1892de41',1,'flow::cfg::Option_set::m_values_default()']]], + ['m_5fvalues_5fdefault_5fno_5facc_410',['m_values_default_no_acc',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#adc8e05f6d6528755712280a812a6ad4d',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fto_5fload_411',['m_values_to_load',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a838e0b0c1f25e167a102e11de272de4e',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fvalues_5fto_5fvalidate_412',['m_values_to_validate',['../structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html#a75ab66920b874488bed052a90bc716d5',1,'flow::cfg::Option_set::Declare_options_func_args']]], + ['m_5fverbose_5fostream_5fmanip_413',['m_verbose_ostream_manip',['../structflow_1_1net__flow_1_1Low__lvl__packet.html#ae3e64b049838a690384a899209ffca7b',1,'flow::net_flow::Low_lvl_packet']]], + ['m_5fverbosities_5fby_5fcomponent_414',['m_verbosities_by_component',['../classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f',1,'flow::log::Config']]], + ['m_5fverbosity_5fdefault_415',['m_verbosity_default',['../classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c',1,'flow::log::Config']]], + ['m_5fwant_416',['m_want',['../classflow_1_1net__flow_1_1Event__set.html#af4fa5dbda4ffd95b35dee57fc01b90ce',1,'flow::net_flow::Event_set']]], + ['m_5fwhich_5fclocks_417',['m_which_clocks',['../classflow_1_1perf_1_1Checkpointing__timer.html#ac5518c3fdc58f8867ca114186562575b',1,'flow::perf::Checkpointing_timer']]], + ['m_5fworker_418',['m_worker',['../classflow_1_1net__flow_1_1Node.html#a84b7e03ae7b13dae0f59db1475e46fd3',1,'flow::net_flow::Node']]], + ['m_5fworker_5fthread_419',['m_worker_thread',['../classflow_1_1async_1_1Task__qing__thread.html#a75b218e1b5f137ead984588107ef02b0',1,'flow::async::Task_qing_thread']]], + ['m_5fzero_5fpoint_5fnum_420',['m_zero_point_num',['../classflow_1_1net__flow_1_1Sequence__number.html#adcd83d66fac1a77d9e94f13d1c4671b0',1,'flow::net_flow::Sequence_number']]] ]; diff --git a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp.html index 542c033b4..1ab93d909 100644 --- a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp_source.html b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp_source.html index 9a4c9ab6c..0065fbbd1 100644 --- a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8cpp_source.html @@ -500,7 +500,7 @@
                                                                                                                                  428
                                                                                                                                  429} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...
                                                                                                                                  Definition: op.hpp:58
                                                                                                                                  const Op & random_op(size_t *chosen_idx=0) const
                                                                                                                                  Returns (*this)[R], where we randomly select R as if by random_idx() and communicate it to the caller...
                                                                                                                                  Definition: op.cpp:51
                                                                                                                                  @@ -545,22 +545,22 @@
                                                                                                                                  unsigned int optimal_worker_thread_count_per_pool(flow::log::Logger *logger_ptr, bool est_hw_core_sharing_helps_algo)
                                                                                                                                  Assuming a planned thread pool will be receiving ~symmetrical load, and its UX-affecting (in particul...
                                                                                                                                  Task_engine_ptr op_to_exec_ctx< Task_engine_ptr >(Concurrent_task_loop *loop, const Op &op)
                                                                                                                                  Template specialization for operation that obtains the underlying execution context,...
                                                                                                                                  @ S_TRACE
                                                                                                                                  Message indicates any condition that may occur with great frequency (thus verbose if logged).
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  Scheduled_task_handle schedule_task_from_now(log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
                                                                                                                                  Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asi...
                                                                                                                                  Definition: sched_task.hpp:34
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  boost::thread Thread
                                                                                                                                  Short-hand for standard thread class.
                                                                                                                                  Definition: util_fwd.hpp:78
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp.html index 6b975ba7d..3a4d7b98e 100644 --- a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp_source.html b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp_source.html index b2b413981..29b0e5c06 100644 --- a/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/segregated__thread__task__loop_8hpp_source.html @@ -383,7 +383,7 @@
                                                                                                                                  311
                                                                                                                                  312} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  Function< void(size_t thread_idx)> Thread_init_func
                                                                                                                                  Short-hand for the thread-initializer-function optional arg type to start().
                                                                                                                                  Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...
                                                                                                                                  Definition: op.hpp:58
                                                                                                                                  @@ -423,12 +423,12 @@
                                                                                                                                  Function< void()> Task
                                                                                                                                  Short-hand for a task that can be posted for execution by a Concurrent_task_loop or flow::util::Task_...
                                                                                                                                  Definition: async_fwd.hpp:96
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/seq__num_8cpp.html b/doc/flow_doc/generated/html_full/seq__num_8cpp.html index ddf9bfa6b..c7a2487b3 100644 --- a/doc/flow_doc/generated/html_full/seq__num_8cpp.html +++ b/doc/flow_doc/generated/html_full/seq__num_8cpp.html @@ -102,7 +102,7 @@ diff --git a/doc/flow_doc/generated/html_full/seq__num_8cpp_source.html b/doc/flow_doc/generated/html_full/seq__num_8cpp_source.html index bc5b8480a..692039211 100644 --- a/doc/flow_doc/generated/html_full/seq__num_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/seq__num_8cpp_source.html @@ -386,15 +386,15 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  size_t hash_value(const Sequence_number &seq_num)
                                                                                                                                  Free function that returns seq_num.hash(); has to be a free function named hash_value for boost....
                                                                                                                                  Definition: seq_num.cpp:275
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/seq__num_8hpp.html b/doc/flow_doc/generated/html_full/seq__num_8hpp.html index dc0186413..7e8a085fe 100644 --- a/doc/flow_doc/generated/html_full/seq__num_8hpp.html +++ b/doc/flow_doc/generated/html_full/seq__num_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/seq__num_8hpp_source.html b/doc/flow_doc/generated/html_full/seq__num_8hpp_source.html index 2c9134d48..37b70dd24 100644 --- a/doc/flow_doc/generated/html_full/seq__num_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/seq__num_8hpp_source.html @@ -536,12 +536,12 @@
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/serial__file__logger_8cpp.html b/doc/flow_doc/generated/html_full/serial__file__logger_8cpp.html index 7e8a91df8..8af2733ad 100644 --- a/doc/flow_doc/generated/html_full/serial__file__logger_8cpp.html +++ b/doc/flow_doc/generated/html_full/serial__file__logger_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/serial__file__logger_8cpp_source.html b/doc/flow_doc/generated/html_full/serial__file__logger_8cpp_source.html index f99a1eaa2..20ff9d4a1 100644 --- a/doc/flow_doc/generated/html_full/serial__file__logger_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/serial__file__logger_8cpp_source.html @@ -291,13 +291,13 @@
                                                                                                                                  Flow module providing logging functionality.
                                                                                                                                  Sev
                                                                                                                                  Enumeration containing one of several message severity levels, ordered from highest to lowest.
                                                                                                                                  Definition: log_fwd.hpp:224
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  Simple data store containing all of the information generated at every logging call site by flow::log...
                                                                                                                                  Definition: log.hpp:1048
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/serial__file__logger_8hpp.html b/doc/flow_doc/generated/html_full/serial__file__logger_8hpp.html index 4592eadd6..0f6d34cb8 100644 --- a/doc/flow_doc/generated/html_full/serial__file__logger_8hpp.html +++ b/doc/flow_doc/generated/html_full/serial__file__logger_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_full/serial__file__logger_8hpp_source.html b/doc/flow_doc/generated/html_full/serial__file__logger_8hpp_source.html index 2667a580d..338fc2f36 100644 --- a/doc/flow_doc/generated/html_full/serial__file__logger_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/serial__file__logger_8hpp_source.html @@ -233,7 +233,7 @@ diff --git a/doc/flow_doc/generated/html_full/server__socket_8cpp.html b/doc/flow_doc/generated/html_full/server__socket_8cpp.html index fe99ef6c3..aa80698cd 100644 --- a/doc/flow_doc/generated/html_full/server__socket_8cpp.html +++ b/doc/flow_doc/generated/html_full/server__socket_8cpp.html @@ -102,7 +102,7 @@ diff --git a/doc/flow_doc/generated/html_full/server__socket_8cpp_source.html b/doc/flow_doc/generated/html_full/server__socket_8cpp_source.html index 90d8a4990..0a179d175 100644 --- a/doc/flow_doc/generated/html_full/server__socket_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/server__socket_8cpp_source.html @@ -986,7 +986,7 @@
                                                                                                                                  914} // namespace flow::net_flow
                                                                                                                                  - +
                                                                                                                                  const Component & get_log_component() const
                                                                                                                                  Returns reference to the stored Component object, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:230
                                                                                                                                  Logger * get_logger() const
                                                                                                                                  Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:225
                                                                                                                                  Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
                                                                                                                                  Definition: log.hpp:1291
                                                                                                                                  @@ -1003,42 +1003,42 @@
                                                                                                                                  void serv_close_detected(Server_socket::Ptr serv, const Error_code &disconnect_cause, bool close)
                                                                                                                                  Records that thread W shows this socket is not to listen to incoming connections and is to abort any ...
                                                                                                                                  bool async_sock_low_lvl_packet_send_paced(const Peer_socket::Ptr &sock, Low_lvl_packet::Ptr &&packet, Error_code *err_code)
                                                                                                                                  Begins the process of asynchronously sending the given low-level packet to the remote Node specified ...
                                                                                                                                  Definition: low_lvl_io.cpp:605
                                                                                                                                  Server_socket::Ptr listen(flow_port_t local_port, Error_code *err_code=0, const Peer_socket_options *child_sock_opts=0)
                                                                                                                                  Sets up a server on the given local Flow port and returns Server_socket which can be used to accept s...
                                                                                                                                  -
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  -
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  +
                                                                                                                                  void cancel_timers(Peer_socket::Ptr sock)
                                                                                                                                  Cancel any timers and scheduled tasks active in the given socket.
                                                                                                                                  +
                                                                                                                                  bool sock_validate_options(const Peer_socket_options &opts, const Peer_socket_options *prev_opts, Error_code *err_code) const
                                                                                                                                  Analogous to validate_options() but checks per-socket options instead of per-Node options.
                                                                                                                                  Options_mutex m_opts_mutex
                                                                                                                                  The mutex protecting m_opts.
                                                                                                                                  Definition: node.hpp:3707
                                                                                                                                  bool serv_is_acceptable(const boost::any &serv_as_any) const
                                                                                                                                  Returns true if and only if calling serv->accept() with at least some arguments would return either n...
                                                                                                                                  -
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  -
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  +
                                                                                                                                  Syn_ack_packet::Ptr create_syn_ack(Peer_socket::Const_ptr sock)
                                                                                                                                  Like create_syn() but for SYN_ACK.
                                                                                                                                  +
                                                                                                                                  virtual Peer_socket * sock_create(const Peer_socket_options &opts)
                                                                                                                                  Internal factory used for ALL Peer_socket objects created by this Node (including subclasses).
                                                                                                                                  void async_no_sock_low_lvl_rst_send(Low_lvl_packet::Const_ptr causing_packet, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Sends an RST to the given UDP endpoint in response to the given incoming low-level packet that came f...
                                                                                                                                  Definition: low_lvl_io.cpp:586
                                                                                                                                  Sequence_number::Generator m_seq_num_generator
                                                                                                                                  Sequence number generator (at least to generate ISNs). Only thread W can access this.
                                                                                                                                  Definition: node.hpp:3780
                                                                                                                                  void event_set_all_check_delta(bool defer_delta_check)
                                                                                                                                  For each WAITING Event_set within the Node: checks for any events that hold, and if any do hold,...
                                                                                                                                  Definition: event_set.cpp:1129
                                                                                                                                  void serv_peer_socket_closed(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records that a Server_socket-contained (i.e., currently un-established, or established but not yet ac...
                                                                                                                                  Socket_id_to_socket_map m_socks
                                                                                                                                  The peer-to-peer connections this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3792
                                                                                                                                  Peer_socket::Options_lock Options_lock
                                                                                                                                  Short-hand for lock that acquires exclusive access to an Options_mutex.
                                                                                                                                  Definition: node.hpp:1439
                                                                                                                                  -
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  -
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  +
                                                                                                                                  static Socket_id socket_id(Peer_socket::Const_ptr sock)
                                                                                                                                  Constructs the socket pair (connection ID) for the given socket.
                                                                                                                                  +
                                                                                                                                  void sock_set_int_state(Peer_socket::Ptr sock, Peer_socket::Int_state new_state)
                                                                                                                                  Sets internal state of given socket to the given state and logs a TRACE message about it.
                                                                                                                                  Peer_socket::Ptr handle_syn_to_listening_server(Server_socket::Ptr serv, boost::shared_ptr< const Syn_packet > syn, const util::Udp_endpoint &low_lvl_remote_endpoint)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed low-level SYN packet delivered to the given server so...
                                                                                                                                  bool running() const
                                                                                                                                  Returns true if and only if the Node is operating.
                                                                                                                                  Definition: node.cpp:420
                                                                                                                                  Port_to_server_map m_servs
                                                                                                                                  The server sockets this Node is currently tracking.
                                                                                                                                  Definition: node.hpp:3798
                                                                                                                                  Event_set::Ev_type_to_socks_map m_sock_events
                                                                                                                                  All sockets that have been detected to be "ready" (by the Event_set doc header definition) at any poi...
                                                                                                                                  Definition: node.hpp:3830
                                                                                                                                  -
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  +
                                                                                                                                  void setup_drop_timer(const Socket_id &socket_id, Peer_socket::Ptr sock)
                                                                                                                                  Creates a new Drop Timer and saves it to sock->m_snd_drop_timer.
                                                                                                                                  void listen_worker(flow_port_t local_port, const Peer_socket_options *child_sock_opts, Server_socket::Ptr *serv)
                                                                                                                                  Thread W implementation of listen().
                                                                                                                                  void serv_peer_socket_acceptable(Server_socket::Ptr serv, Peer_socket::Ptr sock)
                                                                                                                                  Records that an unestablished socket sock (Peer_socket::Int_state::S_SYN_RCVD) has just become establ...
                                                                                                                                  void handle_data_to_syn_rcvd(Peer_socket::Ptr sock, boost::shared_ptr< Data_packet > packet)
                                                                                                                                  Handles a just-deserialized, just-demultiplexed, low-level DATA packet delivered to the given peer so...
                                                                                                                                  -
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  -
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  +
                                                                                                                                  void setup_connection_timers(const Socket_id &socket_id, Peer_socket::Ptr sock, bool initial)
                                                                                                                                  Assuming we've just sent SYN or SYN_ACK, sets up an asynchronous scheduled task to fire within some a...
                                                                                                                                  +
                                                                                                                                  size_t sock_rcv_wnd(Peer_socket::Const_ptr sock) const
                                                                                                                                  Computes and returns the currently correct rcv_wnd value; that is the amount of space free in Receive...
                                                                                                                                  Peer_socket::Ptr accept(Server_socket::Ptr serv, Error_code *err_code)
                                                                                                                                  Implementation of non-blocking serv->accept() for server socket serv in all cases except when serv->s...
                                                                                                                                  -
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  +
                                                                                                                                  void sock_set_state(Peer_socket::Ptr sock, Peer_socket::State state, Peer_socket::Open_sub_state open_sub_state=Peer_socket::Open_sub_state::S_CONNECTED)
                                                                                                                                  Sets Peer_socket::m_state and Peer_socket::m_open_sub_state.
                                                                                                                                  Node_options m_opts
                                                                                                                                  This Node's global set of options.
                                                                                                                                  Definition: node.hpp:3704
                                                                                                                                  void close_empty_server_immediately(const flow_port_t local_port, Server_socket::Ptr serv, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Handles the transition of the given server socket from S_LISTENING/S_CLOSING to S_CLOSED (including e...
                                                                                                                                  util::Rnd_gen_uniform_range< Peer_socket::security_token_t > m_rnd_security_tokens
                                                                                                                                  Random number generator for picking security tokens; seeded on time at Node construction and generate...
                                                                                                                                  Definition: node.hpp:3786
                                                                                                                                  util::Task_engine m_task_engine
                                                                                                                                  The main loop engine, functioning in the single-threaded-but-asynchronous callback-based "reactor" st...
                                                                                                                                  Definition: node.hpp:3739
                                                                                                                                  Port_space m_ports
                                                                                                                                  Flow port space for both client and server sockets. All threads may access this.
                                                                                                                                  Definition: node.hpp:3777
                                                                                                                                  -
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  +
                                                                                                                                  void rst_and_close_connection_immediately(const Socket_id &socket_id, Peer_socket::Ptr sock, const Error_code &err_code, bool defer_delta_check)
                                                                                                                                  Asynchronously send RST to the other side of the given socket and close_connection_immediately().
                                                                                                                                  @ S_OPEN
                                                                                                                                  Future reads or writes may be possible. A socket in this state may be Writable or Readable.
                                                                                                                                  @ S_CONNECTED
                                                                                                                                  This Peer_socket was created through a passive connect (Node::accept() and the like) or an active con...
                                                                                                                                  @ S_CONNECTING
                                                                                                                                  This Peer_socket was created through an active connect (Node::connect() and the like),...
                                                                                                                                  -
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  +
                                                                                                                                  util::Lock_guard< Mutex > Lock_guard
                                                                                                                                  Short-hand for RAII lock guard of Mutex.
                                                                                                                                  @ S_ESTABLISHED
                                                                                                                                  Public state is OPEN+CONNECTED; in our opinion the connection is established.
                                                                                                                                  @ S_CLOSED
                                                                                                                                  Closed (dead or new) socket.
                                                                                                                                  @ S_SYN_RCVD
                                                                                                                                  Public state is OPEN+CONNECTING; other side requested passive connect via SYN; we sent SYN_ACK and ar...
                                                                                                                                  @@ -1096,12 +1096,12 @@
                                                                                                                                  uint16_t flow_port_t
                                                                                                                                  Logical Flow port type (analogous to a UDP/TCP port in spirit but in no way relevant to UDP/TCP).
                                                                                                                                  const flow_port_t S_PORT_ANY
                                                                                                                                  Special Flow port value used to indicate "invalid port" or "please pick a random available ephemeral ...
                                                                                                                                  Definition: port_space.cpp:33
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:276
                                                                                                                                  +
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:301
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  boost::asio::ip::udp::endpoint Udp_endpoint
                                                                                                                                  Short-hand for the UDP endpoint (IP/port) type.
                                                                                                                                  Definition: util_fwd.hpp:208
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  The data nugget uniquely identifying a peer-to-peer connection from a remote endpoint to a port in th...
                                                                                                                                  Definition: node.hpp:3904
                                                                                                                                  @@ -1111,7 +1111,7 @@ diff --git a/doc/flow_doc/generated/html_full/server__socket_8hpp.html b/doc/flow_doc/generated/html_full/server__socket_8hpp.html index 800550e57..87c1645bd 100644 --- a/doc/flow_doc/generated/html_full/server__socket_8hpp.html +++ b/doc/flow_doc/generated/html_full/server__socket_8hpp.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_full/server__socket_8hpp_source.html b/doc/flow_doc/generated/html_full/server__socket_8hpp_source.html index 958f7450d..99a6ac4fd 100644 --- a/doc/flow_doc/generated/html_full/server__socket_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/server__socket_8hpp_source.html @@ -547,8 +547,8 @@
                                                                                                                                  Fine_time_pt chrono_duration_from_now_to_fine_time_pt(const boost::chrono::duration< Rep, Period > &dur)
                                                                                                                                  Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
                                                                                                                                  Definition: util.hpp:42
                                                                                                                                  boost::unique_lock< Mutex > Lock_guard
                                                                                                                                  Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
                                                                                                                                  Definition: util_fwd.hpp:265
                                                                                                                                  boost::recursive_mutex Mutex_recursive
                                                                                                                                  Short-hand for reentrant, exclusive mutex.
                                                                                                                                  Definition: util_fwd.hpp:218
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  @@ -558,7 +558,7 @@ diff --git a/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp.html b/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp.html index 651ed2394..d10444d0c 100644 --- a/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp.html +++ b/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp_source.html b/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp_source.html index 42a391962..7a6bda706 100644 --- a/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/shared__ptr__alias__holder_8hpp_source.html @@ -301,7 +301,7 @@ diff --git a/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp.html b/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp.html index 6884817ce..deac79f3d 100644 --- a/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp.html +++ b/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp_source.html b/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp_source.html index 69fc90c65..2bf1178e0 100644 --- a/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/simple__ostream__logger_8cpp_source.html @@ -170,7 +170,7 @@ diff --git a/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp.html b/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp.html index 239f169c3..a5001d0c7 100644 --- a/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp.html +++ b/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp_source.html b/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp_source.html index b60274d6a..a3abf46f2 100644 --- a/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/simple__ostream__logger_8hpp_source.html @@ -271,7 +271,7 @@ diff --git a/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp.html index b94087ea9..843657f9e 100644 --- a/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp_source.html b/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp_source.html index 00c26ef22..b8e2501c2 100644 --- a/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/single__thread__task__loop_8cpp_source.html @@ -192,7 +192,7 @@
                                                                                                                                  120}
                                                                                                                                  121
                                                                                                                                  122} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  util::Scheduled_task_handle schedule_from_now(const Fine_duration &from_now, Scheduled_task &&task) override
                                                                                                                                  Implements superclass API.
                                                                                                                                  void start(Task &&init_task_or_empty=Task(), const Thread_init_func &thread_init_func_or_empty=Thread_init_func()) override
                                                                                                                                  Implements superclass API.
                                                                                                                                  @@ -234,14 +234,14 @@
                                                                                                                                  Clock_type
                                                                                                                                  Clock types supported by flow::perf module facilities, perf::Checkpointing_timer in particular.
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp.html index 54c0d9ba2..c3b019d74 100644 --- a/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp.html @@ -102,7 +102,7 @@ diff --git a/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp_source.html b/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp_source.html index 62bd33d89..81203e39e 100644 --- a/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/single__thread__task__loop_8hpp_source.html @@ -476,7 +476,7 @@
                                                                                                                                  404
                                                                                                                                  405} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  Concrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute...
                                                                                                                                  A Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essenti...
                                                                                                                                  @@ -517,15 +517,15 @@
                                                                                                                                  Thread::id Thread_id
                                                                                                                                  Short-hand for an OS-provided ID of a util::Thread.
                                                                                                                                  Definition: util_fwd.hpp:90
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/socket__buffer_8cpp.html b/doc/flow_doc/generated/html_full/socket__buffer_8cpp.html index 9d4e3eb3b..cbd04bff4 100644 --- a/doc/flow_doc/generated/html_full/socket__buffer_8cpp.html +++ b/doc/flow_doc/generated/html_full/socket__buffer_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_full/socket__buffer_8cpp_source.html b/doc/flow_doc/generated/html_full/socket__buffer_8cpp_source.html index 3ea308d16..1f540b70d 100644 --- a/doc/flow_doc/generated/html_full/socket__buffer_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/socket__buffer_8cpp_source.html @@ -275,14 +275,14 @@
                                                                                                                                  #define FLOW_LOG_TRACE(ARG_stream_fragment)
                                                                                                                                  Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
                                                                                                                                  Definition: log.hpp:227
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  std::ostream & operator<<(std::ostream &os, const Congestion_control_selector::Strategy_choice &strategy_choice)
                                                                                                                                  Serializes a Peer_socket_options::Congestion_control_strategy_choice enum to a standard ostream – the...
                                                                                                                                  Definition: cong_ctl.cpp:146
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/socket__buffer_8hpp.html b/doc/flow_doc/generated/html_full/socket__buffer_8hpp.html index d075ae90a..2ceeae05b 100644 --- a/doc/flow_doc/generated/html_full/socket__buffer_8hpp.html +++ b/doc/flow_doc/generated/html_full/socket__buffer_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/socket__buffer_8hpp_source.html b/doc/flow_doc/generated/html_full/socket__buffer_8hpp_source.html index e9ad99cd5..0df27e8c8 100644 --- a/doc/flow_doc/generated/html_full/socket__buffer_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/socket__buffer_8hpp_source.html @@ -799,13 +799,13 @@
                                                                                                                                  #define FLOW_LOG_DATA(ARG_stream_fragment)
                                                                                                                                  Logs a DATA message into flow::log::Logger *get_logger() with flow::log::Component get_log_component(...
                                                                                                                                  Definition: log.hpp:242
                                                                                                                                  #define FLOW_LOG_TRACE(ARG_stream_fragment)
                                                                                                                                  Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
                                                                                                                                  Definition: log.hpp:227
                                                                                                                                  Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...
                                                                                                                                  Definition: node.cpp:25
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  Blob_with_log_context<> Blob
                                                                                                                                  A concrete Blob_with_log_context that compile-time-disables Basic_blob::share() and the sharing API d...
                                                                                                                                  Definition: blob_fwd.hpp:60
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/socket__stats_8cpp.html b/doc/flow_doc/generated/html_full/socket__stats_8cpp.html index b931614b9..b2a4bf69e 100644 --- a/doc/flow_doc/generated/html_full/socket__stats_8cpp.html +++ b/doc/flow_doc/generated/html_full/socket__stats_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/socket__stats_8cpp_source.html b/doc/flow_doc/generated/html_full/socket__stats_8cpp_source.html index 3b349c58f..c70e73b53 100644 --- a/doc/flow_doc/generated/html_full/socket__stats_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/socket__stats_8cpp_source.html @@ -468,7 +468,7 @@ diff --git a/doc/flow_doc/generated/html_full/socket__stats_8hpp.html b/doc/flow_doc/generated/html_full/socket__stats_8hpp.html index 2387e24b1..24f5cece8 100644 --- a/doc/flow_doc/generated/html_full/socket__stats_8hpp.html +++ b/doc/flow_doc/generated/html_full/socket__stats_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/socket__stats_8hpp_source.html b/doc/flow_doc/generated/html_full/socket__stats_8hpp_source.html index ae615afc3..f44a3e883 100644 --- a/doc/flow_doc/generated/html_full/socket__stats_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/socket__stats_8hpp_source.html @@ -535,7 +535,7 @@ diff --git a/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp.html b/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp.html index 4ae82058b..8b3533291 100644 --- a/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp.html +++ b/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp_source.html b/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp_source.html index 3ec7db92a..200663b66 100644 --- a/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/static__cfg__manager_8hpp_source.html @@ -439,7 +439,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__ostream_8cpp.html b/doc/flow_doc/generated/html_full/string__ostream_8cpp.html index e3b43efe3..db28df530 100644 --- a/doc/flow_doc/generated/html_full/string__ostream_8cpp.html +++ b/doc/flow_doc/generated/html_full/string__ostream_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__ostream_8cpp_source.html b/doc/flow_doc/generated/html_full/string__ostream_8cpp_source.html index 4a041c03c..5acfea8f0 100644 --- a/doc/flow_doc/generated/html_full/string__ostream_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/string__ostream_8cpp_source.html @@ -134,7 +134,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__ostream_8hpp.html b/doc/flow_doc/generated/html_full/string__ostream_8hpp.html index f67739aa0..0bbc0a991 100644 --- a/doc/flow_doc/generated/html_full/string__ostream_8hpp.html +++ b/doc/flow_doc/generated/html_full/string__ostream_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__ostream_8hpp_source.html b/doc/flow_doc/generated/html_full/string__ostream_8hpp_source.html index ba18ac81b..c72f6a725 100644 --- a/doc/flow_doc/generated/html_full/string__ostream_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/string__ostream_8hpp_source.html @@ -214,7 +214,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__view_8hpp.html b/doc/flow_doc/generated/html_full/string__view_8hpp.html index c004b65ce..04984f211 100644 --- a/doc/flow_doc/generated/html_full/string__view_8hpp.html +++ b/doc/flow_doc/generated/html_full/string__view_8hpp.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_full/string__view_8hpp_source.html b/doc/flow_doc/generated/html_full/string__view_8hpp_source.html index 1ac8a09a7..bca0a6c0e 100644 --- a/doc/flow_doc/generated/html_full/string__view_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/string__view_8hpp_source.html @@ -380,7 +380,7 @@ diff --git a/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html b/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html index 66aa6c668..cbd32da4e 100644 --- a/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html +++ b/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html @@ -77,7 +77,7 @@
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html b/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html index e5d5fae62..39bb7fef0 100644 --- a/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html +++ b/doc/flow_doc/generated/html_full/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html @@ -129,7 +129,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html index ed26e7bfe..b74cfb84e 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html index dc32fdd23..f472afca4 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html @@ -152,7 +152,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func-members.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func-members.html index f34d176a7..2305359de 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func.html index 9501b09f1..e304bf781 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Final__validator__func.html @@ -174,7 +174,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set-members.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set-members.html index 75acd51dd..2a2e74d00 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set.html index 1414260ec..dff4f3cc6 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Null__value__set.html @@ -125,7 +125,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html index 12be8ed4f..80010d591 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html index 4424433da..d3b4a07b4 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html @@ -417,7 +417,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request-members.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request-members.html index 6232735ca..128028f4e 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request.html index e68c9094f..3c5a6c388 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Log__request.html @@ -192,7 +192,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html index 58d52faf8..666851aba 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html index 722c15719..403edcdb0 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html @@ -162,7 +162,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config-members.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config-members.html index 7fdefc3d0..e7d99d915 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config.html index 145a574c9..fbee1811b 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Config_1_1Component__config.html @@ -119,7 +119,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata-members.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata-members.html index d55e1de3d..c2cf34e92 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata-members.html @@ -84,7 +84,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata.html b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata.html index acccf93ff..69557687a 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1log_1_1Msg__metadata.html @@ -300,7 +300,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet-members.html index 1b3ae3761..3a92dc32f 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet-members.html @@ -131,7 +131,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet.html index 44f5da396..678928e6d 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet.html @@ -306,7 +306,7 @@

                                                                                                                                  The mechanics of individual acks are further explored in the doc header for Ack_packet::Individual_ack nested struct.

                                                                                                                                  Todo:
                                                                                                                                  Conceivably, since Ack_packet actually stores 1+ acknowledgments, it should become Acks_packet, of type ACKS (not ACK). Many comments and log messages would become clearer, as no one would assume an individual packet's acknowledgment when reading "an ACK" or similar phrase.
                                                                                                                                  -

                                                                                                                                  Definition at line 1019 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1020 of file low_lvl_packet.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ ack_delay_t

                                                                                                                                  @@ -325,7 +325,7 @@

                                                                                                                                  net_flow used the unit milliseconds and the encoding type uint16_t. The reasoning was that this allowed a maximum ACK delay of ~65 sec which should be plenty; and that the 1-millisecond finegrainedness was acceptable. However when implementing queue delay-based congestion control (like FAST or Vegas) we realized it is important for RTTs (which use the ACK delay value) to be quite precise (microsecond level or so). Therefore, to be totally safe, we choose to use the same units as Fine_duration, which is how we compute all time periods. As for the the encoding width, we use 64 bits just in case.

                                                                                                                                  Todo:
                                                                                                                                  Reconsider the encoding width. If Ack_delay_time_unit(1) is a nanosecond, then 32 bits would support a maximum delay of ~4.1 seconds which is likely fine for most real-world scenarios. This would reduce the size of ACK packets quite a bit.
                                                                                                                                  -

                                                                                                                                  Definition at line 1039 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1040 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -343,7 +343,7 @@

                                                                                                                                  ack_delay_t value 1; and proportionally further.

                                                                                                                                  -

                                                                                                                                  Definition at line 1042 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1043 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -441,7 +441,7 @@

                                                                                                                                  Definition at line 785 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::net_flow::Low_lvl_packet::m_opt_rexmit_on, m_rcv_acked_packets, m_rcv_acked_packets_rexmit_out_size, m_rcv_wnd, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_TRACE, FLOW_LOG_WARNING, flow::net_flow::Low_lvl_packet::m_opt_rexmit_on, m_rcv_acked_packets, m_rcv_acked_packets_rexmit_out_size, m_rcv_wnd, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -573,7 +573,7 @@

                                                                                                                                  Individual_acks may be duplicates of each other (same Sequence_number, possibly different delay values). It's up to the sender (receiver of ACK) to sort it out. However, again, they MUST be ordered chronologicaly based on the time when they were received; from earliest to latest.

                                                                                                                                  Storing shared pointers to avoid copying of structs (however small) during internal reshuffling; shared instead of raw pointers to not worry about delete.

                                                                                                                                  -

                                                                                                                                  Definition at line 1115 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1116 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -595,7 +595,7 @@

                                                                                                                                  Individual_ack_rexmit_off doc header about how this is used for efficient serialization of Ack_packet.

                                                                                                                                  This is used if and only if Ack_packet is outgoing, and retransmission is disabled. See m_rcv_acked_packets for the incoming scenario.

                                                                                                                                  -

                                                                                                                                  Definition at line 1125 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1126 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -613,7 +613,7 @@

                                                                                                                                  m_rcv_acked_packets_rexmit_off_out but for retransmission enabled.

                                                                                                                                  -

                                                                                                                                  Definition at line 1128 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1129 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -640,7 +640,7 @@

                                                                                                                                  Low_lvl_packet::serialize_to_raw_data() needs to serialize that value. Outside serialization size() is used directly, and this value is meaningless.

                                                                                                                                  -

                                                                                                                                  Definition at line 1062 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1063 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -660,7 +660,7 @@

                                                                                                                                  Definition at line 1051 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1052 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -688,7 +688,7 @@

                                                                                                                                  Definition at line 1131 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1132 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -699,7 +699,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack-members.html index 448cb02c1..6c36fa00b 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack-members.html @@ -74,17 +74,15 @@

                                                                                                                                  This is the complete list of members for flow::net_flow::Ack_packet::Individual_ack, including all inherited members.

                                                                                                                                  - - - - - + + +
                                                                                                                                  Const_ptr typedefflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  Individual_ack()=deleteflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  Individual_ack(const Individual_ack &)=deleteflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_delayflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_rexmit_idflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_seq_numflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  operator=(const Individual_ack &)=deleteflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_ncflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_rexmit_idflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  m_seq_numflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  Ptr typedefflow::net_flow::Ack_packet::Individual_ack
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html index 8b8e1fe29..a1109b37c 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack.html @@ -69,7 +69,6 @@
                                                                                                                                  flow::net_flow::Ack_packet::Individual_ack Struct Reference
                                                                                                                                  @@ -83,7 +82,7 @@
                                                                                                                                  Collaboration diagram for flow::net_flow::Ack_packet::Individual_ack:
                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  [legend]
                                                                                                                                  @@ -96,21 +95,6 @@
                                                                                                                                   Short-hand for ref-counted pointer to immutable objects of this class. More...
                                                                                                                                   
                                                                                                                                  - - - - - - - - - - -

                                                                                                                                  -Public Member Functions

                                                                                                                                  Individual_ack ()=delete
                                                                                                                                   Force direct member initialization even if no member is const.
                                                                                                                                   
                                                                                                                                  Individual_ack (const Individual_ack &)=delete
                                                                                                                                   Forbid copy construction.
                                                                                                                                   
                                                                                                                                  -void operator= (const Individual_ack &)=delete
                                                                                                                                   Forbid copy assignment.
                                                                                                                                   
                                                                                                                                  @@ -122,12 +106,15 @@ + + +

                                                                                                                                  Public Attributes

                                                                                                                                  Sequence_number m_seq_num
                                                                                                                                  const unsigned int m_rexmit_id
                                                                                                                                   Retransmit counter of the acknowledged Data_packet. More...
                                                                                                                                   
                                                                                                                                  util::Noncopyable m_nc {}
                                                                                                                                   Make us noncopyable without breaking aggregateness (direct-init). More...
                                                                                                                                   

                                                                                                                                  Detailed Description

                                                                                                                                  Specifies the incoming (post-deserialization) acknowledgment of a single received Data_packet.

                                                                                                                                  It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged. Construct this by direct member initialization.

                                                                                                                                  -

                                                                                                                                  Definition at line 1194 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1195 of file low_lvl_packet.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ Const_ptr

                                                                                                                                  @@ -143,7 +130,7 @@

                                                                                                                                  Definition at line 1203 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1204 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -161,7 +148,7 @@

                                                                                                                                  Definition at line 1200 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1201 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -180,7 +167,25 @@

                                                                                                                                  Definition at line 1214 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1215 of file low_lvl_packet.hpp.

                                                                                                                                  + + + + +

                                                                                                                                  ◆ m_nc

                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + + + +
                                                                                                                                  util::Noncopyable flow::net_flow::Ack_packet::Individual_ack::m_nc {}
                                                                                                                                  +
                                                                                                                                  + +

                                                                                                                                  Make us noncopyable without breaking aggregateness (direct-init).

                                                                                                                                  + +

                                                                                                                                  Definition at line 1225 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -199,7 +204,7 @@

                                                                                                                                  Data_packet.

                                                                                                                                  Identifies which attempt we are acknowledging (0 = initial, 1 = first retransmit, 2 = second retransmit, ...). Literally this equals the acked Data_packet::m_rexmit_id. Always 0 if retransmission is disabled for the given socket.

                                                                                                                                  -

                                                                                                                                  Definition at line 1221 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1222 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -218,7 +223,7 @@

                                                                                                                                  Sequence_number::set_metadata().

                                                                                                                                  -

                                                                                                                                  Definition at line 1211 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1212 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -228,7 +233,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.map b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.map index c9b6ece01..1c27efb96 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.map +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.map @@ -1,9 +1,10 @@ - - - - - - - + + + + + + + + diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.md5 b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.md5 index bdc66d2d3..91a6b76ec 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.md5 +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.md5 @@ -1 +1 @@ -31e8fb35cbaf778882cf1308d9e661e5 \ No newline at end of file +b65e91307ba68723b899d0560bc41201 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.svg b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.svg index dff55184a..12279d818 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.svg +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__coll__graph.svg @@ -4,18 +4,18 @@ - - + + flow::net_flow::Ack_packet::Individual_ack - + Node1 - -flow::net_flow::Ack -_packet::Individual_ack + +flow::net_flow::Ack +_packet::Individual_ack @@ -23,99 +23,115 @@ Node2 - -flow::net_flow::Sequence -_number + +flow::net_flow::Sequence +_number Node2->Node1 - - - m_seq_num + + + m_seq_num Node3 - -uint64_t + +uint64_t Node3->Node2 - - - m_num -m_zero_point_num + + + m_num +m_zero_point_num Node4 - -char + +char Node4->Node2 - - - m_num_line_id + + + m_num_line_id Node5 - -int64_t + +int64_t Node5->Node2 - - - m_multiple_size + + + m_multiple_size Node6 - -const Fine_duration + +const Fine_duration Node6->Node1 - - - m_delay + + + m_delay Node7 - -const unsigned int + +const unsigned int Node7->Node1 - - - m_rexmit_id + + + m_rexmit_id + + + +Node8 + + +flow::util::Noncopyable + + + + + +Node8->Node1 + + + m_nc diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off-members.html index 3dd98ec17..d72e585ea 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html index 3cc65a1e9..59af29d2c 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__off.html @@ -106,7 +106,7 @@

                                                                                                                                  Assuming network byte order equals native byte order, and given that tight struct field packing is enabled throughout this code, one can arrange a tight array of these structs and transmit that entire array over the network with no need for scatter/gather or any additional transformation of data post-construction and pushing onto aforementioned array. These are copy-constructible, for pushing onto containers and such, but not assignable to avoid unnecessary copying. Update: A later version of clang does not like this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff; it's internal code; we should be fine.

                                                                                                                                  See also
                                                                                                                                  Historical note in Ack_packet::serialize_to_raw_data() explains why this and Individual_ack_rexmit_on both exist, instead of simply using Individual_ack in both directions.
                                                                                                                                  -

                                                                                                                                  Definition at line 1253 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1250 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Individual_ack_rexmit_off()

                                                                                                                                  @@ -170,7 +170,7 @@

                                                                                                                                  Individual_ack::m_delay; this is in Ack_delay_time_unit(1) multiples.

                                                                                                                                  -

                                                                                                                                  Definition at line 1261 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1258 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -188,7 +188,7 @@

                                                                                                                                  Individual_ack::m_seq_num and Sequence_number::raw_num_ref().

                                                                                                                                  -

                                                                                                                                  Definition at line 1258 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1255 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -199,7 +199,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on-members.html index fb217d369..f7370b2b4 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html index 4a819098c..06977ea14 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Ack__packet_1_1Individual__ack__rexmit__on.html @@ -104,7 +104,7 @@

                                                                                                                                  Detailed Description

                                                                                                                                  Equivalent of Individual_ack_rexmit_off but for sockets with retransmission enabled.

                                                                                                                                  -

                                                                                                                                  Definition at line 1285 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1282 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Individual_ack_rexmit_on()

                                                                                                                                  @@ -175,7 +175,7 @@

                                                                                                                                  Individual_ack_rexmit_off and Individual_ack_rexmit_on.

                                                                                                                                  -

                                                                                                                                  Definition at line 1290 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1287 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -193,7 +193,7 @@

                                                                                                                                  Individual_ack::m_rexmit_id but note the type difference.

                                                                                                                                  -

                                                                                                                                  Definition at line 1293 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1290 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -204,7 +204,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet-members.html index 6be4ef4c1..fd69b9b6f 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet-members.html @@ -128,7 +128,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet.html index 49fd87780..becbd0da3 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Data__packet.html @@ -285,7 +285,7 @@

                                                                                                                                  See Low_lvl_packet doc header for information common to all low-level packets including this one.

                                                                                                                                  Each DATA packet contains actual data payload packetized from the application-provided stream of bytes. It is identified by the sequence number (encoded in this object) of the first byte of that payload. An individual acknowledgment inside an Ack_packet refers to the Data_packet by that first sequence number. If Low_lvl_packet::m_opt_rexmit_on is true, then m_rexmit_id identifies which attempt at sending the payload with this sequence number and payload this packet represents: 0 is 1st attempt, 1 is 1st retry, 2 is 2nd retry, etc. If that option is off, then a lost packet is never retransmitted; and therefore m_rexmit_id is always 0.

                                                                                                                                  -

                                                                                                                                  Definition at line 892 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 893 of file low_lvl_packet.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ rexmit_id_t

                                                                                                                                  @@ -302,7 +302,7 @@

                                                                                                                                  Definition at line 902 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 903 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -400,7 +400,7 @@

                                                                                                                                  Definition at line 655 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_TRACE, FLOW_LOG_WARNING, m_data, m_data_size_raw, flow::net_flow::Low_lvl_packet::m_opt_rexmit_on, m_rexmit_id, m_seq_num, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_TRACE, FLOW_LOG_WARNING, m_data, m_data_size_raw, flow::net_flow::Low_lvl_packet::m_opt_rexmit_on, m_rexmit_id, m_seq_num, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -499,7 +499,7 @@

                                                                                                                                  Definition at line 968 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::buffers_to_ostream(), and flow::net_flow::Low_lvl_packet::to_ostream().

                                                                                                                                  +

                                                                                                                                  References flow::util::buffers_to_ostream(), and flow::net_flow::Low_lvl_packet::to_ostream().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -526,7 +526,7 @@

                                                                                                                                  Data_packet::deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  -

                                                                                                                                  Definition at line 933 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 934 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -555,7 +555,7 @@

                                                                                                                                  m_data).

                                                                                                                                  We send this value, even though it could be figured out from the overall serialized size, to ensure integrity (see the deserialization logic for details). This here is set to m_data.size(), when Low_lvl_packet::serialize_to_raw_data() needs to serialize that value. Outside serialization m_data.size() is used directly, and this value is meaningless.

                                                                                                                                  -

                                                                                                                                  Definition at line 925 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 926 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -576,7 +576,7 @@

                                                                                                                                  Definition at line 916 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 917 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -597,7 +597,7 @@

                                                                                                                                  m_data cannot be empty, so m_seq_num is always meaningful.

                                                                                                                                  -

                                                                                                                                  Definition at line 910 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 911 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -625,7 +625,7 @@

                                                                                                                                  Definition at line 944 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 945 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -636,7 +636,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet-members.html index 95b006b8a..ad41e32e9 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet-members.html @@ -121,7 +121,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet.html index 120ac239f..6ce735386 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet.html @@ -318,7 +318,7 @@

                                                                                                                                  Packed structures, stored integers, and alignment

                                                                                                                                  Some effort is made to keep fields aligned along word edges when serializing. There is not too much of that as of this writing, but we should remain vigilant as packet formats become more complex over time.

                                                                                                                                  Todo:
                                                                                                                                  With C++11, some lines of code could be eliminated by using using for Low_lvl_packet sub-types to inherit the constructor(s) of Low_lvl_packet. (For some of the sub-types an explicit constructor would still be necessary, but it would just shadow the inherited one, which is fine and still saves lines in the other sub-types.) However, for now I've left it as-is, partially to be friendly to the Doxygen documentation generator, and partially to make the interface easy to read. Still, it may be better the other way.
                                                                                                                                  -

                                                                                                                                  Definition at line 164 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 165 of file low_lvl_packet.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ Const_buffer

                                                                                                                                  @@ -335,7 +335,7 @@

                                                                                                                                  Todo:
                                                                                                                                  Consider moving alias Low_lvl_packet::Const_buffer to util namespace or even outside it, as it is used commonly (or boost::asio::const_buffer is used where Const_buffer could be used for readability).
                                                                                                                                  -

                                                                                                                                  Definition at line 179 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 180 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -354,7 +354,7 @@

                                                                                                                                  Definition at line 188 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 189 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -372,7 +372,7 @@

                                                                                                                                  Definition at line 202 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 203 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -391,7 +391,7 @@

                                                                                                                                  Definition at line 199 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 200 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -409,7 +409,7 @@

                                                                                                                                  Definition at line 191 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 192 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -517,7 +517,7 @@

                                                                                                                                  Definition at line 381 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, FLOW_LOG_WARNING, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), m_aux_raw_data, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_opt_rexmit_on_raw, m_packed, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_reserved2, flow::log::S_DATA, flow::log::S_TRACE, flow::log::Logger::should_log(), and type_id_native_to_raw().

                                                                                                                                  +

                                                                                                                                  References flow::util::buffers_dump_string(), FLOW_LOG_DATA, FLOW_LOG_SET_CONTEXT, FLOW_LOG_TRACE, FLOW_LOG_WARNING, FLOW_LOG_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), m_aux_raw_data, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_opt_rexmit_on_raw, m_packed, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_reserved2, flow::log::S_DATA, flow::log::S_TRACE, flow::log::Logger::should_log(), and type_id_native_to_raw().

                                                                                                                                  Referenced by flow::net_flow::Node::handle_incoming().

                                                                                                                                  @@ -567,7 +567,7 @@

                                                                                                                                  // ^-- Low_lvl_packet_sub was inferred to be Ack_packet based on the left hand side of the assignment.
                                                                                                                                  Logger * get_logger() const
                                                                                                                                  Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.
                                                                                                                                  Definition: log.cpp:225
                                                                                                                                  -
                                                                                                                                  static boost::shared_ptr< Low_lvl_packet_sub > create_uninit_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type spec...
                                                                                                                                  +
                                                                                                                                  static boost::shared_ptr< Low_lvl_packet_sub > create_uninit_packet(log::Logger *logger_ptr)
                                                                                                                                  Constructs packet with uninitialized (essentially random) values, of the Low_lvl_packet sub-type spec...

                                                                                                                                  Template Parameters
                                                                                                                                  @@ -582,7 +582,7 @@

                                                                                                                                  Returns
                                                                                                                                  Ref-counted pointer to newly created object of the specified type. If you need an up-cast pointer, use create_uninit_packet_base().
                                                                                                                                  -

                                                                                                                                  Definition at line 1388 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1385 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -621,7 +621,7 @@

                                                                                                                                  Returns
                                                                                                                                  See create_uninit_packet() (but cast to a type compatible with the polymorphic base type).
                                                                                                                                  -

                                                                                                                                  Definition at line 1399 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1396 of file low_lvl_packet.hpp.

                                                                                                                                  References flow::util::Shared_ptr_alias_holder< boost::shared_ptr< Low_lvl_packet > >::ptr_cast().

                                                                                                                                  @@ -716,7 +716,7 @@

                                                                                                                                  Returns
                                                                                                                                  See above.
                                                                                                                                  -

                                                                                                                                  Definition at line 1404 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1401 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -755,7 +755,7 @@

                                                                                                                                  Definition at line 159 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References m_aux_raw_data, m_opt_rexmit_on, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_opt_rexmit_on_raw, m_packed, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_reserved2, and type_id_native_to_raw().

                                                                                                                                  +

                                                                                                                                  References m_aux_raw_data, m_opt_rexmit_on, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_opt_rexmit_on_raw, m_packed, flow::net_flow::Low_lvl_packet::Aux_raw_data::m_reserved2, and type_id_native_to_raw().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -841,7 +841,7 @@

                                                                                                                                  Definition at line 130 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::buffers_dump_string(), FLOW_LOG_DATA_WITHOUT_CHECKING, FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), m_type_ostream_manip, flow::log::S_DATA, flow::log::S_TRACE, and serialize_to_raw_data().

                                                                                                                                  +

                                                                                                                                  References flow::util::buffers_dump_string(), FLOW_LOG_DATA_WITHOUT_CHECKING, FLOW_LOG_TRACE_WITHOUT_CHECKING, flow::log::Log_context::get_log_component(), flow::log::Log_context::get_logger(), m_type_ostream_manip, flow::log::S_DATA, flow::log::S_TRACE, and serialize_to_raw_data().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -949,7 +949,7 @@

                                                                                                                                  Implementation note

                                                                                                                                  Definition at line 119 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO.

                                                                                                                                  +

                                                                                                                                  References S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO.

                                                                                                                                  Referenced by create_from_raw_data_packet(), and serialize_common_header_to_raw_data().

                                                                                                                                  @@ -996,7 +996,7 @@

                                                                                                                                  Definition at line 108 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO.

                                                                                                                                  +

                                                                                                                                  References S_NATIVE_TYPE_ID_TO_PACKET_TYPE_INFO.

                                                                                                                                  Referenced by flow::net_flow::Peer_socket_info::output_pkt_count_key(), and type_to_ostream().

                                                                                                                                  @@ -1088,7 +1088,7 @@

                                                                                                                                  Aux_raw_data.

                                                                                                                                  It is declared mutable, because the conceptual state contained within a Low_lvl_packet is expressed via its public non-const data members. m_aux_raw_data is merely a helper data store for the const method serialize_to_raw_data(). Since that method is const, this should be mutable, like a performance cache of sorts, only not exactly.

                                                                                                                                  -

                                                                                                                                  Definition at line 571 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 572 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by create_from_raw_data_packet(), and serialize_common_header_to_raw_data().

                                                                                                                                  @@ -1108,7 +1108,7 @@

                                                                                                                                  Definition at line 251 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 252 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -1126,7 +1126,7 @@

                                                                                                                                  Node.

                                                                                                                                  -

                                                                                                                                  Definition at line 233 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 234 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -1146,7 +1146,7 @@

                                                                                                                                  Definition at line 222 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 223 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by flow::net_flow::Data_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Ack_packet::deserialize_type_specific_data_from_raw_data_packet(), and serialize_common_header_to_raw_data().

                                                                                                                                  @@ -1166,7 +1166,7 @@

                                                                                                                                  Node.

                                                                                                                                  -

                                                                                                                                  Definition at line 231 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 232 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -1184,7 +1184,7 @@

                                                                                                                                  -

                                                                                                                                  Definition at line 245 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 246 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by flow::net_flow::Syn_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Syn_ack_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Syn_ack_ack_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Data_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Ack_packet::deserialize_type_specific_data_from_raw_data_packet(), flow::net_flow::Rst_packet::deserialize_type_specific_data_from_raw_data_packet(), and serialize_to_raw_data_and_log().

                                                                                                                                  @@ -1204,7 +1204,7 @@

                                                                                                                                  Definition at line 248 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 249 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -1233,7 +1233,7 @@

                                                                                                                                  Low_lvl_packet sub-type.) I could explain at length all the reasons why the chosen way is superior, but let me just give you the conclusion: I originally tried it the virtual/switch way. Instead of the raw type IDs and string descriptions being conveniently encapsulated in the present map (where there's little to no chance of conflicting values), they were distributed across virtual implementations. This was less maintainable; nor did it improve OO style, since the raw type ID values (at least) were still inter-dependent (were not allowed to conflict) in any case. The present solution does not pretend the actual contents of these values are of no interest to Low_lvl_packet itself (as opposed to the sub-types), and in not having to pretend this, all related code is quite a bit more compact and a bit more maintainable as well.

                                                                                                                                  -

                                                                                                                                  Definition at line 558 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 559 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by type_id_native_to_raw(), and type_id_to_str().

                                                                                                                                  @@ -1246,7 +1246,7 @@

                                                                                                                                  Implementation note

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data-members.html index 02c8182a3..f23b498f2 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data-members.html @@ -79,7 +79,7 @@

                                                                                                                                  Low_lvl_packet_subAny type deriving from Low_lvl_packet.
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html index 13a3e0a98..cd3f21345 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Aux__raw__data.html @@ -109,7 +109,7 @@

                                                                                                                                  Helper data store type for storing binary data needed by serialize_to_raw_data(), when certains bits are not already represented by the public data members present in struct Low_lvl_packet.

                                                                                                                                  The need for this is somewhat subtle and is explained fully inside Low_lvl_packet::serialize_to_raw_data(), so I won't go into it here. Also see each data member's doc header.

                                                                                                                                  -

                                                                                                                                  Definition at line 438 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 439 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Aux_raw_data()

                                                                                                                                  @@ -156,7 +156,7 @@

                                                                                                                                  Low_lvl_packet::m_opt_rexmit_on.

                                                                                                                                  Since the latter is of a more civilized bool type, and we need a single byte version, this here is set to the obvious encoding of the bool, when Low_lvl_packet::serialize_to_raw_data() needs to serialize said bool.

                                                                                                                                  -

                                                                                                                                  Definition at line 447 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 448 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), and flow::net_flow::Low_lvl_packet::serialize_common_header_to_raw_data().

                                                                                                                                  @@ -177,7 +177,7 @@

                                                                                                                                  Low_lvl_packet has no need of a public data member like this, we keep it in here, as needed for Low_lvl_packet::serialize_to_raw_data().

                                                                                                                                  -

                                                                                                                                  Definition at line 454 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 455 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by flow::net_flow::Low_lvl_packet::create_from_raw_data_packet(), and flow::net_flow::Low_lvl_packet::serialize_common_header_to_raw_data().

                                                                                                                                  @@ -190,7 +190,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info-members.html index 45585943a..f71a859b7 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html index b7ab15feb..d32dcf789 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Low__lvl__packet_1_1Packet__type__info.html @@ -95,7 +95,7 @@

                                                                                                                                  Detailed Description

                                                                                                                                  A simple, unmodifiable data store that contains the properties unique to each packet type a/k/a concrete sub-type of Low_lvl_packet.

                                                                                                                                  -

                                                                                                                                  Definition at line 468 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 469 of file low_lvl_packet.hpp.

                                                                                                                                  Member Data Documentation

                                                                                                                                  ◆ m_raw_type_id

                                                                                                                                  @@ -111,7 +111,7 @@

                                                                                                                                  Definition at line 471 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 472 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -129,7 +129,7 @@

                                                                                                                                  Low_lvl_packet::type_id_to_str().

                                                                                                                                  -

                                                                                                                                  Definition at line 474 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 475 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -139,7 +139,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id-members.html index 9600d31f9..a6151ced9 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id.html index 6034cc6aa..c5cc9533b 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node_1_1Socket__id.html @@ -271,7 +271,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options-members.html index 034855966..32ea8b721 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options-members.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options.html index 08156b5dd..bbf166739 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Node__options.html @@ -785,7 +785,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack-members.html index 15fd8c669..4fbc7ae09 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack-members.html @@ -74,17 +74,16 @@

                                                                                                                                  This is the complete list of members for flow::net_flow::Peer_socket::Individual_ack, including all inherited members.

                                                                                                                                  - - + + - - +
                                                                                                                                  Const_ptr typedefflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  Individual_ack(const Individual_ack &)=deleteflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_data_sizeflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_data_sizeflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_ncflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_received_whenflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_rexmit_idflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  m_seq_numflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  operator=(const Individual_ack &)=deleteflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  Ptr typedefflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  Ptr typedefflow::net_flow::Peer_socket::Individual_ack
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html index b4035eafa..15e387bec 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack.html @@ -69,7 +69,6 @@
                                                                                                                                  flow::net_flow::Peer_socket::Individual_ack Struct Reference
                                                                                                                                  @@ -81,7 +80,7 @@
                                                                                                                                  Collaboration diagram for flow::net_flow::Peer_socket::Individual_ack:
                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  [legend]
                                                                                                                                  @@ -94,17 +93,6 @@
                                                                                                                                   Short-hand for ref-counted pointer to immutable objects of this class. More...
                                                                                                                                   
                                                                                                                                  - - - - - - - -

                                                                                                                                  -Public Member Functions

                                                                                                                                  Individual_ack (const Individual_ack &)=delete
                                                                                                                                   Force direct member initialization even if no member is const.
                                                                                                                                   
                                                                                                                                  -Individual_ackoperator= (const Individual_ack &)=delete
                                                                                                                                   Forbid copy assignment.
                                                                                                                                   
                                                                                                                                  @@ -119,12 +107,15 @@ + + +

                                                                                                                                  Public Attributes

                                                                                                                                  const Sequence_number m_seq_num
                                                                                                                                  const size_t m_data_size
                                                                                                                                   Number of bytes in the packet's user data. More...
                                                                                                                                   
                                                                                                                                  util::Noncopyable m_nc {}
                                                                                                                                   Make us noncopyable without breaking aggregateness (direct-init). More...
                                                                                                                                   

                                                                                                                                  Detailed Description

                                                                                                                                  Metadata describing the data sent in the acknowledgment of an individual received packet.

                                                                                                                                  (A low-level ACK packet may include several sets of such data.) This is purely a data store, not a class. It is not copyable, and moving them around by smart Individual_ack::Ptr is encouraged. Construct this by direct member initialization.

                                                                                                                                  -

                                                                                                                                  Definition at line 2382 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2383 of file peer_socket.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ Const_ptr

                                                                                                                                  @@ -140,7 +131,7 @@

                                                                                                                                  Definition at line 2391 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2392 of file peer_socket.hpp.

                                                                                                                                  @@ -158,7 +149,7 @@

                                                                                                                                  Definition at line 2388 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2389 of file peer_socket.hpp.

                                                                                                                                  @@ -177,7 +168,25 @@

                                                                                                                                  Definition at line 2409 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2410 of file peer_socket.hpp.

                                                                                                                                  + + + + +

                                                                                                                                  ◆ m_nc

                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + + + +
                                                                                                                                  util::Noncopyable flow::net_flow::Peer_socket::Individual_ack::m_nc {}
                                                                                                                                  +
                                                                                                                                  + +

                                                                                                                                  Make us noncopyable without breaking aggregateness (direct-init).

                                                                                                                                  + +

                                                                                                                                  Definition at line 2413 of file peer_socket.hpp.

                                                                                                                                  @@ -195,7 +204,7 @@

                                                                                                                                  Definition at line 2406 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2407 of file peer_socket.hpp.

                                                                                                                                  @@ -214,7 +223,7 @@

                                                                                                                                  Definition at line 2403 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2404 of file peer_socket.hpp.

                                                                                                                                  @@ -232,7 +241,7 @@

                                                                                                                                  Definition at line 2396 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2397 of file peer_socket.hpp.

                                                                                                                                  @@ -242,7 +251,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.map b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.map index 049dc280a..89ff8ed24 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.map +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.map @@ -1,10 +1,11 @@ - - - - - - - - + + + + + + + + + diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.md5 b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.md5 index 42021bba4..40d8f11ef 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.md5 +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.md5 @@ -1 +1 @@ -eeb4c788126649fc92dce136e21b2ad7 \ No newline at end of file +148e570ac1d56b9b99994ce2de9bb985 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.svg b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.svg index 7d5ef9a59..c77df284e 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.svg +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Individual__ack__coll__graph.svg @@ -4,18 +4,18 @@ - - + + flow::net_flow::Peer_socket::Individual_ack - + Node1 - -flow::net_flow::Peer -_socket::Individual_ack + +flow::net_flow::Peer +_socket::Individual_ack @@ -23,115 +23,131 @@ Node2 - -flow::net_flow::Sequence -_number + +flow::net_flow::Sequence +_number Node2->Node1 - - - m_seq_num + + + m_seq_num Node3 - -uint64_t + +uint64_t Node3->Node2 - - - m_num -m_zero_point_num + + + m_num +m_zero_point_num Node4 - -char + +char Node4->Node2 - - - m_num_line_id + + + m_num_line_id Node5 - -int64_t + +int64_t Node5->Node2 - - - m_multiple_size + + + m_multiple_size Node6 - -const unsigned int + +const unsigned int Node6->Node1 - - - m_rexmit_id + + + m_rexmit_id Node7 - -const Fine_time_pt + +const Fine_time_pt Node7->Node1 - - - m_received_when + + + m_received_when Node8 - -const size_t + +const size_t Node8->Node1 - - - m_data_size + + + m_data_size + + + +Node9 + + +flow::util::Noncopyable + + + + + +Node9->Node1 + + + m_nc diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet-members.html index eceaf3f7f..f8fdfeb4e 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet-members.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html index e8a8c8792..52fbfa11a 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Received__packet.html @@ -132,7 +132,7 @@

                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been received (and, if retransmission is off, copied to Receive buffer).

                                                                                                                                  This is purely a data store, not a class. It is not copyable, and moving them around by smart Received_packet::Ptr is encouraged.

                                                                                                                                  -

                                                                                                                                  Definition at line 2337 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2338 of file peer_socket.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Received_packet()

                                                                                                                                  @@ -186,7 +186,7 @@

                                                                                                                                  Definition at line 451 of file peer_socket.cpp.

                                                                                                                                  -

                                                                                                                                  References m_data, and m_size.

                                                                                                                                  +

                                                                                                                                  References m_data, and m_size.

                                                                                                                                  @@ -206,7 +206,7 @@

                                                                                                                                  Data_packet::m_data of the packet.

                                                                                                                                  Kept empty() if retransmission is off, since in that mode any received packet's m_data is immediately moved to Receive buffer. With retransmission on, it is stored until all gaps before the packet are filled (a/k/a reassembly).

                                                                                                                                  -

                                                                                                                                  Definition at line 2353 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2354 of file peer_socket.hpp.

                                                                                                                                  Referenced by Received_packet(), and flow::net_flow::Node::sock_slide_rcv_next_seq_num().

                                                                                                                                  @@ -226,7 +226,7 @@

                                                                                                                                  Data_packet::m_data field of that packet.

                                                                                                                                  -

                                                                                                                                  Definition at line 2345 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2346 of file peer_socket.hpp.

                                                                                                                                  Referenced by Received_packet(), and flow::net_flow::Node::sock_slide_rcv_next_seq_num().

                                                                                                                                  @@ -239,7 +239,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet-members.html index 3f271ce84..e5b3f0d88 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet-members.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html index 4e9faa549..a9322fc09 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet.html @@ -152,7 +152,7 @@

                                                                                                                                  Metadata (and data, if retransmission is on) for a packet that has been sent one (if retransmission is off) or possibly more (if on) times.

                                                                                                                                  This is purely a data store, not a class. It is not copyable, and moving them around by smart Sent_packet::Ptr is encouraged.

                                                                                                                                  -

                                                                                                                                  Definition at line 2177 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2178 of file peer_socket.hpp.

                                                                                                                                  Member Typedef Documentation

                                                                                                                                  ◆ ack_count_t

                                                                                                                                  @@ -169,7 +169,7 @@

                                                                                                                                  m_acks_after_me.

                                                                                                                                  Use a small type to save memory; this is easily large enough, given that that we drop a packet after m_acks_after_me exceeds a very small value (< 10), and a given ACK can conceivably hold a few thousand individual acknowledgments (most likely many fewer). In fact uint8_t is probably enough, but it seemed easier to not worry about overflows when doing arithmetic with these.

                                                                                                                                  -

                                                                                                                                  Definition at line 2193 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2194 of file peer_socket.hpp.

                                                                                                                                  @@ -247,9 +247,9 @@

                                                                                                                                  sequence number but rather with send time, as ordered via the order number. E.g., due to retransmission, *this may have sequence number greater than another packet yet have the lesser order number. (This dichotomy is mentioned a lot, everywhere, and if I'm overdoing it, it's only because sometimes TCP cumulative-ack habits die hard, so I have to keep reminding myself.) (If retransmission is disabled, however, then sequence number order = order number order.)

                                                                                                                                  -

                                                                                                                                  Definition at line 2239 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2240 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks().

                                                                                                                                  @@ -270,9 +270,9 @@

                                                                                                                                  Data_packet::m_data? There's a small bit of memory overhead, but we get Data_packet::m_rexmit_id for free and don't have to spend time re-creating the packet to retransmit. So it's just convenient.

                                                                                                                                  If retransmission is off, there is no need to store this, as it will not be re-sent.

                                                                                                                                  -

                                                                                                                                  Definition at line 2254 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2255 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::ok_to_rexmit_or_close(), and flow::net_flow::Node::snd_flying_pkts_erase_one().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::ok_to_rexmit_or_close(), and flow::net_flow::Node::snd_flying_pkts_erase_one().

                                                                                                                                  @@ -295,9 +295,9 @@

                                                                                                                                  -

                                                                                                                                  Definition at line 2220 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2221 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::mark_data_packet_sent(), and flow::net_flow::Node::snd_flying_pkts_erase_one().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack(), flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::mark_data_packet_sent(), and flow::net_flow::Node::snd_flying_pkts_erase_one().

                                                                                                                                  @@ -315,9 +315,9 @@

                                                                                                                                  Data_packet::m_data field of the sent packet.

                                                                                                                                  -

                                                                                                                                  Definition at line 2198 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2199 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_individual_ack().

                                                                                                                                  @@ -328,7 +328,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when-members.html index 774c0bdba..f3332a3c2 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html index 7e07c749b..4df4ae81d 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket_1_1Sent__packet_1_1Sent__when.html @@ -99,7 +99,7 @@

                                                                                                                                  Data store to keep timing related info when a packet is sent out.

                                                                                                                                  Construct via direct member initialization. It is copy-constructible (for initially copying into containers and such) but not assignable to discourage unneeded copying (though it is not a heavy structure). Update: A later version of clang does not like this technique and warns about it; to avoid any such trouble just forget the non-assignability stuff; it's internal code; we should be fine.

                                                                                                                                  -

                                                                                                                                  Definition at line 2282 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2283 of file peer_socket.hpp.

                                                                                                                                  Member Data Documentation

                                                                                                                                  ◆ m_order_num

                                                                                                                                  @@ -118,9 +118,9 @@

                                                                                                                                  See also
                                                                                                                                  Peer_socket::Sent_packet::m_sent_when for more discussion.

                                                                                                                                  Todo:
                                                                                                                                  Can we make Sent_when::m_order_num and some of its peers const?
                                                                                                                                  -

                                                                                                                                  Definition at line 2297 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2298 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::compute_rtt_on_ack(), flow::net_flow::Node::drop_pkts_on_acks(), and flow::net_flow::Node::handle_accumulated_acks().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::categorize_pkts_as_dropped_on_acks(), flow::net_flow::Node::compute_rtt_on_ack(), flow::net_flow::Node::drop_pkts_on_acks(), and flow::net_flow::Node::handle_accumulated_acks().

                                                                                                                                  @@ -141,9 +141,9 @@

                                                                                                                                  Todo:
                                                                                                                                  Why is m_sent_cwnd_bytes in Sent_when struct and not directly in Sent_packet? Or maybe it should stay here, but Sent_when should be renamed Send_attempt (or Send_try for brevity)? Yeah, I think that's it. Then Sent_packet::m_sent_when – a container of Sent_when objects – would become m_send_tries, a container of Send_try objects. That makes more sense (sentce?!) than the status quo which involves the singular-means-plural strangeness.
                                                                                                                                  Todo:
                                                                                                                                  Can we make m_sent_cwnd_bytes and some of its peers const?
                                                                                                                                  -

                                                                                                                                  Definition at line 2327 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2328 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::handle_accumulated_acks().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::handle_accumulated_acks().

                                                                                                                                  @@ -165,9 +165,9 @@

                                                                                                                                  Peer_socket::Sent_packet::m_sent_when for more discussion. -

                                                                                                                                  Definition at line 2309 of file peer_socket.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 2310 of file peer_socket.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::drop_pkts_on_acks().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::drop_pkts_on_acks().

                                                                                                                                  @@ -177,7 +177,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info-members.html index 07304e339..c3ae04fba 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info-members.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info.html index b31f3d825..16c9a41cc 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__info.html @@ -338,7 +338,7 @@

                                                                                                                                  Definition at line 322 of file info.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::in_closed_range(), m_int_state_str, m_is_active_connect, m_low_lvl_max_buf_size, m_node_opts, m_rcv, m_rcv_buf_size, m_rcv_packets_with_gaps, m_rcv_reassembly_q_data_size, m_rcv_syn_rcvd_data_cumulative_size, m_rcv_syn_rcvd_data_q_size, m_rcv_wnd, m_rcv_wnd_last_advertised, m_snd, m_snd_buf_size, m_snd_cong_ctl_in_flight_bytes, m_snd_cong_ctl_in_flight_count, m_snd_cong_ctl_wnd_bytes, m_snd_cong_ctl_wnd_count_approx, m_snd_drop_timeout, m_snd_est_bandwidth_mbit_per_sec, m_snd_pacing_bytes_allowed_this_slice, m_snd_pacing_packet_q_size, m_snd_pacing_slice_period, m_snd_pacing_slice_start, m_snd_rcv_wnd, m_snd_round_trip_time_variance, m_snd_smoothed_round_trip_time, m_sock_opts, and flow::net_flow::Peer_socket_options::m_st_rexmit_on.

                                                                                                                                  +

                                                                                                                                  References flow::util::in_closed_range(), m_int_state_str, m_is_active_connect, m_low_lvl_max_buf_size, m_node_opts, m_rcv, m_rcv_buf_size, m_rcv_packets_with_gaps, m_rcv_reassembly_q_data_size, m_rcv_syn_rcvd_data_cumulative_size, m_rcv_syn_rcvd_data_q_size, m_rcv_wnd, m_rcv_wnd_last_advertised, m_snd, m_snd_buf_size, m_snd_cong_ctl_in_flight_bytes, m_snd_cong_ctl_in_flight_count, m_snd_cong_ctl_wnd_bytes, m_snd_cong_ctl_wnd_count_approx, m_snd_drop_timeout, m_snd_est_bandwidth_mbit_per_sec, m_snd_pacing_bytes_allowed_this_slice, m_snd_pacing_packet_q_size, m_snd_pacing_slice_period, m_snd_pacing_slice_start, m_snd_rcv_wnd, m_snd_round_trip_time_variance, m_snd_smoothed_round_trip_time, m_sock_opts, and flow::net_flow::Peer_socket_options::m_st_rexmit_on.

                                                                                                                                  Referenced by operator<<().

                                                                                                                                  @@ -794,7 +794,7 @@

                                                                                                                                  Definition at line 533 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -814,7 +814,7 @@

                                                                                                                                  Definition at line 536 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -837,7 +837,7 @@

                                                                                                                                  Definition at line 526 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -858,7 +858,7 @@

                                                                                                                                  Definition at line 651 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -878,7 +878,7 @@

                                                                                                                                  Definition at line 508 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -900,7 +900,7 @@

                                                                                                                                  Definition at line 549 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -921,7 +921,7 @@

                                                                                                                                  Definition at line 570 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -941,7 +941,7 @@

                                                                                                                                  Definition at line 558 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -961,7 +961,7 @@

                                                                                                                                  Definition at line 573 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -981,7 +981,7 @@

                                                                                                                                  Definition at line 576 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1001,7 +1001,7 @@

                                                                                                                                  Definition at line 552 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1021,7 +1021,7 @@

                                                                                                                                  Definition at line 555 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1041,7 +1041,7 @@

                                                                                                                                  Definition at line 511 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1064,7 +1064,7 @@

                                                                                                                                  Definition at line 590 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1085,7 +1085,7 @@

                                                                                                                                  Definition at line 608 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1105,7 +1105,7 @@

                                                                                                                                  Definition at line 611 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1125,7 +1125,7 @@

                                                                                                                                  Definition at line 599 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1145,7 +1145,7 @@

                                                                                                                                  Definition at line 602 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1165,7 +1165,7 @@

                                                                                                                                  Definition at line 620 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1186,7 +1186,7 @@

                                                                                                                                  Definition at line 641 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1206,7 +1206,7 @@

                                                                                                                                  Definition at line 635 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1226,7 +1226,7 @@

                                                                                                                                  Definition at line 623 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1246,7 +1246,7 @@

                                                                                                                                  Definition at line 629 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1266,7 +1266,7 @@

                                                                                                                                  Definition at line 626 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1286,7 +1286,7 @@

                                                                                                                                  Definition at line 596 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1306,7 +1306,7 @@

                                                                                                                                  Definition at line 617 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1326,7 +1326,7 @@

                                                                                                                                  Definition at line 614 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1346,7 +1346,7 @@

                                                                                                                                  Definition at line 644 of file info.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  +

                                                                                                                                  Referenced by output(), and flow::net_flow::Node::sock_load_info_struct().

                                                                                                                                  @@ -1358,7 +1358,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options-members.html index 31682cb0a..8205e9b52 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options-members.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options.html index 17608520a..c312cc99b 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__options.html @@ -646,7 +646,7 @@

                                                                                                                                  Definition at line 325 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -666,7 +666,7 @@

                                                                                                                                  Definition at line 317 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -706,7 +706,7 @@

                                                                                                                                  Definition at line 333 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -727,7 +727,7 @@

                                                                                                                                  Definition at line 314 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -748,7 +748,7 @@

                                                                                                                                  Definition at line 306 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -768,7 +768,7 @@

                                                                                                                                  Definition at line 299 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -789,7 +789,7 @@

                                                                                                                                  Definition at line 277 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -815,7 +815,7 @@

                                                                                                                                  Definition at line 296 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -856,7 +856,7 @@

                                                                                                                                  Definition at line 121 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -876,7 +876,7 @@

                                                                                                                                  Definition at line 124 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -897,7 +897,7 @@

                                                                                                                                  Definition at line 191 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -959,7 +959,7 @@

                                                                                                                                  Definition at line 226 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -982,7 +982,7 @@

                                                                                                                                  Definition at line 114 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::max_block_size(), flow::net_flow::Peer_socket::max_block_size(), flow::net_flow::Peer_socket::max_block_size_multiple(), setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::max_block_size(), flow::net_flow::Peer_socket::max_block_size(), flow::net_flow::Peer_socket::max_block_size_multiple(), setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1003,7 +1003,7 @@

                                                                                                                                  Definition at line 198 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1024,7 +1024,7 @@

                                                                                                                                  Definition at line 220 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1066,7 +1066,7 @@

                                                                                                                                  Definition at line 141 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1108,7 +1108,7 @@

                                                                                                                                  Definition at line 171 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1153,7 +1153,7 @@

                                                                                                                                  Definition at line 183 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1196,7 +1196,7 @@

                                                                                                                                  Definition at line 267 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1217,7 +1217,7 @@

                                                                                                                                  Definition at line 134 of file options.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  +

                                                                                                                                  Referenced by setup_config_parsing_helper(), and flow::net_flow::Node::sock_validate_options().

                                                                                                                                  @@ -1249,7 +1249,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html index 3bf46f16a..df5914e34 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html index b6ec8edae..fd0618772 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html @@ -1124,7 +1124,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint-members.html index 7bfc61607..6dfc75d30 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint.html index e2b4cbf25..db918c294 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Remote__endpoint.html @@ -342,7 +342,7 @@

                                                                                                                                  Definition at line 97 of file endpoint.hpp.

                                                                                                                                  -

                                                                                                                                  Referenced by flow::net_flow::Node::connect_worker(), hash(), operator<<(), and operator==().

                                                                                                                                  +

                                                                                                                                  Referenced by flow::net_flow::Node::connect_worker(), hash(), operator<<(), and operator==().

                                                                                                                                  @@ -354,7 +354,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet-members.html index 7cb3155a5..bae4b7823 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet-members.html @@ -124,7 +124,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet.html index 00ab53e4e..a784e5087 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Rst__packet.html @@ -261,7 +261,7 @@

                                                                                                                                  Implemementation notes

                                                                                                                                  The one peculiar thing about Rst_packet is it contains no data beyond the super-struct Low_lvl_packet, other than the fact it is an Rst_packet (i.e., its typeid() identifies it as such). Thus its various virtual methods are typically either simple or even don't exist and defer to the Low_lvl_packet implementation.

                                                                                                                                  -

                                                                                                                                  Definition at line 1332 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1329 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Rst_packet()

                                                                                                                                  @@ -356,7 +356,7 @@

                                                                                                                                  Definition at line 893 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_WARNING, and flow::net_flow::Low_lvl_packet::m_type_ostream_manip.

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_WARNING, and flow::net_flow::Low_lvl_packet::m_type_ostream_manip.

                                                                                                                                  @@ -423,7 +423,7 @@

                                                                                                                                  Definition at line 1349 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 1346 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -434,7 +434,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data-members.html index 3d5fe5fb5..05d792616 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data-members.html @@ -83,7 +83,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data.html index e944bce0d..b18ee7eb8 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Send__pacing__data.html @@ -319,7 +319,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet-members.html index b23401e00..783657064 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet-members.html @@ -126,7 +126,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet.html index 9ea8c4bf7..4ca023abc 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__ack__packet.html @@ -277,7 +277,7 @@

                                                                                                                                  See Low_lvl_packet doc header for information common to all low-level packets including this one.

                                                                                                                                  A SYN_ACK_ACK packet is sent by the original SYN sender in response to a valid received SYN_ACK, completing the 3-way handshake and establishing a Peer_socket to Peer_socket connection.

                                                                                                                                  -

                                                                                                                                  Definition at line 791 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 792 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Syn_ack_ack_packet()

                                                                                                                                  @@ -372,7 +372,7 @@

                                                                                                                                  Definition at line 614 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_packed, and flow::net_flow::Low_lvl_packet::m_type_ostream_manip.

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_packed, and flow::net_flow::Low_lvl_packet::m_type_ostream_manip.

                                                                                                                                  @@ -490,7 +490,7 @@

                                                                                                                                  Syn_ack_packet but applied to the essentially independent opposite traffic direction of the full-duplex connection being established.

                                                                                                                                  -

                                                                                                                                  Definition at line 809 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 810 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -509,7 +509,7 @@

                                                                                                                                  Syn_ack_packet m_security_token received in the packet to which *this is replying.

                                                                                                                                  The other side will only proceed with the connection if the two are equal.

                                                                                                                                  -

                                                                                                                                  Definition at line 803 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 804 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -535,7 +535,7 @@

                                                                                                                                  Definition at line 822 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 823 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -546,7 +546,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet-members.html index 8ed9325fd..5322eb078 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet-members.html @@ -127,7 +127,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet.html index 5f8fac080..112d253f4 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__ack__packet.html @@ -280,7 +280,7 @@

                                                                                                                                  See Low_lvl_packet doc header for information common to all low-level packets including this one.

                                                                                                                                  A SYN_ACK packet is sent by the passively listening server socket in response to a valid received SYN. Thus a SYN_ACK arises from the Node that performs Node::listen() and receives SYN. In response, a Syn_ack_ack_packet is expected to complete the 3-way handshake and establish a Peer_socket to Peer_socket connection.

                                                                                                                                  -

                                                                                                                                  Definition at line 677 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 678 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Syn_ack_packet()

                                                                                                                                  @@ -375,7 +375,7 @@

                                                                                                                                  Definition at line 565 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_init_seq_num, m_packed, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_init_seq_num, m_packed, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -499,7 +499,7 @@

                                                                                                                                  Syn_packet::m_init_seq_num but applied to the essentially independent opposite traffic direction of the full-duplex connection being established.

                                                                                                                                  -

                                                                                                                                  Definition at line 685 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 686 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -521,7 +521,7 @@

                                                                                                                                  Todo:
                                                                                                                                  We could be similar to TCP by opportunistically sending rcv_wnd in other packet types, namely Data_packet. However this would only help in connections with heavy 2-way traffic. Personally I would then prefer to create a new packet type instead, Rcv_wnd_packet, and also implement some generalized "packet combo" scheme which would allow to piggy-back arbitrary packet types together into a single packet; and then we'd dissociate ACK/SYN_ACK/SYN_ACK_ACK from rcv_wnd.
                                                                                                                                  -

                                                                                                                                  Definition at line 710 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 711 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -540,7 +540,7 @@

                                                                                                                                  Syn_ack_ack_packet m_security_token it receives is equal to the original one it had sent (this m_security_token here).

                                                                                                                                  -

                                                                                                                                  Definition at line 696 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 697 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -566,7 +566,7 @@

                                                                                                                                  Definition at line 726 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 727 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -577,7 +577,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet-members.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet-members.html index 71b87c291..6fe8377f3 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet-members.html @@ -126,7 +126,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet.html b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet.html index c191d9121..10911812f 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1net__flow_1_1Syn__packet.html @@ -272,7 +272,7 @@

                                                                                                                                  See Low_lvl_packet doc header for information common to all low-level packets including this one.

                                                                                                                                  A SYN packet is sent by the actively connecting peer to a passively listening server socket. Thus a SYN arises from the Node that performs Node::connect...(). In response, a Syn_ack_packet is expected.

                                                                                                                                  -

                                                                                                                                  Definition at line 582 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 583 of file low_lvl_packet.hpp.

                                                                                                                                  Constructor & Destructor Documentation

                                                                                                                                  ◆ Syn_packet()

                                                                                                                                  @@ -367,7 +367,7 @@

                                                                                                                                  Definition at line 513 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_init_seq_num, m_serialized_metadata, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  +

                                                                                                                                  References FLOW_LOG_INFO, FLOW_LOG_WARNING, m_init_seq_num, m_serialized_metadata, flow::net_flow::Low_lvl_packet::m_type_ostream_manip, flow::net_flow::Sequence_number::set_metadata(), and flow::net_flow::Sequence_number::set_raw_num().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -466,7 +466,7 @@

                                                                                                                                  Definition at line 925 of file low_lvl_packet.cpp.

                                                                                                                                  -

                                                                                                                                  References flow::util::buffers_to_ostream(), and flow::net_flow::Low_lvl_packet::to_ostream().

                                                                                                                                  +

                                                                                                                                  References flow::util::buffers_to_ostream(), and flow::net_flow::Low_lvl_packet::to_ostream().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -492,7 +492,7 @@

                                                                                                                                  Data_packets over this connection, if it succeeds.

                                                                                                                                  All bytes actually sent by the SYN sender will start with this ISN + 1 and increment by 1 for each byte in the stream further. A retransmission of a given datum starting with sequence number S will still start with sequence number S.

                                                                                                                                  -

                                                                                                                                  Definition at line 593 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 594 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -513,7 +513,7 @@

                                                                                                                                  Todo:
                                                                                                                                  Possibly eliminate this, since NetFlow is reliable; the metadata can just be sent explicitly by the user once the connection is established. However, for now reliability is optional.
                                                                                                                                  -

                                                                                                                                  Definition at line 602 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 603 of file low_lvl_packet.hpp.

                                                                                                                                  Referenced by deserialize_type_specific_data_from_raw_data_packet().

                                                                                                                                  @@ -541,7 +541,7 @@

                                                                                                                                  Definition at line 610 of file low_lvl_packet.hpp.

                                                                                                                                  +

                                                                                                                                  Definition at line 611 of file low_lvl_packet.hpp.

                                                                                                                                  @@ -552,7 +552,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html index df24c1b37..63f5cba37 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html index 6d03adf2f..6cff81f35 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html @@ -208,7 +208,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set-members.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set-members.html index 6aed7d8d6..9bab488ab 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set.html index e2498efe2..d4ab0eccb 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Duration__set.html @@ -316,7 +316,7 @@

                                                                                                                                  Definition at line 93 of file clock_type.cpp.

                                                                                                                                  -

                                                                                                                                  References m_values, and flow::util::ostream_op_to_string().

                                                                                                                                  +

                                                                                                                                  References m_values, and flow::util::ostream_op_to_string().

                                                                                                                                  Here is the call graph for this function:
                                                                                                                                  @@ -353,7 +353,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set-members.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set-members.html index 6ad5ad2a8..5cec3356f 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set-members.html @@ -78,7 +78,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set.html b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set.html index e7494ac32..1419cf998 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1perf_1_1Time__pt__set.html @@ -183,7 +183,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable-members.html b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable-members.html new file mode 100644 index 000000000..755742b20 --- /dev/null +++ b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable-members.html @@ -0,0 +1,85 @@ + + + + + + + +Flow: Member List + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  + + + + + + +
                                                                                                                                  +
                                                                                                                                  Flow 1.0.2 +
                                                                                                                                  +
                                                                                                                                  Flow project: Full implementation reference.
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  + +
                                                                                                                                  + + +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  flow::util::Noncopyable Member List
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +

                                                                                                                                  This is the complete list of members for flow::util::Noncopyable, including all inherited members.

                                                                                                                                  + + + + +
                                                                                                                                  Noncopyable()=defaultflow::util::Noncopyable
                                                                                                                                  Noncopyable(const Noncopyable &)=deleteflow::util::Noncopyable
                                                                                                                                  operator=(const Noncopyable &)=deleteflow::util::Noncopyable
                                                                                                                                  + + + + diff --git a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable.html b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable.html new file mode 100644 index 000000000..cbf376e13 --- /dev/null +++ b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Noncopyable.html @@ -0,0 +1,113 @@ + + + + + + + +Flow: flow::util::Noncopyable Struct Reference + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  + + + + + + +
                                                                                                                                  +
                                                                                                                                  Flow 1.0.2 +
                                                                                                                                  +
                                                                                                                                  Flow project: Full implementation reference.
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  + +
                                                                                                                                  + + +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  flow::util::Noncopyable Struct Reference
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +

                                                                                                                                  Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). + More...

                                                                                                                                  + +

                                                                                                                                  #include <util.hpp>

                                                                                                                                  + + + + + + + + + + + +

                                                                                                                                  +Public Member Functions

                                                                                                                                  Noncopyable ()=default
                                                                                                                                   Makes it possible to instantiate.
                                                                                                                                   
                                                                                                                                  Noncopyable (const Noncopyable &)=delete
                                                                                                                                   Forbid copying.
                                                                                                                                   
                                                                                                                                  +void operator= (const Noncopyable &)=delete
                                                                                                                                   Forbid copying.
                                                                                                                                   
                                                                                                                                  +

                                                                                                                                  Detailed Description

                                                                                                                                  +

                                                                                                                                  Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized).

                                                                                                                                  +

                                                                                                                                  So you can do: [[no_unique_address]] flow::util::Noncopyable m_nc{};.

                                                                                                                                  +

                                                                                                                                  Rationale

                                                                                                                                  +

                                                                                                                                  The usual technique of deriving from boost::noncopyable disables aggregateness. In C++20 declaring a = delete copy ctor also disables it. This trick still works though.

                                                                                                                                  + +

                                                                                                                                  Definition at line 73 of file util.hpp.

                                                                                                                                  +

                                                                                                                                  The documentation for this struct was generated from the following file: +
                                                                                                                                  + + + + diff --git a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state-members.html b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state-members.html index bae2e46af..5363396e8 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state-members.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state-members.html @@ -84,7 +84,7 @@ diff --git a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state.html b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state.html index 984c58891..079a5c6a4 100644 --- a/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state.html +++ b/doc/flow_doc/generated/html_full/structflow_1_1util_1_1Scheduled__task__handle__state.html @@ -330,7 +330,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/task__qing__thread_8cpp.html b/doc/flow_doc/generated/html_full/task__qing__thread_8cpp.html index 8a5301021..759cd6606 100644 --- a/doc/flow_doc/generated/html_full/task__qing__thread_8cpp.html +++ b/doc/flow_doc/generated/html_full/task__qing__thread_8cpp.html @@ -94,7 +94,7 @@ diff --git a/doc/flow_doc/generated/html_full/task__qing__thread_8cpp_source.html b/doc/flow_doc/generated/html_full/task__qing__thread_8cpp_source.html index bc9c143d8..6e0e8c197 100644 --- a/doc/flow_doc/generated/html_full/task__qing__thread_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/task__qing__thread_8cpp_source.html @@ -382,7 +382,7 @@
                                                                                                                                  310}
                                                                                                                                  311
                                                                                                                                  312} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  bool m_own_task_engine
                                                                                                                                  See constructor.
                                                                                                                                  Task_engine_ptr m_task_engine
                                                                                                                                  See task_engine().
                                                                                                                                  util::Thread * raw_worker_thread()
                                                                                                                                  Returns the util::Thread – a thin wrapper around the native OS thread handle – corresponding to the w...
                                                                                                                                  @@ -406,12 +406,12 @@
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  boost::thread Thread
                                                                                                                                  Short-hand for standard thread class.
                                                                                                                                  Definition: util_fwd.hpp:78
                                                                                                                                  Catch-all namespace for the Flow project: A collection of various production-quality modules written ...
                                                                                                                                  Definition: async_fwd.hpp:75
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/task__qing__thread_8hpp.html b/doc/flow_doc/generated/html_full/task__qing__thread_8hpp.html index 8020c0566..2ee8ae5cc 100644 --- a/doc/flow_doc/generated/html_full/task__qing__thread_8hpp.html +++ b/doc/flow_doc/generated/html_full/task__qing__thread_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_full/task__qing__thread_8hpp_source.html b/doc/flow_doc/generated/html_full/task__qing__thread_8hpp_source.html index 533b12f0c..fd7a327ea 100644 --- a/doc/flow_doc/generated/html_full/task__qing__thread_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/task__qing__thread_8hpp_source.html @@ -345,7 +345,7 @@
                                                                                                                                  273
                                                                                                                                  274} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  Internally used building block of various concrete Concurrent_task_loop subclasses that encapsulates ...
                                                                                                                                  bool m_own_task_engine
                                                                                                                                  See constructor.
                                                                                                                                  Task_engine_ptr m_task_engine
                                                                                                                                  See task_engine().
                                                                                                                                  @@ -369,7 +369,7 @@ diff --git a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp.html b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp.html index a83fd9a77..35957b3ca 100644 --- a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp.html +++ b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp_source.html b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp_source.html index dad49dc05..2b3b01ba2 100644 --- a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8cpp_source.html @@ -225,7 +225,7 @@ diff --git a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp.html b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp.html index 207e2b37a..e26f03743 100644 --- a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp.html +++ b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp_source.html b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp_source.html index f9c35b54f..781cf0a42 100644 --- a/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/thread__lcl__str__appender_8hpp_source.html @@ -405,7 +405,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp.html b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp.html index e6e583f17..aa6a5f432 100644 --- a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp_source.html b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp_source.html index 37744a728..b4cfcc6ae 100644 --- a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8cpp_source.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp.html b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp.html index 6d3b9d056..602ec7b32 100644 --- a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp_source.html b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp_source.html index fbc990f45..2894df8fb 100644 --- a/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/timed__concurrent__task__loop_8hpp_source.html @@ -469,7 +469,7 @@
                                                                                                                                  397
                                                                                                                                  398} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  Function< void(size_t thread_idx)> Thread_init_func
                                                                                                                                  Short-hand for the thread-initializer-function optional arg type to start().
                                                                                                                                  Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...
                                                                                                                                  Definition: op.hpp:58
                                                                                                                                  @@ -510,13 +510,13 @@
                                                                                                                                  Clock_type
                                                                                                                                  Clock types supported by flow::perf module facilities, perf::Checkpointing_timer in particular.
                                                                                                                                  @ S_CPU_THREAD_TOTAL_HI_RES
                                                                                                                                  Similar to S_CPU_TOTAL_HI_RES but applied to the calling thread as opposed to entire process.
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/timed__function_8hpp.html b/doc/flow_doc/generated/html_full/timed__function_8hpp.html index 69eec326e..d892d6d28 100644 --- a/doc/flow_doc/generated/html_full/timed__function_8hpp.html +++ b/doc/flow_doc/generated/html_full/timed__function_8hpp.html @@ -102,7 +102,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__function_8hpp_source.html b/doc/flow_doc/generated/html_full/timed__function_8hpp_source.html index 8b8f1e16c..3c9baf2e7 100644 --- a/doc/flow_doc/generated/html_full/timed__function_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/timed__function_8hpp_source.html @@ -148,7 +148,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__handler_8hpp.html b/doc/flow_doc/generated/html_full/timed__handler_8hpp.html index 23668bb3c..a03281695 100644 --- a/doc/flow_doc/generated/html_full/timed__handler_8hpp.html +++ b/doc/flow_doc/generated/html_full/timed__handler_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/timed__handler_8hpp_source.html b/doc/flow_doc/generated/html_full/timed__handler_8hpp_source.html index 8d56ccab4..592eaca07 100644 --- a/doc/flow_doc/generated/html_full/timed__handler_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/timed__handler_8hpp_source.html @@ -122,7 +122,7 @@ diff --git a/doc/flow_doc/generated/html_full/todo.html b/doc/flow_doc/generated/html_full/todo.html index 4203b779a..fea18f7cc 100644 --- a/doc/flow_doc/generated/html_full/todo.html +++ b/doc/flow_doc/generated/html_full/todo.html @@ -371,7 +371,7 @@ diff --git a/doc/flow_doc/generated/html_full/traits_8hpp.html b/doc/flow_doc/generated/html_full/traits_8hpp.html index a8ee42d7c..46a84b718 100644 --- a/doc/flow_doc/generated/html_full/traits_8hpp.html +++ b/doc/flow_doc/generated/html_full/traits_8hpp.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_full/traits_8hpp_source.html b/doc/flow_doc/generated/html_full/traits_8hpp_source.html index 941b6f359..a9101f07c 100644 --- a/doc/flow_doc/generated/html_full/traits_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/traits_8hpp_source.html @@ -297,7 +297,7 @@ diff --git a/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp.html b/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp.html index 86b08f2ac..2165812f6 100644 --- a/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp.html +++ b/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp_source.html b/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp_source.html index 7a5ecdf06..716bf775e 100644 --- a/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/uniq__id__holder_8cpp_source.html @@ -146,7 +146,7 @@ diff --git a/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp.html b/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp.html index a14072b2c..0b37523b9 100644 --- a/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp.html +++ b/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp_source.html b/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp_source.html index 3b231363b..8004422a4 100644 --- a/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/uniq__id__holder_8hpp_source.html @@ -258,7 +258,7 @@ diff --git a/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp.html b/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp.html index 3ee161dc1..8b23a95be 100644 --- a/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp.html +++ b/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp.html @@ -337,7 +337,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp_source.html b/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp_source.html index 5f2ce56e9..8b6f1f7ee 100644 --- a/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/util_2detail_2util_8hpp_source.html @@ -271,12 +271,12 @@
                                                                                                                                  Fine_time_pt chrono_duration_from_now_to_fine_time_pt(const boost::chrono::duration< Rep, Period > &dur)
                                                                                                                                  Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
                                                                                                                                  Definition: util.hpp:42
                                                                                                                                  Fine_duration chrono_duration_to_fine_duration(const boost::chrono::duration< Rep, Period > &dur)
                                                                                                                                  Helper that takes a non-negative duration of arbitrary precision/period and converts it to Fine_durat...
                                                                                                                                  Definition: util.hpp:31
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/util_2util_8hpp.html b/doc/flow_doc/generated/html_full/util_2util_8hpp.html index be9b345a9..baff5d1ea 100644 --- a/doc/flow_doc/generated/html_full/util_2util_8hpp.html +++ b/doc/flow_doc/generated/html_full/util_2util_8hpp.html @@ -86,6 +86,9 @@ class  flow::util::Null_interface  An empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor. More...
                                                                                                                                    +struct  flow::util::Noncopyable + Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). More...
                                                                                                                                  +  class  flow::util::Scoped_setter< Value >  A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value. More...
                                                                                                                                    @@ -181,7 +184,7 @@ diff --git a/doc/flow_doc/generated/html_full/util_2util_8hpp_source.html b/doc/flow_doc/generated/html_full/util_2util_8hpp_source.html index 6a97d52d7..412e22bf0 100644 --- a/doc/flow_doc/generated/html_full/util_2util_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/util_2util_8hpp_source.html @@ -133,555 +133,584 @@
                                                                                                                                  61};
                                                                                                                                  62
                                                                                                                                  63/**
                                                                                                                                  -
                                                                                                                                  64 * A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified
                                                                                                                                  -
                                                                                                                                  65 * value, memorizing the previous contents; and at destruction restores the value. E.g.:
                                                                                                                                  +
                                                                                                                                  64 * Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate
                                                                                                                                  +
                                                                                                                                  65 * (can be direct-initialized).
                                                                                                                                  66 *
                                                                                                                                  -
                                                                                                                                  67 * ~~~
                                                                                                                                  -
                                                                                                                                  68 * thread_local int s_this_thread_val;
                                                                                                                                  -
                                                                                                                                  69 * ...
                                                                                                                                  -
                                                                                                                                  70 * {
                                                                                                                                  -
                                                                                                                                  71 * Scoped_setter<int> setter(&s_this_thread_val, 75); // Set it to 75 and memorize (whatever).
                                                                                                                                  -
                                                                                                                                  72 * ...
                                                                                                                                  -
                                                                                                                                  73 * {
                                                                                                                                  -
                                                                                                                                  74 * Scoped_setter<int> setter(&s_this_thread_val, 125); // Set it to 125 and memorize 75.
                                                                                                                                  -
                                                                                                                                  75 * ...
                                                                                                                                  -
                                                                                                                                  76 * } // Restored from 125 to 75.
                                                                                                                                  -
                                                                                                                                  77 * ...
                                                                                                                                  -
                                                                                                                                  78 * } // Restored from (probably) 75 to (whatever).
                                                                                                                                  -
                                                                                                                                  79 * ~~~
                                                                                                                                  -
                                                                                                                                  80 *
                                                                                                                                  -
                                                                                                                                  81 * The object is movable, not copyable (which is similar to `unique_ptr`) to prevent "double-restore." Related:
                                                                                                                                  -
                                                                                                                                  82 * one can easily return customized auto-setter/restorers:
                                                                                                                                  -
                                                                                                                                  83 *
                                                                                                                                  -
                                                                                                                                  84 * ~~~
                                                                                                                                  -
                                                                                                                                  85 * thread_local Widget s_widget;
                                                                                                                                  -
                                                                                                                                  86 * auto widget_setter_auto(Widget&& widget_moved)
                                                                                                                                  -
                                                                                                                                  87 * {
                                                                                                                                  -
                                                                                                                                  88 * return flow::util::Scoped_setter<Widget>(&s_widget, std::move(widget_moved));
                                                                                                                                  -
                                                                                                                                  89 * }
                                                                                                                                  -
                                                                                                                                  90 * ...
                                                                                                                                  -
                                                                                                                                  91 * { // Later, some block: Set s_widget. Code here doesn't even know/care a Scoped_setter is involved.
                                                                                                                                  -
                                                                                                                                  92 * const auto setter_auto = widget_setter_auto({ ...widget-init... });
                                                                                                                                  -
                                                                                                                                  93 * ...
                                                                                                                                  -
                                                                                                                                  94 * } // Restore s_widget.
                                                                                                                                  -
                                                                                                                                  95 * ~~~
                                                                                                                                  -
                                                                                                                                  96 *
                                                                                                                                  -
                                                                                                                                  97 * ### Thready safety ###
                                                                                                                                  -
                                                                                                                                  98 * This is a simple object: it just performs a few assignments without any added
                                                                                                                                  -
                                                                                                                                  99 * concurrency protection. If the memory location can be accessed simultaneously by other threads, watch out.
                                                                                                                                  -
                                                                                                                                  100 *
                                                                                                                                  -
                                                                                                                                  101 * In particular it's a good fit for thread-local locations: `&X`, where `X` is declared `thread_local`, or
                                                                                                                                  -
                                                                                                                                  102 * `X == *(P.get())` where `P` is a `boost::thread_specific_ptr`.
                                                                                                                                  -
                                                                                                                                  103 *
                                                                                                                                  -
                                                                                                                                  104 * @tparam Value
                                                                                                                                  -
                                                                                                                                  105 * The stored type, which must be move-assignable and move-constructible.
                                                                                                                                  -
                                                                                                                                  106 * All `Value` writes are performed using exclusively these operations.
                                                                                                                                  -
                                                                                                                                  107 * Informally: For best performance when `Value` is a heavy-weight type, these operations should be
                                                                                                                                  -
                                                                                                                                  108 * be written to be light-weight, such as in terms of swapping a few scalars.
                                                                                                                                  -
                                                                                                                                  109 * In particular this is already the case for all STL-compliant container types.
                                                                                                                                  -
                                                                                                                                  110 *
                                                                                                                                  -
                                                                                                                                  111 * @internal
                                                                                                                                  -
                                                                                                                                  112 * ### Implementation ###
                                                                                                                                  -
                                                                                                                                  113 * An alternative implementation, which could even be reduced to just an alias, would have used `unique_ptr`.
                                                                                                                                  -
                                                                                                                                  114 * However in this case I (ygoldfel) wanted maximum control for perf. The use case originally driving this was
                                                                                                                                  -
                                                                                                                                  115 * the thread-local verbosity override: log::Config::this_thread_verbosity_override_auto(). flow::log is fairly
                                                                                                                                  -
                                                                                                                                  116 * paranoid about performance, in general, although admittedly this particular call isn't necessarily ubiquitous.
                                                                                                                                  -
                                                                                                                                  117 */
                                                                                                                                  -
                                                                                                                                  118template<typename Value>
                                                                                                                                  - -
                                                                                                                                  120{
                                                                                                                                  -
                                                                                                                                  121public:
                                                                                                                                  -
                                                                                                                                  122 // Constructors/destructor.
                                                                                                                                  -
                                                                                                                                  123
                                                                                                                                  -
                                                                                                                                  124 /**
                                                                                                                                  -
                                                                                                                                  125 * Post-condition: `*target` contains was `val_src_moved` contained at ctor entry; and the destructor invocation shall
                                                                                                                                  -
                                                                                                                                  126 * reverse this, so that `*target` is restored to its value at entry.
                                                                                                                                  -
                                                                                                                                  127 *
                                                                                                                                  -
                                                                                                                                  128 * `*this` cannot be copied, but it can be moved. As a result, it is guaranteed that the aforementioned destructor
                                                                                                                                  -
                                                                                                                                  129 * will execute exactly once; however it can be move-constructed-from-`*this` other Scope_setter's destructor,
                                                                                                                                  -
                                                                                                                                  130 * while our own dtor therefore is a no-op.
                                                                                                                                  -
                                                                                                                                  131 *
                                                                                                                                  -
                                                                                                                                  132 * @param target
                                                                                                                                  -
                                                                                                                                  133 * The target object that shall be set to `val_src_moved` now and restored in our, or moved-object's, dtor.
                                                                                                                                  -
                                                                                                                                  134 * The current value of `*target` is saved internally via assignment of `move(*target)`.
                                                                                                                                  -
                                                                                                                                  135 * Behavior undefined (assertion may trip) if null.
                                                                                                                                  -
                                                                                                                                  136 * @param val_src_moved
                                                                                                                                  -
                                                                                                                                  137 * Value to save to `*target` immediately, via assignment of `move(val_src_moved)`.
                                                                                                                                  -
                                                                                                                                  138 */
                                                                                                                                  -
                                                                                                                                  139 explicit Scoped_setter(Value* target, Value&& val_src_moved);
                                                                                                                                  -
                                                                                                                                  140
                                                                                                                                  -
                                                                                                                                  141 /**
                                                                                                                                  -
                                                                                                                                  142 * Move constructor: `*this` acts as `src_moved` would-have, while `src_moved` becomes a no-op object permanently.
                                                                                                                                  -
                                                                                                                                  143 *
                                                                                                                                  -
                                                                                                                                  144 * @param src_moved
                                                                                                                                  -
                                                                                                                                  145 * Source object. Its destructor shall do nothing after this returns.
                                                                                                                                  -
                                                                                                                                  146 */
                                                                                                                                  -
                                                                                                                                  147 Scoped_setter(Scoped_setter&& src_moved);
                                                                                                                                  +
                                                                                                                                  67 * So you can do: `[[no_unique_address]] flow::util::Noncopyable m_nc{};`.
                                                                                                                                  +
                                                                                                                                  68 *
                                                                                                                                  +
                                                                                                                                  69 * ### Rationale ###
                                                                                                                                  +
                                                                                                                                  70 * The usual technique of deriving from `boost::noncopyable` disables aggregateness. In C++20 declaring
                                                                                                                                  +
                                                                                                                                  71 * a `= delete` copy ctor also disables it. This trick still works though.
                                                                                                                                  +
                                                                                                                                  72 */
                                                                                                                                  + +
                                                                                                                                  74{
                                                                                                                                  +
                                                                                                                                  75 // Constructors/destructor.
                                                                                                                                  +
                                                                                                                                  76
                                                                                                                                  +
                                                                                                                                  77 /// Makes it possible to instantiate.
                                                                                                                                  +
                                                                                                                                  78 Noncopyable() = default;
                                                                                                                                  +
                                                                                                                                  79 /// Forbid copying.
                                                                                                                                  +
                                                                                                                                  80 Noncopyable(const Noncopyable&) = delete;
                                                                                                                                  +
                                                                                                                                  81
                                                                                                                                  +
                                                                                                                                  82 // Methods.
                                                                                                                                  +
                                                                                                                                  83
                                                                                                                                  +
                                                                                                                                  84 /// Forbid copying.
                                                                                                                                  +
                                                                                                                                  85 void operator=(const Noncopyable&) = delete;
                                                                                                                                  +
                                                                                                                                  86};
                                                                                                                                  +
                                                                                                                                  87
                                                                                                                                  +
                                                                                                                                  88/**
                                                                                                                                  +
                                                                                                                                  89 * A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified
                                                                                                                                  +
                                                                                                                                  90 * value, memorizing the previous contents; and at destruction restores the value. E.g.:
                                                                                                                                  +
                                                                                                                                  91 *
                                                                                                                                  +
                                                                                                                                  92 * ~~~
                                                                                                                                  +
                                                                                                                                  93 * thread_local int s_this_thread_val;
                                                                                                                                  +
                                                                                                                                  94 * ...
                                                                                                                                  +
                                                                                                                                  95 * {
                                                                                                                                  +
                                                                                                                                  96 * Scoped_setter<int> setter(&s_this_thread_val, 75); // Set it to 75 and memorize (whatever).
                                                                                                                                  +
                                                                                                                                  97 * ...
                                                                                                                                  +
                                                                                                                                  98 * {
                                                                                                                                  +
                                                                                                                                  99 * Scoped_setter<int> setter(&s_this_thread_val, 125); // Set it to 125 and memorize 75.
                                                                                                                                  +
                                                                                                                                  100 * ...
                                                                                                                                  +
                                                                                                                                  101 * } // Restored from 125 to 75.
                                                                                                                                  +
                                                                                                                                  102 * ...
                                                                                                                                  +
                                                                                                                                  103 * } // Restored from (probably) 75 to (whatever).
                                                                                                                                  +
                                                                                                                                  104 * ~~~
                                                                                                                                  +
                                                                                                                                  105 *
                                                                                                                                  +
                                                                                                                                  106 * The object is movable, not copyable (which is similar to `unique_ptr`) to prevent "double-restore." Related:
                                                                                                                                  +
                                                                                                                                  107 * one can easily return customized auto-setter/restorers:
                                                                                                                                  +
                                                                                                                                  108 *
                                                                                                                                  +
                                                                                                                                  109 * ~~~
                                                                                                                                  +
                                                                                                                                  110 * thread_local Widget s_widget;
                                                                                                                                  +
                                                                                                                                  111 * auto widget_setter_auto(Widget&& widget_moved)
                                                                                                                                  +
                                                                                                                                  112 * {
                                                                                                                                  +
                                                                                                                                  113 * return flow::util::Scoped_setter<Widget>(&s_widget, std::move(widget_moved));
                                                                                                                                  +
                                                                                                                                  114 * }
                                                                                                                                  +
                                                                                                                                  115 * ...
                                                                                                                                  +
                                                                                                                                  116 * { // Later, some block: Set s_widget. Code here doesn't even know/care a Scoped_setter is involved.
                                                                                                                                  +
                                                                                                                                  117 * const auto setter_auto = widget_setter_auto({ ...widget-init... });
                                                                                                                                  +
                                                                                                                                  118 * ...
                                                                                                                                  +
                                                                                                                                  119 * } // Restore s_widget.
                                                                                                                                  +
                                                                                                                                  120 * ~~~
                                                                                                                                  +
                                                                                                                                  121 *
                                                                                                                                  +
                                                                                                                                  122 * ### Thready safety ###
                                                                                                                                  +
                                                                                                                                  123 * This is a simple object: it just performs a few assignments without any added
                                                                                                                                  +
                                                                                                                                  124 * concurrency protection. If the memory location can be accessed simultaneously by other threads, watch out.
                                                                                                                                  +
                                                                                                                                  125 *
                                                                                                                                  +
                                                                                                                                  126 * In particular it's a good fit for thread-local locations: `&X`, where `X` is declared `thread_local`, or
                                                                                                                                  +
                                                                                                                                  127 * `X == *(P.get())` where `P` is a `boost::thread_specific_ptr`.
                                                                                                                                  +
                                                                                                                                  128 *
                                                                                                                                  +
                                                                                                                                  129 * @tparam Value
                                                                                                                                  +
                                                                                                                                  130 * The stored type, which must be move-assignable and move-constructible.
                                                                                                                                  +
                                                                                                                                  131 * All `Value` writes are performed using exclusively these operations.
                                                                                                                                  +
                                                                                                                                  132 * Informally: For best performance when `Value` is a heavy-weight type, these operations should be
                                                                                                                                  +
                                                                                                                                  133 * be written to be light-weight, such as in terms of swapping a few scalars.
                                                                                                                                  +
                                                                                                                                  134 * In particular this is already the case for all STL-compliant container types.
                                                                                                                                  +
                                                                                                                                  135 *
                                                                                                                                  +
                                                                                                                                  136 * @internal
                                                                                                                                  +
                                                                                                                                  137 * ### Implementation ###
                                                                                                                                  +
                                                                                                                                  138 * An alternative implementation, which could even be reduced to just an alias, would have used `unique_ptr`.
                                                                                                                                  +
                                                                                                                                  139 * However in this case I (ygoldfel) wanted maximum control for perf. The use case originally driving this was
                                                                                                                                  +
                                                                                                                                  140 * the thread-local verbosity override: log::Config::this_thread_verbosity_override_auto(). flow::log is fairly
                                                                                                                                  +
                                                                                                                                  141 * paranoid about performance, in general, although admittedly this particular call isn't necessarily ubiquitous.
                                                                                                                                  +
                                                                                                                                  142 */
                                                                                                                                  +
                                                                                                                                  143template<typename Value>
                                                                                                                                  + +
                                                                                                                                  145{
                                                                                                                                  +
                                                                                                                                  146public:
                                                                                                                                  +
                                                                                                                                  147 // Constructors/destructor.
                                                                                                                                  148
                                                                                                                                  -
                                                                                                                                  149 /// Prohibit copying: for each `explicit` ctor invocation, there shall be exactly 1 non-no-op dtor invocation.
                                                                                                                                  -
                                                                                                                                  150 Scoped_setter(const Scoped_setter&) = delete;
                                                                                                                                  -
                                                                                                                                  151
                                                                                                                                  -
                                                                                                                                  152 /**
                                                                                                                                  -
                                                                                                                                  153 * Restores `*target` (from main ctor) to its value at entry to said ctor; or does nothing if `*this` has been
                                                                                                                                  -
                                                                                                                                  154 * moved-from via the move ctor.
                                                                                                                                  -
                                                                                                                                  155 */
                                                                                                                                  - -
                                                                                                                                  157
                                                                                                                                  -
                                                                                                                                  158 // Methods.
                                                                                                                                  -
                                                                                                                                  159
                                                                                                                                  -
                                                                                                                                  160 /// Prohibit copying (see `delete`d copy ctor).
                                                                                                                                  - -
                                                                                                                                  162
                                                                                                                                  -
                                                                                                                                  163 /// Prohibit modifying existing `*this`; except that moving-from is enabled via the move ctor.
                                                                                                                                  - -
                                                                                                                                  165
                                                                                                                                  -
                                                                                                                                  166private:
                                                                                                                                  -
                                                                                                                                  167 // Data.
                                                                                                                                  -
                                                                                                                                  168
                                                                                                                                  -
                                                                                                                                  169 /// Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally no-ops.
                                                                                                                                  - -
                                                                                                                                  171
                                                                                                                                  -
                                                                                                                                  172 /// If and only if #m_target_or_null is non-null, this saves `*m_target_or_null`. Otherwise meaningless.
                                                                                                                                  - -
                                                                                                                                  174}; // class Scoped_setter
                                                                                                                                  -
                                                                                                                                  175
                                                                                                                                  -
                                                                                                                                  176// Template implementations.
                                                                                                                                  -
                                                                                                                                  177
                                                                                                                                  -
                                                                                                                                  178// Scoped_setter template implementations.
                                                                                                                                  -
                                                                                                                                  179
                                                                                                                                  -
                                                                                                                                  180template<typename Value>
                                                                                                                                  -
                                                                                                                                  181Scoped_setter<Value>::Scoped_setter(Value* target, Value&& val_src_moved) :
                                                                                                                                  -
                                                                                                                                  182 m_target_or_null(target),
                                                                                                                                  -
                                                                                                                                  183 m_saved_value(std::move(*m_target_or_null))
                                                                                                                                  -
                                                                                                                                  184{
                                                                                                                                  -
                                                                                                                                  185 *m_target_or_null = std::move(val_src_moved);
                                                                                                                                  -
                                                                                                                                  186}
                                                                                                                                  -
                                                                                                                                  187
                                                                                                                                  -
                                                                                                                                  188template<typename Value>
                                                                                                                                  -
                                                                                                                                  189Scoped_setter<Value>::Scoped_setter(Scoped_setter&& src_moved) : // =default might work fine but to be clear/certain:
                                                                                                                                  -
                                                                                                                                  190 m_target_or_null(src_moved.m_target_or_null),
                                                                                                                                  -
                                                                                                                                  191 m_saved_value(std::move(src_moved.m_saved_value))
                                                                                                                                  -
                                                                                                                                  192{
                                                                                                                                  -
                                                                                                                                  193 assert(m_target_or_null && "Should not be moving-from a thing that has already been moved-from.");
                                                                                                                                  -
                                                                                                                                  194
                                                                                                                                  -
                                                                                                                                  195 src_moved.m_target_or_null = nullptr;
                                                                                                                                  -
                                                                                                                                  196 // As promised: Now src_moved's dtor will no-op.
                                                                                                                                  -
                                                                                                                                  197}
                                                                                                                                  -
                                                                                                                                  198
                                                                                                                                  -
                                                                                                                                  199template<typename Value>
                                                                                                                                  - -
                                                                                                                                  201{
                                                                                                                                  -
                                                                                                                                  202 if (m_target_or_null)
                                                                                                                                  -
                                                                                                                                  203 {
                                                                                                                                  -
                                                                                                                                  204 *m_target_or_null = std::move(m_saved_value);
                                                                                                                                  -
                                                                                                                                  205 }
                                                                                                                                  -
                                                                                                                                  206 // else { `*this` must have been moved-from. No-op. }
                                                                                                                                  -
                                                                                                                                  207}
                                                                                                                                  -
                                                                                                                                  208
                                                                                                                                  -
                                                                                                                                  209// Free function template implementations.
                                                                                                                                  -
                                                                                                                                  210
                                                                                                                                  -
                                                                                                                                  211template<typename Time_unit, typename N_items>
                                                                                                                                  -
                                                                                                                                  212double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  -
                                                                                                                                  213{
                                                                                                                                  -
                                                                                                                                  214 /* Let there be U/W seconds per Time_unit. Then the following holds:
                                                                                                                                  -
                                                                                                                                  215 *
                                                                                                                                  -
                                                                                                                                  216 * items_per_time items/Time_units * W/U Time_units/second * bits_per_item bits/item
                                                                                                                                  -
                                                                                                                                  217 * * 1/(1000*1000) megabits/bits
                                                                                                                                  -
                                                                                                                                  218 * = items_per_time * W / U * bits_per_item / 1000 / 1000 megabits/second.
                                                                                                                                  -
                                                                                                                                  219 *
                                                                                                                                  -
                                                                                                                                  220 * Notice the units work out. W and U are conveniently available in Time_unit::period, which is a boost::ratio. */
                                                                                                                                  -
                                                                                                                                  221
                                                                                                                                  -
                                                                                                                                  222 return
                                                                                                                                  -
                                                                                                                                  223 /* This zealously converts everything to double ASAP to avoid overflow. Could probably speed things up a bit
                                                                                                                                  -
                                                                                                                                  224 * by postponing some of those conversions until after some integer multiplications, but then overflows could
                                                                                                                                  -
                                                                                                                                  225 * creep in. It's best not to assume too much about the values of den and num, as this function is meant to
                                                                                                                                  -
                                                                                                                                  226 * be rather adaptable to various situations. I did try to avoid unnecessary divisions though in favor of
                                                                                                                                  -
                                                                                                                                  227 * multiplications, sort of guessing the latter are faster. Or not... *shrug*. */
                                                                                                                                  -
                                                                                                                                  228 double(items_per_time) * double(bits_per_item) * double(Time_unit::period::den)
                                                                                                                                  -
                                                                                                                                  229 / (double(Time_unit::period::num) * double(1000 * 1000));
                                                                                                                                  -
                                                                                                                                  230}
                                                                                                                                  -
                                                                                                                                  231
                                                                                                                                  -
                                                                                                                                  232template<typename Integer>
                                                                                                                                  -
                                                                                                                                  233Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  -
                                                                                                                                  234{
                                                                                                                                  -
                                                                                                                                  235 // ceil(A : B) = (A + B - 1) / B, where : is floating point division, while / is integer division.
                                                                                                                                  -
                                                                                                                                  236 static_assert(std::is_integral_v<Integer>, "ceil_div<T>: T must be an integer type.");
                                                                                                                                  -
                                                                                                                                  237 assert(dividend >= 0);
                                                                                                                                  -
                                                                                                                                  238 assert(divisor > 0);
                                                                                                                                  -
                                                                                                                                  239
                                                                                                                                  -
                                                                                                                                  240 return (dividend + divisor - 1) / divisor;
                                                                                                                                  -
                                                                                                                                  241 /* (Could one do further bitwise trickery? Perhaps but let optimizer do it. Wouldn't optimizer also just
                                                                                                                                  -
                                                                                                                                  242 * optimize a literal floating-point `ceil(a / b)`? Well, no. Probably not. So we wrote this function.) */
                                                                                                                                  -
                                                                                                                                  243}
                                                                                                                                  -
                                                                                                                                  244
                                                                                                                                  -
                                                                                                                                  245template<typename T>
                                                                                                                                  -
                                                                                                                                  246bool in_closed_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  -
                                                                                                                                  247{
                                                                                                                                  -
                                                                                                                                  248 // This writes "(min_val <= val) && (val <= max_val)" by using only <, to support the greatest number of types.
                                                                                                                                  -
                                                                                                                                  249 return ((min_val < val) || (!(val < min_val))) &&
                                                                                                                                  -
                                                                                                                                  250 ((val < max_val) || (!(max_val < val)));
                                                                                                                                  -
                                                                                                                                  251}
                                                                                                                                  -
                                                                                                                                  252
                                                                                                                                  -
                                                                                                                                  253template<typename T>
                                                                                                                                  -
                                                                                                                                  254bool in_open_closed_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  -
                                                                                                                                  255{
                                                                                                                                  -
                                                                                                                                  256 // This writes "(min_val < val) && (val <= max_val)" by using only <, to support the greatest number of types.
                                                                                                                                  -
                                                                                                                                  257 return (min_val < val) &&
                                                                                                                                  -
                                                                                                                                  258 ((val < max_val) || (!(max_val < val)));
                                                                                                                                  -
                                                                                                                                  259}
                                                                                                                                  -
                                                                                                                                  260
                                                                                                                                  -
                                                                                                                                  261template<typename T>
                                                                                                                                  -
                                                                                                                                  262bool in_closed_open_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  -
                                                                                                                                  263{
                                                                                                                                  -
                                                                                                                                  264 // This writes "(val < max_val) && (min_val <= val)" by using only <, to support the greatest number of types.
                                                                                                                                  -
                                                                                                                                  265 return (val < max_val) &&
                                                                                                                                  -
                                                                                                                                  266 ((min_val < val) || (!(val < min_val)));
                                                                                                                                  -
                                                                                                                                  267}
                                                                                                                                  -
                                                                                                                                  268
                                                                                                                                  -
                                                                                                                                  269template<typename T>
                                                                                                                                  -
                                                                                                                                  270bool in_open_open_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  -
                                                                                                                                  271{
                                                                                                                                  -
                                                                                                                                  272 return (min_val < val) && (val < max_val);
                                                                                                                                  -
                                                                                                                                  273}
                                                                                                                                  -
                                                                                                                                  274
                                                                                                                                  -
                                                                                                                                  275template<typename Container>
                                                                                                                                  -
                                                                                                                                  276bool key_exists(const Container& container, const typename Container::key_type& key)
                                                                                                                                  -
                                                                                                                                  277{
                                                                                                                                  -
                                                                                                                                  278 return container.find(key) != container.end();
                                                                                                                                  -
                                                                                                                                  279}
                                                                                                                                  -
                                                                                                                                  280
                                                                                                                                  -
                                                                                                                                  281template<typename Cleanup_func>
                                                                                                                                  -
                                                                                                                                  282Auto_cleanup setup_auto_cleanup(const Cleanup_func& func)
                                                                                                                                  -
                                                                                                                                  283{
                                                                                                                                  -
                                                                                                                                  284 /* This trick, from shared_ptr or bind Boost docs (if I recall correctly), uses shared_ptr's deleter feature. The
                                                                                                                                  -
                                                                                                                                  285 * Auto_cleanup gains "ownership" of null pointer, purely for the purpose of running a deleter on it when the object
                                                                                                                                  -
                                                                                                                                  286 * goes out of scope sometime later. Deleting 0 itself would have been useless no-op, and instead we ignore the null
                                                                                                                                  -
                                                                                                                                  287 * and simply call user's func(), which is what the goal is.
                                                                                                                                  -
                                                                                                                                  288 *
                                                                                                                                  -
                                                                                                                                  289 * Subtlety: shared_ptr docs say the passed-in deleter is saved by copy, so we needn't worry about it disappearing
                                                                                                                                  -
                                                                                                                                  290 * after we return.
                                                                                                                                  -
                                                                                                                                  291 *
                                                                                                                                  -
                                                                                                                                  292 * Subtlety: we need to make a copy (via capture) of func, as there's zero guarantee (and low likelihood in practice)
                                                                                                                                  -
                                                                                                                                  293 * that func is a valid object at the time cleanup is actually needed (sometime after we return). */
                                                                                                                                  -
                                                                                                                                  294 return Auto_cleanup(static_cast<void*>(0),
                                                                                                                                  -
                                                                                                                                  295 [func](void*) { func(); });
                                                                                                                                  -
                                                                                                                                  296}
                                                                                                                                  -
                                                                                                                                  297
                                                                                                                                  -
                                                                                                                                  298template<typename Minuend, typename Subtrahend>
                                                                                                                                  -
                                                                                                                                  299bool subtract_with_floor(Minuend* minuend, const Subtrahend& subtrahend, const Minuend& floor)
                                                                                                                                  -
                                                                                                                                  300{
                                                                                                                                  -
                                                                                                                                  301 assert(minuend);
                                                                                                                                  -
                                                                                                                                  302
                                                                                                                                  -
                                                                                                                                  303 /* Basically just avoid implicit conversions and anything that mind overflow or underflow.
                                                                                                                                  -
                                                                                                                                  304 * The one underflow we allow is the subtraction of `floor`: doc header says keep `floor` small.
                                                                                                                                  -
                                                                                                                                  305 * So it's their problem if it's not. */
                                                                                                                                  -
                                                                                                                                  306
                                                                                                                                  -
                                                                                                                                  307 const Minuend converted_subtrahend = Minuend(subtrahend);
                                                                                                                                  -
                                                                                                                                  308
                                                                                                                                  -
                                                                                                                                  309 // min - sub <= floor <===> min - floor <= sub.
                                                                                                                                  -
                                                                                                                                  310 if ((*minuend - floor) <= converted_subtrahend)
                                                                                                                                  -
                                                                                                                                  311 {
                                                                                                                                  -
                                                                                                                                  312 *minuend = floor;
                                                                                                                                  -
                                                                                                                                  313 return false;
                                                                                                                                  -
                                                                                                                                  314 }
                                                                                                                                  -
                                                                                                                                  315 // else
                                                                                                                                  -
                                                                                                                                  316 *minuend -= converted_subtrahend;
                                                                                                                                  -
                                                                                                                                  317 return true;
                                                                                                                                  -
                                                                                                                                  318}
                                                                                                                                  -
                                                                                                                                  319
                                                                                                                                  -
                                                                                                                                  320template<typename From, typename To>
                                                                                                                                  -
                                                                                                                                  321size_t size_unit_convert(From num_froms)
                                                                                                                                  -
                                                                                                                                  322{
                                                                                                                                  -
                                                                                                                                  323 return ((num_froms * sizeof(From)) + sizeof(To) - 1) / sizeof(To);
                                                                                                                                  -
                                                                                                                                  324}
                                                                                                                                  -
                                                                                                                                  325
                                                                                                                                  -
                                                                                                                                  326template<typename T1, typename ...T_rest>
                                                                                                                                  -
                                                                                                                                  327void feed_args_to_ostream(std::ostream* os, T1 const & ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  -
                                                                                                                                  328{
                                                                                                                                  -
                                                                                                                                  329 // Induction step for variadic template.
                                                                                                                                  -
                                                                                                                                  330 feed_args_to_ostream(os, ostream_arg1);
                                                                                                                                  -
                                                                                                                                  331 feed_args_to_ostream(os, remaining_ostream_args...);
                                                                                                                                  -
                                                                                                                                  332}
                                                                                                                                  +
                                                                                                                                  149 /**
                                                                                                                                  +
                                                                                                                                  150 * Post-condition: `*target` contains was `val_src_moved` contained at ctor entry; and the destructor invocation shall
                                                                                                                                  +
                                                                                                                                  151 * reverse this, so that `*target` is restored to its value at entry.
                                                                                                                                  +
                                                                                                                                  152 *
                                                                                                                                  +
                                                                                                                                  153 * `*this` cannot be copied, but it can be moved. As a result, it is guaranteed that the aforementioned destructor
                                                                                                                                  +
                                                                                                                                  154 * will execute exactly once; however it can be move-constructed-from-`*this` other Scope_setter's destructor,
                                                                                                                                  +
                                                                                                                                  155 * while our own dtor therefore is a no-op.
                                                                                                                                  +
                                                                                                                                  156 *
                                                                                                                                  +
                                                                                                                                  157 * @param target
                                                                                                                                  +
                                                                                                                                  158 * The target object that shall be set to `val_src_moved` now and restored in our, or moved-object's, dtor.
                                                                                                                                  +
                                                                                                                                  159 * The current value of `*target` is saved internally via assignment of `move(*target)`.
                                                                                                                                  +
                                                                                                                                  160 * Behavior undefined (assertion may trip) if null.
                                                                                                                                  +
                                                                                                                                  161 * @param val_src_moved
                                                                                                                                  +
                                                                                                                                  162 * Value to save to `*target` immediately, via assignment of `move(val_src_moved)`.
                                                                                                                                  +
                                                                                                                                  163 */
                                                                                                                                  +
                                                                                                                                  164 explicit Scoped_setter(Value* target, Value&& val_src_moved);
                                                                                                                                  +
                                                                                                                                  165
                                                                                                                                  +
                                                                                                                                  166 /**
                                                                                                                                  +
                                                                                                                                  167 * Move constructor: `*this` acts as `src_moved` would-have, while `src_moved` becomes a no-op object permanently.
                                                                                                                                  +
                                                                                                                                  168 *
                                                                                                                                  +
                                                                                                                                  169 * @param src_moved
                                                                                                                                  +
                                                                                                                                  170 * Source object. Its destructor shall do nothing after this returns.
                                                                                                                                  +
                                                                                                                                  171 */
                                                                                                                                  +
                                                                                                                                  172 Scoped_setter(Scoped_setter&& src_moved);
                                                                                                                                  +
                                                                                                                                  173
                                                                                                                                  +
                                                                                                                                  174 /// Prohibit copying: for each `explicit` ctor invocation, there shall be exactly 1 non-no-op dtor invocation.
                                                                                                                                  +
                                                                                                                                  175 Scoped_setter(const Scoped_setter&) = delete;
                                                                                                                                  +
                                                                                                                                  176
                                                                                                                                  +
                                                                                                                                  177 /**
                                                                                                                                  +
                                                                                                                                  178 * Restores `*target` (from main ctor) to its value at entry to said ctor; or does nothing if `*this` has been
                                                                                                                                  +
                                                                                                                                  179 * moved-from via the move ctor.
                                                                                                                                  +
                                                                                                                                  180 */
                                                                                                                                  + +
                                                                                                                                  182
                                                                                                                                  +
                                                                                                                                  183 // Methods.
                                                                                                                                  +
                                                                                                                                  184
                                                                                                                                  +
                                                                                                                                  185 /// Prohibit copying (see `delete`d copy ctor).
                                                                                                                                  + +
                                                                                                                                  187
                                                                                                                                  +
                                                                                                                                  188 /// Prohibit modifying existing `*this`; except that moving-from is enabled via the move ctor.
                                                                                                                                  + +
                                                                                                                                  190
                                                                                                                                  +
                                                                                                                                  191private:
                                                                                                                                  +
                                                                                                                                  192 // Data.
                                                                                                                                  +
                                                                                                                                  193
                                                                                                                                  +
                                                                                                                                  194 /// Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally no-ops.
                                                                                                                                  + +
                                                                                                                                  196
                                                                                                                                  +
                                                                                                                                  197 /// If and only if #m_target_or_null is non-null, this saves `*m_target_or_null`. Otherwise meaningless.
                                                                                                                                  + +
                                                                                                                                  199}; // class Scoped_setter
                                                                                                                                  +
                                                                                                                                  200
                                                                                                                                  +
                                                                                                                                  201// Template implementations.
                                                                                                                                  +
                                                                                                                                  202
                                                                                                                                  +
                                                                                                                                  203// Scoped_setter template implementations.
                                                                                                                                  +
                                                                                                                                  204
                                                                                                                                  +
                                                                                                                                  205template<typename Value>
                                                                                                                                  +
                                                                                                                                  206Scoped_setter<Value>::Scoped_setter(Value* target, Value&& val_src_moved) :
                                                                                                                                  +
                                                                                                                                  207 m_target_or_null(target),
                                                                                                                                  +
                                                                                                                                  208 m_saved_value(std::move(*m_target_or_null))
                                                                                                                                  +
                                                                                                                                  209{
                                                                                                                                  +
                                                                                                                                  210 *m_target_or_null = std::move(val_src_moved);
                                                                                                                                  +
                                                                                                                                  211}
                                                                                                                                  +
                                                                                                                                  212
                                                                                                                                  +
                                                                                                                                  213template<typename Value>
                                                                                                                                  +
                                                                                                                                  214Scoped_setter<Value>::Scoped_setter(Scoped_setter&& src_moved) : // =default might work fine but to be clear/certain:
                                                                                                                                  +
                                                                                                                                  215 m_target_or_null(src_moved.m_target_or_null),
                                                                                                                                  +
                                                                                                                                  216 m_saved_value(std::move(src_moved.m_saved_value))
                                                                                                                                  +
                                                                                                                                  217{
                                                                                                                                  +
                                                                                                                                  218 assert(m_target_or_null && "Should not be moving-from a thing that has already been moved-from.");
                                                                                                                                  +
                                                                                                                                  219
                                                                                                                                  +
                                                                                                                                  220 src_moved.m_target_or_null = nullptr;
                                                                                                                                  +
                                                                                                                                  221 // As promised: Now src_moved's dtor will no-op.
                                                                                                                                  +
                                                                                                                                  222}
                                                                                                                                  +
                                                                                                                                  223
                                                                                                                                  +
                                                                                                                                  224template<typename Value>
                                                                                                                                  + +
                                                                                                                                  226{
                                                                                                                                  +
                                                                                                                                  227 if (m_target_or_null)
                                                                                                                                  +
                                                                                                                                  228 {
                                                                                                                                  +
                                                                                                                                  229 *m_target_or_null = std::move(m_saved_value);
                                                                                                                                  +
                                                                                                                                  230 }
                                                                                                                                  +
                                                                                                                                  231 // else { `*this` must have been moved-from. No-op. }
                                                                                                                                  +
                                                                                                                                  232}
                                                                                                                                  +
                                                                                                                                  233
                                                                                                                                  +
                                                                                                                                  234// Free function template implementations.
                                                                                                                                  +
                                                                                                                                  235
                                                                                                                                  +
                                                                                                                                  236template<typename Time_unit, typename N_items>
                                                                                                                                  +
                                                                                                                                  237double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  +
                                                                                                                                  238{
                                                                                                                                  +
                                                                                                                                  239 /* Let there be U/W seconds per Time_unit. Then the following holds:
                                                                                                                                  +
                                                                                                                                  240 *
                                                                                                                                  +
                                                                                                                                  241 * items_per_time items/Time_units * W/U Time_units/second * bits_per_item bits/item
                                                                                                                                  +
                                                                                                                                  242 * * 1/(1000*1000) megabits/bits
                                                                                                                                  +
                                                                                                                                  243 * = items_per_time * W / U * bits_per_item / 1000 / 1000 megabits/second.
                                                                                                                                  +
                                                                                                                                  244 *
                                                                                                                                  +
                                                                                                                                  245 * Notice the units work out. W and U are conveniently available in Time_unit::period, which is a boost::ratio. */
                                                                                                                                  +
                                                                                                                                  246
                                                                                                                                  +
                                                                                                                                  247 return
                                                                                                                                  +
                                                                                                                                  248 /* This zealously converts everything to double ASAP to avoid overflow. Could probably speed things up a bit
                                                                                                                                  +
                                                                                                                                  249 * by postponing some of those conversions until after some integer multiplications, but then overflows could
                                                                                                                                  +
                                                                                                                                  250 * creep in. It's best not to assume too much about the values of den and num, as this function is meant to
                                                                                                                                  +
                                                                                                                                  251 * be rather adaptable to various situations. I did try to avoid unnecessary divisions though in favor of
                                                                                                                                  +
                                                                                                                                  252 * multiplications, sort of guessing the latter are faster. Or not... *shrug*. */
                                                                                                                                  +
                                                                                                                                  253 double(items_per_time) * double(bits_per_item) * double(Time_unit::period::den)
                                                                                                                                  +
                                                                                                                                  254 / (double(Time_unit::period::num) * double(1000 * 1000));
                                                                                                                                  +
                                                                                                                                  255}
                                                                                                                                  +
                                                                                                                                  256
                                                                                                                                  +
                                                                                                                                  257template<typename Integer>
                                                                                                                                  +
                                                                                                                                  258Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  +
                                                                                                                                  259{
                                                                                                                                  +
                                                                                                                                  260 // ceil(A : B) = (A + B - 1) / B, where : is floating point division, while / is integer division.
                                                                                                                                  +
                                                                                                                                  261 static_assert(std::is_integral_v<Integer>, "ceil_div<T>: T must be an integer type.");
                                                                                                                                  +
                                                                                                                                  262 assert(dividend >= 0);
                                                                                                                                  +
                                                                                                                                  263 assert(divisor > 0);
                                                                                                                                  +
                                                                                                                                  264
                                                                                                                                  +
                                                                                                                                  265 return (dividend + divisor - 1) / divisor;
                                                                                                                                  +
                                                                                                                                  266 /* (Could one do further bitwise trickery? Perhaps but let optimizer do it. Wouldn't optimizer also just
                                                                                                                                  +
                                                                                                                                  267 * optimize a literal floating-point `ceil(a / b)`? Well, no. Probably not. So we wrote this function.) */
                                                                                                                                  +
                                                                                                                                  268}
                                                                                                                                  +
                                                                                                                                  269
                                                                                                                                  +
                                                                                                                                  270template<typename T>
                                                                                                                                  +
                                                                                                                                  271bool in_closed_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  +
                                                                                                                                  272{
                                                                                                                                  +
                                                                                                                                  273 // This writes "(min_val <= val) && (val <= max_val)" by using only <, to support the greatest number of types.
                                                                                                                                  +
                                                                                                                                  274 return ((min_val < val) || (!(val < min_val))) &&
                                                                                                                                  +
                                                                                                                                  275 ((val < max_val) || (!(max_val < val)));
                                                                                                                                  +
                                                                                                                                  276}
                                                                                                                                  +
                                                                                                                                  277
                                                                                                                                  +
                                                                                                                                  278template<typename T>
                                                                                                                                  +
                                                                                                                                  279bool in_open_closed_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  +
                                                                                                                                  280{
                                                                                                                                  +
                                                                                                                                  281 // This writes "(min_val < val) && (val <= max_val)" by using only <, to support the greatest number of types.
                                                                                                                                  +
                                                                                                                                  282 return (min_val < val) &&
                                                                                                                                  +
                                                                                                                                  283 ((val < max_val) || (!(max_val < val)));
                                                                                                                                  +
                                                                                                                                  284}
                                                                                                                                  +
                                                                                                                                  285
                                                                                                                                  +
                                                                                                                                  286template<typename T>
                                                                                                                                  +
                                                                                                                                  287bool in_closed_open_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  +
                                                                                                                                  288{
                                                                                                                                  +
                                                                                                                                  289 // This writes "(val < max_val) && (min_val <= val)" by using only <, to support the greatest number of types.
                                                                                                                                  +
                                                                                                                                  290 return (val < max_val) &&
                                                                                                                                  +
                                                                                                                                  291 ((min_val < val) || (!(val < min_val)));
                                                                                                                                  +
                                                                                                                                  292}
                                                                                                                                  +
                                                                                                                                  293
                                                                                                                                  +
                                                                                                                                  294template<typename T>
                                                                                                                                  +
                                                                                                                                  295bool in_open_open_range(T const & min_val, T const & val, T const & max_val)
                                                                                                                                  +
                                                                                                                                  296{
                                                                                                                                  +
                                                                                                                                  297 return (min_val < val) && (val < max_val);
                                                                                                                                  +
                                                                                                                                  298}
                                                                                                                                  +
                                                                                                                                  299
                                                                                                                                  +
                                                                                                                                  300template<typename Container>
                                                                                                                                  +
                                                                                                                                  301bool key_exists(const Container& container, const typename Container::key_type& key)
                                                                                                                                  +
                                                                                                                                  302{
                                                                                                                                  +
                                                                                                                                  303 return container.find(key) != container.end();
                                                                                                                                  +
                                                                                                                                  304}
                                                                                                                                  +
                                                                                                                                  305
                                                                                                                                  +
                                                                                                                                  306template<typename Cleanup_func>
                                                                                                                                  +
                                                                                                                                  307Auto_cleanup setup_auto_cleanup(const Cleanup_func& func)
                                                                                                                                  +
                                                                                                                                  308{
                                                                                                                                  +
                                                                                                                                  309 /* This trick, from shared_ptr or bind Boost docs (if I recall correctly), uses shared_ptr's deleter feature. The
                                                                                                                                  +
                                                                                                                                  310 * Auto_cleanup gains "ownership" of null pointer, purely for the purpose of running a deleter on it when the object
                                                                                                                                  +
                                                                                                                                  311 * goes out of scope sometime later. Deleting 0 itself would have been useless no-op, and instead we ignore the null
                                                                                                                                  +
                                                                                                                                  312 * and simply call user's func(), which is what the goal is.
                                                                                                                                  +
                                                                                                                                  313 *
                                                                                                                                  +
                                                                                                                                  314 * Subtlety: shared_ptr docs say the passed-in deleter is saved by copy, so we needn't worry about it disappearing
                                                                                                                                  +
                                                                                                                                  315 * after we return.
                                                                                                                                  +
                                                                                                                                  316 *
                                                                                                                                  +
                                                                                                                                  317 * Subtlety: we need to make a copy (via capture) of func, as there's zero guarantee (and low likelihood in practice)
                                                                                                                                  +
                                                                                                                                  318 * that func is a valid object at the time cleanup is actually needed (sometime after we return). */
                                                                                                                                  +
                                                                                                                                  319 return Auto_cleanup(static_cast<void*>(0),
                                                                                                                                  +
                                                                                                                                  320 [func](void*) { func(); });
                                                                                                                                  +
                                                                                                                                  321}
                                                                                                                                  +
                                                                                                                                  322
                                                                                                                                  +
                                                                                                                                  323template<typename Minuend, typename Subtrahend>
                                                                                                                                  +
                                                                                                                                  324bool subtract_with_floor(Minuend* minuend, const Subtrahend& subtrahend, const Minuend& floor)
                                                                                                                                  +
                                                                                                                                  325{
                                                                                                                                  +
                                                                                                                                  326 assert(minuend);
                                                                                                                                  +
                                                                                                                                  327
                                                                                                                                  +
                                                                                                                                  328 /* Basically just avoid implicit conversions and anything that mind overflow or underflow.
                                                                                                                                  +
                                                                                                                                  329 * The one underflow we allow is the subtraction of `floor`: doc header says keep `floor` small.
                                                                                                                                  +
                                                                                                                                  330 * So it's their problem if it's not. */
                                                                                                                                  +
                                                                                                                                  331
                                                                                                                                  +
                                                                                                                                  332 const Minuend converted_subtrahend = Minuend(subtrahend);
                                                                                                                                  333
                                                                                                                                  -
                                                                                                                                  334template<typename T>
                                                                                                                                  -
                                                                                                                                  335void feed_args_to_ostream(std::ostream* os, T const & only_ostream_arg)
                                                                                                                                  -
                                                                                                                                  336{
                                                                                                                                  -
                                                                                                                                  337 // Induction base.
                                                                                                                                  -
                                                                                                                                  338 *os << only_ostream_arg;
                                                                                                                                  -
                                                                                                                                  339}
                                                                                                                                  -
                                                                                                                                  340
                                                                                                                                  -
                                                                                                                                  341template<typename ...T>
                                                                                                                                  -
                                                                                                                                  342void ostream_op_to_string(std::string* target_str, T const &... ostream_args)
                                                                                                                                  -
                                                                                                                                  343{
                                                                                                                                  -
                                                                                                                                  344 using std::flush;
                                                                                                                                  -
                                                                                                                                  345
                                                                                                                                  -
                                                                                                                                  346 /* Pushes characters directly onto an `std::string`, instead of doing so into an `ostringstream` and then getting it
                                                                                                                                  -
                                                                                                                                  347 * by copy via `ostringstream::copy()`. This is for performance and may make a large difference
                                                                                                                                  -
                                                                                                                                  348 * overall, if this is used in logging for example. However, Thread_local_string_appender accomplishes
                                                                                                                                  -
                                                                                                                                  349 * better performance still and some other features. */
                                                                                                                                  -
                                                                                                                                  350 String_ostream os(target_str);
                                                                                                                                  -
                                                                                                                                  351 feed_args_to_ostream(&(os.os()), ostream_args...);
                                                                                                                                  -
                                                                                                                                  352 os.os() << flush;
                                                                                                                                  -
                                                                                                                                  353}
                                                                                                                                  -
                                                                                                                                  354
                                                                                                                                  -
                                                                                                                                  355template<typename ...T>
                                                                                                                                  -
                                                                                                                                  356std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  -
                                                                                                                                  357{
                                                                                                                                  -
                                                                                                                                  358 using std::string;
                                                                                                                                  -
                                                                                                                                  359
                                                                                                                                  -
                                                                                                                                  360 string result;
                                                                                                                                  -
                                                                                                                                  361 ostream_op_to_string(&result, ostream_args...);
                                                                                                                                  -
                                                                                                                                  362 return result;
                                                                                                                                  -
                                                                                                                                  363}
                                                                                                                                  -
                                                                                                                                  364
                                                                                                                                  -
                                                                                                                                  365template<typename Map, typename Sequence>
                                                                                                                                  - -
                                                                                                                                  367 (Sequence const & src_seq, Map* target_map,
                                                                                                                                  -
                                                                                                                                  368 const Function<typename Map::mapped_type (size_t)>& idx_to_map_val_func)
                                                                                                                                  -
                                                                                                                                  369{
                                                                                                                                  -
                                                                                                                                  370 size_t idx = 0;
                                                                                                                                  -
                                                                                                                                  371 for (const auto& src_element : src_seq)
                                                                                                                                  -
                                                                                                                                  372 {
                                                                                                                                  -
                                                                                                                                  373 (*target_map)[src_element] = idx_to_map_val_func(idx);
                                                                                                                                  -
                                                                                                                                  374 ++idx;
                                                                                                                                  -
                                                                                                                                  375 }
                                                                                                                                  -
                                                                                                                                  376}
                                                                                                                                  -
                                                                                                                                  377
                                                                                                                                  -
                                                                                                                                  378template<typename Map, typename Sequence>
                                                                                                                                  -
                                                                                                                                  379void sequence_to_inverted_lookup_map(Sequence const & src_seq, Map* target_map)
                                                                                                                                  -
                                                                                                                                  380{
                                                                                                                                  -
                                                                                                                                  381 sequence_to_inverted_lookup_map(src_seq, target_map, [](size_t idx) -> size_t
                                                                                                                                  -
                                                                                                                                  382 {
                                                                                                                                  -
                                                                                                                                  383 return idx;
                                                                                                                                  -
                                                                                                                                  384 });
                                                                                                                                  -
                                                                                                                                  385}
                                                                                                                                  -
                                                                                                                                  386
                                                                                                                                  -
                                                                                                                                  387template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  388std::ostream& buffers_to_ostream(std::ostream& os,
                                                                                                                                  -
                                                                                                                                  389 const Const_buffer_sequence& data,
                                                                                                                                  -
                                                                                                                                  390 const std::string& indentation,
                                                                                                                                  -
                                                                                                                                  391 size_t bytes_per_line)
                                                                                                                                  -
                                                                                                                                  392{
                                                                                                                                  -
                                                                                                                                  393 using boost::io::ios_fill_saver;
                                                                                                                                  -
                                                                                                                                  394 using boost::io::ios_flags_saver;
                                                                                                                                  -
                                                                                                                                  395 using boost::io::ios_width_saver;
                                                                                                                                  -
                                                                                                                                  396 using boost::asio::buffers_iterator;
                                                                                                                                  -
                                                                                                                                  397 using std::isprint;
                                                                                                                                  -
                                                                                                                                  398
                                                                                                                                  -
                                                                                                                                  399 /* This sweet type will iterate over the buffer sequence (jumping between contained buffers, if ther are > 1).
                                                                                                                                  -
                                                                                                                                  400 * If `Bufs_iter it`, then *it is of type uint8_t. */
                                                                                                                                  -
                                                                                                                                  401 using Bufs_iter = buffers_iterator<Const_buffer_sequence, uint8_t>;
                                                                                                                                  +
                                                                                                                                  334 // min - sub <= floor <===> min - floor <= sub.
                                                                                                                                  +
                                                                                                                                  335 if ((*minuend - floor) <= converted_subtrahend)
                                                                                                                                  +
                                                                                                                                  336 {
                                                                                                                                  +
                                                                                                                                  337 *minuend = floor;
                                                                                                                                  +
                                                                                                                                  338 return false;
                                                                                                                                  +
                                                                                                                                  339 }
                                                                                                                                  +
                                                                                                                                  340 // else
                                                                                                                                  +
                                                                                                                                  341 *minuend -= converted_subtrahend;
                                                                                                                                  +
                                                                                                                                  342 return true;
                                                                                                                                  +
                                                                                                                                  343}
                                                                                                                                  +
                                                                                                                                  344
                                                                                                                                  +
                                                                                                                                  345template<typename From, typename To>
                                                                                                                                  +
                                                                                                                                  346size_t size_unit_convert(From num_froms)
                                                                                                                                  +
                                                                                                                                  347{
                                                                                                                                  +
                                                                                                                                  348 return ((num_froms * sizeof(From)) + sizeof(To) - 1) / sizeof(To);
                                                                                                                                  +
                                                                                                                                  349}
                                                                                                                                  +
                                                                                                                                  350
                                                                                                                                  +
                                                                                                                                  351template<typename T1, typename ...T_rest>
                                                                                                                                  +
                                                                                                                                  352void feed_args_to_ostream(std::ostream* os, T1 const & ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  +
                                                                                                                                  353{
                                                                                                                                  +
                                                                                                                                  354 // Induction step for variadic template.
                                                                                                                                  +
                                                                                                                                  355 feed_args_to_ostream(os, ostream_arg1);
                                                                                                                                  +
                                                                                                                                  356 feed_args_to_ostream(os, remaining_ostream_args...);
                                                                                                                                  +
                                                                                                                                  357}
                                                                                                                                  +
                                                                                                                                  358
                                                                                                                                  +
                                                                                                                                  359template<typename T>
                                                                                                                                  +
                                                                                                                                  360void feed_args_to_ostream(std::ostream* os, T const & only_ostream_arg)
                                                                                                                                  +
                                                                                                                                  361{
                                                                                                                                  +
                                                                                                                                  362 // Induction base.
                                                                                                                                  +
                                                                                                                                  363 *os << only_ostream_arg;
                                                                                                                                  +
                                                                                                                                  364}
                                                                                                                                  +
                                                                                                                                  365
                                                                                                                                  +
                                                                                                                                  366template<typename ...T>
                                                                                                                                  +
                                                                                                                                  367void ostream_op_to_string(std::string* target_str, T const &... ostream_args)
                                                                                                                                  +
                                                                                                                                  368{
                                                                                                                                  +
                                                                                                                                  369 using std::flush;
                                                                                                                                  +
                                                                                                                                  370
                                                                                                                                  +
                                                                                                                                  371 /* Pushes characters directly onto an `std::string`, instead of doing so into an `ostringstream` and then getting it
                                                                                                                                  +
                                                                                                                                  372 * by copy via `ostringstream::copy()`. This is for performance and may make a large difference
                                                                                                                                  +
                                                                                                                                  373 * overall, if this is used in logging for example. However, Thread_local_string_appender accomplishes
                                                                                                                                  +
                                                                                                                                  374 * better performance still and some other features. */
                                                                                                                                  +
                                                                                                                                  375 String_ostream os(target_str);
                                                                                                                                  +
                                                                                                                                  376 feed_args_to_ostream(&(os.os()), ostream_args...);
                                                                                                                                  +
                                                                                                                                  377 os.os() << flush;
                                                                                                                                  +
                                                                                                                                  378}
                                                                                                                                  +
                                                                                                                                  379
                                                                                                                                  +
                                                                                                                                  380template<typename ...T>
                                                                                                                                  +
                                                                                                                                  381std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  +
                                                                                                                                  382{
                                                                                                                                  +
                                                                                                                                  383 using std::string;
                                                                                                                                  +
                                                                                                                                  384
                                                                                                                                  +
                                                                                                                                  385 string result;
                                                                                                                                  +
                                                                                                                                  386 ostream_op_to_string(&result, ostream_args...);
                                                                                                                                  +
                                                                                                                                  387 return result;
                                                                                                                                  +
                                                                                                                                  388}
                                                                                                                                  +
                                                                                                                                  389
                                                                                                                                  +
                                                                                                                                  390template<typename Map, typename Sequence>
                                                                                                                                  + +
                                                                                                                                  392 (Sequence const & src_seq, Map* target_map,
                                                                                                                                  +
                                                                                                                                  393 const Function<typename Map::mapped_type (size_t)>& idx_to_map_val_func)
                                                                                                                                  +
                                                                                                                                  394{
                                                                                                                                  +
                                                                                                                                  395 size_t idx = 0;
                                                                                                                                  +
                                                                                                                                  396 for (const auto& src_element : src_seq)
                                                                                                                                  +
                                                                                                                                  397 {
                                                                                                                                  +
                                                                                                                                  398 (*target_map)[src_element] = idx_to_map_val_func(idx);
                                                                                                                                  +
                                                                                                                                  399 ++idx;
                                                                                                                                  +
                                                                                                                                  400 }
                                                                                                                                  +
                                                                                                                                  401}
                                                                                                                                  402
                                                                                                                                  -
                                                                                                                                  403 constexpr size_t BYTES_PER_LINE_DEFAULT = 16;
                                                                                                                                  -
                                                                                                                                  404 bool single_line_mode = false;
                                                                                                                                  -
                                                                                                                                  405 if (bytes_per_line == 0)
                                                                                                                                  -
                                                                                                                                  406 {
                                                                                                                                  -
                                                                                                                                  407 bytes_per_line = BYTES_PER_LINE_DEFAULT;
                                                                                                                                  -
                                                                                                                                  408 }
                                                                                                                                  -
                                                                                                                                  409 else if (bytes_per_line == size_t(-1))
                                                                                                                                  -
                                                                                                                                  410 {
                                                                                                                                  -
                                                                                                                                  411 /* Firstly just pretend exactly the bytes in the whole input = "max" bytes per line.
                                                                                                                                  -
                                                                                                                                  412 * This accomplishes the bulk of what "single-line mode" means. */
                                                                                                                                  -
                                                                                                                                  413 bytes_per_line = buffer_size(data);
                                                                                                                                  -
                                                                                                                                  414 // A bit slow potentially to need to enumerate all scattered buffers. Eh. Contract said we should be assumed slow.
                                                                                                                                  -
                                                                                                                                  415
                                                                                                                                  -
                                                                                                                                  416 // The rest of what it means is lacking a newline at the end in single-line mode. So just remember that part.
                                                                                                                                  -
                                                                                                                                  417 single_line_mode = true;
                                                                                                                                  -
                                                                                                                                  418 }
                                                                                                                                  -
                                                                                                                                  419
                                                                                                                                  -
                                                                                                                                  420 // Ensure format settings return to their previous values subsequently.
                                                                                                                                  -
                                                                                                                                  421 ios_flags_saver flags_saver(os);
                                                                                                                                  -
                                                                                                                                  422 ios_fill_saver fill_saver(os);
                                                                                                                                  -
                                                                                                                                  423 ios_width_saver width_saver(os);
                                                                                                                                  -
                                                                                                                                  424
                                                                                                                                  -
                                                                                                                                  425 /* Set formatting and output numeric value (hex) of first byte.
                                                                                                                                  -
                                                                                                                                  426 * @todo Is there a way to write this with manipulators too? */
                                                                                                                                  -
                                                                                                                                  427 os.setf(std::ios::right | std::ios::hex, std::ios::adjustfield | std::ios::basefield);
                                                                                                                                  -
                                                                                                                                  428 os << std::setfill('0');
                                                                                                                                  -
                                                                                                                                  429
                                                                                                                                  -
                                                                                                                                  430 const Bufs_iter end_byte_it = Bufs_iter::end(data);
                                                                                                                                  -
                                                                                                                                  431
                                                                                                                                  -
                                                                                                                                  432 for (Bufs_iter cur_byte_it = Bufs_iter::begin(data);
                                                                                                                                  -
                                                                                                                                  433 cur_byte_it != end_byte_it;
                                                                                                                                  -
                                                                                                                                  434 /* Advancing of cur_byte_it occurs within body of loop. */)
                                                                                                                                  +
                                                                                                                                  403template<typename Map, typename Sequence>
                                                                                                                                  +
                                                                                                                                  404void sequence_to_inverted_lookup_map(Sequence const & src_seq, Map* target_map)
                                                                                                                                  +
                                                                                                                                  405{
                                                                                                                                  +
                                                                                                                                  406 sequence_to_inverted_lookup_map(src_seq, target_map, [](size_t idx) -> size_t
                                                                                                                                  +
                                                                                                                                  407 {
                                                                                                                                  +
                                                                                                                                  408 return idx;
                                                                                                                                  +
                                                                                                                                  409 });
                                                                                                                                  +
                                                                                                                                  410}
                                                                                                                                  +
                                                                                                                                  411
                                                                                                                                  +
                                                                                                                                  412template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  413std::ostream& buffers_to_ostream(std::ostream& os,
                                                                                                                                  +
                                                                                                                                  414 const Const_buffer_sequence& data,
                                                                                                                                  +
                                                                                                                                  415 const std::string& indentation,
                                                                                                                                  +
                                                                                                                                  416 size_t bytes_per_line)
                                                                                                                                  +
                                                                                                                                  417{
                                                                                                                                  +
                                                                                                                                  418 using boost::io::ios_fill_saver;
                                                                                                                                  +
                                                                                                                                  419 using boost::io::ios_flags_saver;
                                                                                                                                  +
                                                                                                                                  420 using boost::io::ios_width_saver;
                                                                                                                                  +
                                                                                                                                  421 using boost::asio::buffers_iterator;
                                                                                                                                  +
                                                                                                                                  422 using std::isprint;
                                                                                                                                  +
                                                                                                                                  423
                                                                                                                                  +
                                                                                                                                  424 /* This sweet type will iterate over the buffer sequence (jumping between contained buffers, if ther are > 1).
                                                                                                                                  +
                                                                                                                                  425 * If `Bufs_iter it`, then *it is of type uint8_t. */
                                                                                                                                  +
                                                                                                                                  426 using Bufs_iter = buffers_iterator<Const_buffer_sequence, uint8_t>;
                                                                                                                                  +
                                                                                                                                  427
                                                                                                                                  +
                                                                                                                                  428 constexpr size_t BYTES_PER_LINE_DEFAULT = 16;
                                                                                                                                  +
                                                                                                                                  429 bool single_line_mode = false;
                                                                                                                                  +
                                                                                                                                  430 if (bytes_per_line == 0)
                                                                                                                                  +
                                                                                                                                  431 {
                                                                                                                                  +
                                                                                                                                  432 bytes_per_line = BYTES_PER_LINE_DEFAULT;
                                                                                                                                  +
                                                                                                                                  433 }
                                                                                                                                  +
                                                                                                                                  434 else if (bytes_per_line == size_t(-1))
                                                                                                                                  435 {
                                                                                                                                  -
                                                                                                                                  436 // The for() loop around us guarantees there is at least this first byte. Print the numeric value.
                                                                                                                                  -
                                                                                                                                  437 os << indentation << '['
                                                                                                                                  -
                                                                                                                                  438 << std::setw(2) << int(*cur_byte_it); // Numeric value in hex.
                                                                                                                                  -
                                                                                                                                  439
                                                                                                                                  -
                                                                                                                                  440 // Repeat for remaining bytes left in this line. Stop at bytes/line limit, or if reached end of buffers.
                                                                                                                                  -
                                                                                                                                  441 size_t n_bytes_printed;
                                                                                                                                  -
                                                                                                                                  442 for ((n_bytes_printed = 1), ++cur_byte_it; // Account for printing that first byte above.
                                                                                                                                  -
                                                                                                                                  443 (n_bytes_printed != bytes_per_line) && (cur_byte_it != end_byte_it);
                                                                                                                                  -
                                                                                                                                  444 ++cur_byte_it, ++n_bytes_printed)
                                                                                                                                  -
                                                                                                                                  445 {
                                                                                                                                  -
                                                                                                                                  446 os << ' ' << std::setw(2) << int(*cur_byte_it); // Numeric value in hex.
                                                                                                                                  -
                                                                                                                                  447 }
                                                                                                                                  -
                                                                                                                                  448
                                                                                                                                  -
                                                                                                                                  449 // Spaces as if rest of line still had a few ghost values to print (space + 2 spaces for the hex digits).
                                                                                                                                  -
                                                                                                                                  450 for (size_t n_bytes_printed_including_padding = n_bytes_printed;
                                                                                                                                  -
                                                                                                                                  451 n_bytes_printed_including_padding != bytes_per_line;
                                                                                                                                  -
                                                                                                                                  452 ++n_bytes_printed_including_padding)
                                                                                                                                  -
                                                                                                                                  453 {
                                                                                                                                  -
                                                                                                                                  454 os << " ";
                                                                                                                                  -
                                                                                                                                  455 }
                                                                                                                                  +
                                                                                                                                  436 /* Firstly just pretend exactly the bytes in the whole input = "max" bytes per line.
                                                                                                                                  +
                                                                                                                                  437 * This accomplishes the bulk of what "single-line mode" means. */
                                                                                                                                  +
                                                                                                                                  438 bytes_per_line = buffer_size(data);
                                                                                                                                  +
                                                                                                                                  439 // A bit slow potentially to need to enumerate all scattered buffers. Eh. Contract said we should be assumed slow.
                                                                                                                                  +
                                                                                                                                  440
                                                                                                                                  +
                                                                                                                                  441 // The rest of what it means is lacking a newline at the end in single-line mode. So just remember that part.
                                                                                                                                  +
                                                                                                                                  442 single_line_mode = true;
                                                                                                                                  +
                                                                                                                                  443 }
                                                                                                                                  +
                                                                                                                                  444
                                                                                                                                  +
                                                                                                                                  445 // Ensure format settings return to their previous values subsequently.
                                                                                                                                  +
                                                                                                                                  446 ios_flags_saver flags_saver(os);
                                                                                                                                  +
                                                                                                                                  447 ios_fill_saver fill_saver(os);
                                                                                                                                  +
                                                                                                                                  448 ios_width_saver width_saver(os);
                                                                                                                                  +
                                                                                                                                  449
                                                                                                                                  +
                                                                                                                                  450 /* Set formatting and output numeric value (hex) of first byte.
                                                                                                                                  +
                                                                                                                                  451 * @todo Is there a way to write this with manipulators too? */
                                                                                                                                  +
                                                                                                                                  452 os.setf(std::ios::right | std::ios::hex, std::ios::adjustfield | std::ios::basefield);
                                                                                                                                  +
                                                                                                                                  453 os << std::setfill('0');
                                                                                                                                  +
                                                                                                                                  454
                                                                                                                                  +
                                                                                                                                  455 const Bufs_iter end_byte_it = Bufs_iter::end(data);
                                                                                                                                  456
                                                                                                                                  -
                                                                                                                                  457 // Backtrack and print those same bytes -- this time as printable characters (when printable, else dots).
                                                                                                                                  -
                                                                                                                                  458 cur_byte_it -= n_bytes_printed;
                                                                                                                                  -
                                                                                                                                  459
                                                                                                                                  -
                                                                                                                                  460 os << '|';
                                                                                                                                  -
                                                                                                                                  461 for (size_t n_chars_printed = 0;
                                                                                                                                  -
                                                                                                                                  462 n_chars_printed != n_bytes_printed;
                                                                                                                                  -
                                                                                                                                  463 ++cur_byte_it, ++n_chars_printed)
                                                                                                                                  -
                                                                                                                                  464 {
                                                                                                                                  -
                                                                                                                                  465 char c = *cur_byte_it;
                                                                                                                                  -
                                                                                                                                  466 os << (isprint(c) ? c : '.');
                                                                                                                                  -
                                                                                                                                  467 }
                                                                                                                                  -
                                                                                                                                  468 os << ']';
                                                                                                                                  -
                                                                                                                                  469 if (!single_line_mode)
                                                                                                                                  +
                                                                                                                                  457 for (Bufs_iter cur_byte_it = Bufs_iter::begin(data);
                                                                                                                                  +
                                                                                                                                  458 cur_byte_it != end_byte_it;
                                                                                                                                  +
                                                                                                                                  459 /* Advancing of cur_byte_it occurs within body of loop. */)
                                                                                                                                  +
                                                                                                                                  460 {
                                                                                                                                  +
                                                                                                                                  461 // The for() loop around us guarantees there is at least this first byte. Print the numeric value.
                                                                                                                                  +
                                                                                                                                  462 os << indentation << '['
                                                                                                                                  +
                                                                                                                                  463 << std::setw(2) << int(*cur_byte_it); // Numeric value in hex.
                                                                                                                                  +
                                                                                                                                  464
                                                                                                                                  +
                                                                                                                                  465 // Repeat for remaining bytes left in this line. Stop at bytes/line limit, or if reached end of buffers.
                                                                                                                                  +
                                                                                                                                  466 size_t n_bytes_printed;
                                                                                                                                  +
                                                                                                                                  467 for ((n_bytes_printed = 1), ++cur_byte_it; // Account for printing that first byte above.
                                                                                                                                  +
                                                                                                                                  468 (n_bytes_printed != bytes_per_line) && (cur_byte_it != end_byte_it);
                                                                                                                                  +
                                                                                                                                  469 ++cur_byte_it, ++n_bytes_printed)
                                                                                                                                  470 {
                                                                                                                                  -
                                                                                                                                  471 os << '\n';
                                                                                                                                  +
                                                                                                                                  471 os << ' ' << std::setw(2) << int(*cur_byte_it); // Numeric value in hex.
                                                                                                                                  472 }
                                                                                                                                  -
                                                                                                                                  473 } // for (cur_byte_it)
                                                                                                                                  -
                                                                                                                                  474
                                                                                                                                  -
                                                                                                                                  475 return os;
                                                                                                                                  -
                                                                                                                                  476
                                                                                                                                  -
                                                                                                                                  477 // The formatting changes will be restored here as the savers exit scope.
                                                                                                                                  -
                                                                                                                                  478} // buffers_to_ostream()
                                                                                                                                  -
                                                                                                                                  479
                                                                                                                                  -
                                                                                                                                  480template<typename Const_buffer_sequence>
                                                                                                                                  -
                                                                                                                                  481std::string buffers_dump_string(const Const_buffer_sequence& data, const std::string& indentation,
                                                                                                                                  -
                                                                                                                                  482 size_t bytes_per_line)
                                                                                                                                  -
                                                                                                                                  483{
                                                                                                                                  -
                                                                                                                                  484 using std::flush;
                                                                                                                                  -
                                                                                                                                  485 using std::string;
                                                                                                                                  -
                                                                                                                                  486
                                                                                                                                  -
                                                                                                                                  487 // See comment in ostream_op_to_string() which applies here too (re. perf).
                                                                                                                                  -
                                                                                                                                  488
                                                                                                                                  -
                                                                                                                                  489 string target_str;
                                                                                                                                  -
                                                                                                                                  490 String_ostream os(&target_str);
                                                                                                                                  -
                                                                                                                                  491 buffers_to_ostream(os.os(), data, indentation, bytes_per_line);
                                                                                                                                  -
                                                                                                                                  492 os.os() << flush;
                                                                                                                                  -
                                                                                                                                  493
                                                                                                                                  -
                                                                                                                                  494 return target_str;
                                                                                                                                  -
                                                                                                                                  495}
                                                                                                                                  -
                                                                                                                                  496
                                                                                                                                  -
                                                                                                                                  497template<typename Enum>
                                                                                                                                  -
                                                                                                                                  498Enum istream_to_enum(std::istream* is_ptr, Enum enum_default, Enum enum_sentinel,
                                                                                                                                  -
                                                                                                                                  499 bool accept_num_encoding, bool case_sensitive,
                                                                                                                                  -
                                                                                                                                  500 Enum enum_lowest)
                                                                                                                                  -
                                                                                                                                  501{
                                                                                                                                  -
                                                                                                                                  502 using boost::lexical_cast;
                                                                                                                                  -
                                                                                                                                  503 using boost::bad_lexical_cast;
                                                                                                                                  -
                                                                                                                                  504 using boost::algorithm::equals;
                                                                                                                                  -
                                                                                                                                  505 using boost::algorithm::is_iequal;
                                                                                                                                  -
                                                                                                                                  506 using std::locale;
                                                                                                                                  -
                                                                                                                                  507 using std::string;
                                                                                                                                  -
                                                                                                                                  508 using std::isdigit;
                                                                                                                                  -
                                                                                                                                  509 using std::isalnum;
                                                                                                                                  -
                                                                                                                                  510 using Traits = std::char_traits<char>;
                                                                                                                                  -
                                                                                                                                  511 using enum_t = std::underlying_type_t<Enum>;
                                                                                                                                  -
                                                                                                                                  512
                                                                                                                                  -
                                                                                                                                  513 // Reminder: There are various assumptions about Enum this takes for granted; behavior undefined otherwise.
                                                                                                                                  -
                                                                                                                                  514
                                                                                                                                  -
                                                                                                                                  515 assert(enum_t(enum_lowest) >= 0); // Otherwise we'd have to allow '-' (minus sign), and we'd... just rather not.
                                                                                                                                  -
                                                                                                                                  516 auto& is = *is_ptr;
                                                                                                                                  -
                                                                                                                                  517 const is_iequal i_equal_func(locale::classic());
                                                                                                                                  +
                                                                                                                                  473
                                                                                                                                  +
                                                                                                                                  474 // Spaces as if rest of line still had a few ghost values to print (space + 2 spaces for the hex digits).
                                                                                                                                  +
                                                                                                                                  475 for (size_t n_bytes_printed_including_padding = n_bytes_printed;
                                                                                                                                  +
                                                                                                                                  476 n_bytes_printed_including_padding != bytes_per_line;
                                                                                                                                  +
                                                                                                                                  477 ++n_bytes_printed_including_padding)
                                                                                                                                  +
                                                                                                                                  478 {
                                                                                                                                  +
                                                                                                                                  479 os << " ";
                                                                                                                                  +
                                                                                                                                  480 }
                                                                                                                                  +
                                                                                                                                  481
                                                                                                                                  +
                                                                                                                                  482 // Backtrack and print those same bytes -- this time as printable characters (when printable, else dots).
                                                                                                                                  +
                                                                                                                                  483 cur_byte_it -= n_bytes_printed;
                                                                                                                                  +
                                                                                                                                  484
                                                                                                                                  +
                                                                                                                                  485 os << '|';
                                                                                                                                  +
                                                                                                                                  486 for (size_t n_chars_printed = 0;
                                                                                                                                  +
                                                                                                                                  487 n_chars_printed != n_bytes_printed;
                                                                                                                                  +
                                                                                                                                  488 ++cur_byte_it, ++n_chars_printed)
                                                                                                                                  +
                                                                                                                                  489 {
                                                                                                                                  +
                                                                                                                                  490 char c = *cur_byte_it;
                                                                                                                                  +
                                                                                                                                  491 os << (isprint(c) ? c : '.');
                                                                                                                                  +
                                                                                                                                  492 }
                                                                                                                                  +
                                                                                                                                  493 os << ']';
                                                                                                                                  +
                                                                                                                                  494 if (!single_line_mode)
                                                                                                                                  +
                                                                                                                                  495 {
                                                                                                                                  +
                                                                                                                                  496 os << '\n';
                                                                                                                                  +
                                                                                                                                  497 }
                                                                                                                                  +
                                                                                                                                  498 } // for (cur_byte_it)
                                                                                                                                  +
                                                                                                                                  499
                                                                                                                                  +
                                                                                                                                  500 return os;
                                                                                                                                  +
                                                                                                                                  501
                                                                                                                                  +
                                                                                                                                  502 // The formatting changes will be restored here as the savers exit scope.
                                                                                                                                  +
                                                                                                                                  503} // buffers_to_ostream()
                                                                                                                                  +
                                                                                                                                  504
                                                                                                                                  +
                                                                                                                                  505template<typename Const_buffer_sequence>
                                                                                                                                  +
                                                                                                                                  506std::string buffers_dump_string(const Const_buffer_sequence& data, const std::string& indentation,
                                                                                                                                  +
                                                                                                                                  507 size_t bytes_per_line)
                                                                                                                                  +
                                                                                                                                  508{
                                                                                                                                  +
                                                                                                                                  509 using std::flush;
                                                                                                                                  +
                                                                                                                                  510 using std::string;
                                                                                                                                  +
                                                                                                                                  511
                                                                                                                                  +
                                                                                                                                  512 // See comment in ostream_op_to_string() which applies here too (re. perf).
                                                                                                                                  +
                                                                                                                                  513
                                                                                                                                  +
                                                                                                                                  514 string target_str;
                                                                                                                                  +
                                                                                                                                  515 String_ostream os(&target_str);
                                                                                                                                  +
                                                                                                                                  516 buffers_to_ostream(os.os(), data, indentation, bytes_per_line);
                                                                                                                                  +
                                                                                                                                  517 os.os() << flush;
                                                                                                                                  518
                                                                                                                                  -
                                                                                                                                  519 // Read into `token` until (and not including) the first non-alphanumeric/underscore character or stream end.
                                                                                                                                  -
                                                                                                                                  520 string token;
                                                                                                                                  -
                                                                                                                                  521 char ch;
                                                                                                                                  -
                                                                                                                                  522 while (((ch = is.peek()) != Traits::eof()) && (isalnum(ch) || (ch == '_')))
                                                                                                                                  -
                                                                                                                                  523 {
                                                                                                                                  -
                                                                                                                                  524 token += ch;
                                                                                                                                  -
                                                                                                                                  525 is.get();
                                                                                                                                  -
                                                                                                                                  526 }
                                                                                                                                  -
                                                                                                                                  527
                                                                                                                                  -
                                                                                                                                  528 Enum val = enum_default;
                                                                                                                                  -
                                                                                                                                  529
                                                                                                                                  -
                                                                                                                                  530 if (!token.empty())
                                                                                                                                  -
                                                                                                                                  531 {
                                                                                                                                  -
                                                                                                                                  532 if (accept_num_encoding && isdigit(token.front())) // Hence ostream<< shouldn't serialize a digit-leading value.
                                                                                                                                  -
                                                                                                                                  533 {
                                                                                                                                  -
                                                                                                                                  534 enum_t num_enum;
                                                                                                                                  -
                                                                                                                                  535 try
                                                                                                                                  -
                                                                                                                                  536 {
                                                                                                                                  -
                                                                                                                                  537 num_enum = lexical_cast<enum_t>(token);
                                                                                                                                  -
                                                                                                                                  538 // This assumes a vanilla enum integer value ordering.
                                                                                                                                  -
                                                                                                                                  539 if ((num_enum >= enum_t(enum_sentinel) || (num_enum < enum_t(enum_lowest))))
                                                                                                                                  -
                                                                                                                                  540 {
                                                                                                                                  -
                                                                                                                                  541 num_enum = enum_t(enum_default);
                                                                                                                                  -
                                                                                                                                  542 }
                                                                                                                                  -
                                                                                                                                  543 val = Enum(num_enum);
                                                                                                                                  -
                                                                                                                                  544 }
                                                                                                                                  -
                                                                                                                                  545 catch (const bad_lexical_cast& exc)
                                                                                                                                  -
                                                                                                                                  546 {
                                                                                                                                  -
                                                                                                                                  547 assert(val == enum_default);
                                                                                                                                  -
                                                                                                                                  548 }
                                                                                                                                  -
                                                                                                                                  549 } // if (accept_num_encoding && isdigit())
                                                                                                                                  -
                                                                                                                                  550 else // if (!(accept_num_encoding && isdigit()))
                                                                                                                                  -
                                                                                                                                  551 {
                                                                                                                                  -
                                                                                                                                  552 enum_t idx;
                                                                                                                                  -
                                                                                                                                  553 // This assumes a vanilla enum integer value ordering within this [closed range].
                                                                                                                                  -
                                                                                                                                  554 for (idx = enum_t(enum_lowest); idx != enum_t(enum_sentinel); ++idx)
                                                                                                                                  -
                                                                                                                                  555 {
                                                                                                                                  -
                                                                                                                                  556 const auto candidate = Enum(idx);
                                                                                                                                  -
                                                                                                                                  557 /* Note -- lexical_cast<string>(Enum) == (operator<<(ostringstream&, Enum)).str() -- the symbolic
                                                                                                                                  -
                                                                                                                                  558 * encoding of Enum (as we promised to accept, case-[in]sensitively), not the numeric encoding. The numeric
                                                                                                                                  -
                                                                                                                                  559 * encoding is checked-for in the `if (accept_num_encoding...)` branch above using a non-looping technique. */
                                                                                                                                  -
                                                                                                                                  560 if (case_sensitive ? equals(token, lexical_cast<string>(candidate))
                                                                                                                                  -
                                                                                                                                  561 : equals(token, lexical_cast<string>(candidate), i_equal_func))
                                                                                                                                  -
                                                                                                                                  562 {
                                                                                                                                  -
                                                                                                                                  563 val = candidate;
                                                                                                                                  -
                                                                                                                                  564 break;
                                                                                                                                  -
                                                                                                                                  565 }
                                                                                                                                  -
                                                                                                                                  566 }
                                                                                                                                  -
                                                                                                                                  567 assert((idx != enum_t(enum_sentinel)) || (val == enum_default));
                                                                                                                                  -
                                                                                                                                  568 } // else if (!(accept_num_encoding && isdigit()))
                                                                                                                                  -
                                                                                                                                  569 } // if (!token.empty())
                                                                                                                                  -
                                                                                                                                  570
                                                                                                                                  -
                                                                                                                                  571 return val;
                                                                                                                                  -
                                                                                                                                  572} // istream_to_enum()
                                                                                                                                  -
                                                                                                                                  573
                                                                                                                                  -
                                                                                                                                  574} // namespace flow::util
                                                                                                                                  - +
                                                                                                                                  519 return target_str;
                                                                                                                                  +
                                                                                                                                  520}
                                                                                                                                  +
                                                                                                                                  521
                                                                                                                                  +
                                                                                                                                  522template<typename Enum>
                                                                                                                                  +
                                                                                                                                  523Enum istream_to_enum(std::istream* is_ptr, Enum enum_default, Enum enum_sentinel,
                                                                                                                                  +
                                                                                                                                  524 bool accept_num_encoding, bool case_sensitive,
                                                                                                                                  +
                                                                                                                                  525 Enum enum_lowest)
                                                                                                                                  +
                                                                                                                                  526{
                                                                                                                                  +
                                                                                                                                  527 using boost::lexical_cast;
                                                                                                                                  +
                                                                                                                                  528 using boost::bad_lexical_cast;
                                                                                                                                  +
                                                                                                                                  529 using boost::algorithm::equals;
                                                                                                                                  +
                                                                                                                                  530 using boost::algorithm::is_iequal;
                                                                                                                                  +
                                                                                                                                  531 using std::locale;
                                                                                                                                  +
                                                                                                                                  532 using std::string;
                                                                                                                                  +
                                                                                                                                  533 using std::isdigit;
                                                                                                                                  +
                                                                                                                                  534 using std::isalnum;
                                                                                                                                  +
                                                                                                                                  535 using Traits = std::char_traits<char>;
                                                                                                                                  +
                                                                                                                                  536 using enum_t = std::underlying_type_t<Enum>;
                                                                                                                                  +
                                                                                                                                  537
                                                                                                                                  +
                                                                                                                                  538 // Reminder: There are various assumptions about Enum this takes for granted; behavior undefined otherwise.
                                                                                                                                  +
                                                                                                                                  539
                                                                                                                                  +
                                                                                                                                  540 assert(enum_t(enum_lowest) >= 0); // Otherwise we'd have to allow '-' (minus sign), and we'd... just rather not.
                                                                                                                                  +
                                                                                                                                  541 auto& is = *is_ptr;
                                                                                                                                  +
                                                                                                                                  542 const is_iequal i_equal_func(locale::classic());
                                                                                                                                  +
                                                                                                                                  543
                                                                                                                                  +
                                                                                                                                  544 // Read into `token` until (and not including) the first non-alphanumeric/underscore character or stream end.
                                                                                                                                  +
                                                                                                                                  545 string token;
                                                                                                                                  +
                                                                                                                                  546 char ch;
                                                                                                                                  +
                                                                                                                                  547 while (((ch = is.peek()) != Traits::eof()) && (isalnum(ch) || (ch == '_')))
                                                                                                                                  +
                                                                                                                                  548 {
                                                                                                                                  +
                                                                                                                                  549 token += ch;
                                                                                                                                  +
                                                                                                                                  550 is.get();
                                                                                                                                  +
                                                                                                                                  551 }
                                                                                                                                  +
                                                                                                                                  552
                                                                                                                                  +
                                                                                                                                  553 Enum val = enum_default;
                                                                                                                                  +
                                                                                                                                  554
                                                                                                                                  +
                                                                                                                                  555 if (!token.empty())
                                                                                                                                  +
                                                                                                                                  556 {
                                                                                                                                  +
                                                                                                                                  557 if (accept_num_encoding && isdigit(token.front())) // Hence ostream<< shouldn't serialize a digit-leading value.
                                                                                                                                  +
                                                                                                                                  558 {
                                                                                                                                  +
                                                                                                                                  559 enum_t num_enum;
                                                                                                                                  +
                                                                                                                                  560 try
                                                                                                                                  +
                                                                                                                                  561 {
                                                                                                                                  +
                                                                                                                                  562 num_enum = lexical_cast<enum_t>(token);
                                                                                                                                  +
                                                                                                                                  563 // This assumes a vanilla enum integer value ordering.
                                                                                                                                  +
                                                                                                                                  564 if ((num_enum >= enum_t(enum_sentinel) || (num_enum < enum_t(enum_lowest))))
                                                                                                                                  +
                                                                                                                                  565 {
                                                                                                                                  +
                                                                                                                                  566 num_enum = enum_t(enum_default);
                                                                                                                                  +
                                                                                                                                  567 }
                                                                                                                                  +
                                                                                                                                  568 val = Enum(num_enum);
                                                                                                                                  +
                                                                                                                                  569 }
                                                                                                                                  +
                                                                                                                                  570 catch (const bad_lexical_cast& exc)
                                                                                                                                  +
                                                                                                                                  571 {
                                                                                                                                  +
                                                                                                                                  572 assert(val == enum_default);
                                                                                                                                  +
                                                                                                                                  573 }
                                                                                                                                  +
                                                                                                                                  574 } // if (accept_num_encoding && isdigit())
                                                                                                                                  +
                                                                                                                                  575 else // if (!(accept_num_encoding && isdigit()))
                                                                                                                                  +
                                                                                                                                  576 {
                                                                                                                                  +
                                                                                                                                  577 enum_t idx;
                                                                                                                                  +
                                                                                                                                  578 // This assumes a vanilla enum integer value ordering within this [closed range].
                                                                                                                                  +
                                                                                                                                  579 for (idx = enum_t(enum_lowest); idx != enum_t(enum_sentinel); ++idx)
                                                                                                                                  +
                                                                                                                                  580 {
                                                                                                                                  +
                                                                                                                                  581 const auto candidate = Enum(idx);
                                                                                                                                  +
                                                                                                                                  582 /* Note -- lexical_cast<string>(Enum) == (operator<<(ostringstream&, Enum)).str() -- the symbolic
                                                                                                                                  +
                                                                                                                                  583 * encoding of Enum (as we promised to accept, case-[in]sensitively), not the numeric encoding. The numeric
                                                                                                                                  +
                                                                                                                                  584 * encoding is checked-for in the `if (accept_num_encoding...)` branch above using a non-looping technique. */
                                                                                                                                  +
                                                                                                                                  585 if (case_sensitive ? equals(token, lexical_cast<string>(candidate))
                                                                                                                                  +
                                                                                                                                  586 : equals(token, lexical_cast<string>(candidate), i_equal_func))
                                                                                                                                  +
                                                                                                                                  587 {
                                                                                                                                  +
                                                                                                                                  588 val = candidate;
                                                                                                                                  +
                                                                                                                                  589 break;
                                                                                                                                  +
                                                                                                                                  590 }
                                                                                                                                  +
                                                                                                                                  591 }
                                                                                                                                  +
                                                                                                                                  592 assert((idx != enum_t(enum_sentinel)) || (val == enum_default));
                                                                                                                                  +
                                                                                                                                  593 } // else if (!(accept_num_encoding && isdigit()))
                                                                                                                                  +
                                                                                                                                  594 } // if (!token.empty())
                                                                                                                                  +
                                                                                                                                  595
                                                                                                                                  +
                                                                                                                                  596 return val;
                                                                                                                                  +
                                                                                                                                  597} // istream_to_enum()
                                                                                                                                  +
                                                                                                                                  598
                                                                                                                                  +
                                                                                                                                  599} // namespace flow::util
                                                                                                                                  +
                                                                                                                                  An empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plat...
                                                                                                                                  Definition: util.hpp:45
                                                                                                                                  virtual ~Null_interface()=0
                                                                                                                                  Boring virtual destructor.
                                                                                                                                  -
                                                                                                                                  A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
                                                                                                                                  Definition: util.hpp:120
                                                                                                                                  -
                                                                                                                                  ~Scoped_setter()
                                                                                                                                  Restores *target (from main ctor) to its value at entry to said ctor; or does nothing if *this has be...
                                                                                                                                  Definition: util.hpp:200
                                                                                                                                  -
                                                                                                                                  Value m_saved_value
                                                                                                                                  If and only if m_target_or_null is non-null, this saves *m_target_or_null. Otherwise meaningless.
                                                                                                                                  Definition: util.hpp:173
                                                                                                                                  +
                                                                                                                                  A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
                                                                                                                                  Definition: util.hpp:145
                                                                                                                                  +
                                                                                                                                  ~Scoped_setter()
                                                                                                                                  Restores *target (from main ctor) to its value at entry to said ctor; or does nothing if *this has be...
                                                                                                                                  Definition: util.hpp:225
                                                                                                                                  +
                                                                                                                                  Value m_saved_value
                                                                                                                                  If and only if m_target_or_null is non-null, this saves *m_target_or_null. Otherwise meaningless.
                                                                                                                                  Definition: util.hpp:198
                                                                                                                                  Scoped_setter(const Scoped_setter &)=delete
                                                                                                                                  Prohibit copying: for each explicit ctor invocation, there shall be exactly 1 non-no-op dtor invocati...
                                                                                                                                  Scoped_setter & operator=(const Scoped_setter &)=delete
                                                                                                                                  Prohibit copying (see deleted copy ctor).
                                                                                                                                  -
                                                                                                                                  Value * m_target_or_null
                                                                                                                                  Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally...
                                                                                                                                  Definition: util.hpp:170
                                                                                                                                  -
                                                                                                                                  Scoped_setter(Value *target, Value &&val_src_moved)
                                                                                                                                  Post-condition: *target contains was val_src_moved contained at ctor entry; and the destructor invoca...
                                                                                                                                  Definition: util.hpp:181
                                                                                                                                  +
                                                                                                                                  Value * m_target_or_null
                                                                                                                                  Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally...
                                                                                                                                  Definition: util.hpp:195
                                                                                                                                  +
                                                                                                                                  Scoped_setter(Value *target, Value &&val_src_moved)
                                                                                                                                  Post-condition: *target contains was val_src_moved contained at ctor entry; and the destructor invoca...
                                                                                                                                  Definition: util.hpp:206
                                                                                                                                  Scoped_setter & operator=(Scoped_setter &&)=delete
                                                                                                                                  Prohibit modifying existing *this; except that moving-from is enabled via the move ctor.
                                                                                                                                  Similar to ostringstream but allows fast read-only access directly into the std::string being written...
                                                                                                                                  std::ostream & os()
                                                                                                                                  Access to stream that will write to owned string.
                                                                                                                                  Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
                                                                                                                                  Definition: basic_blob.hpp:29
                                                                                                                                  -
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:262
                                                                                                                                  -
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:276
                                                                                                                                  -
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:282
                                                                                                                                  -
                                                                                                                                  void sequence_to_inverted_lookup_map(Sequence const &src_seq, Map *target_map, const Function< typename Map::mapped_type(size_t)> &idx_to_map_val_func)
                                                                                                                                  Similar to the 2-arg overload of sequence_to_inverted_lookup_map() but with the ability to store a va...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  -
                                                                                                                                  double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  Utility that converts a bandwidth in arbitrary units in both numerator and denominator to the same ba...
                                                                                                                                  Definition: util.hpp:212
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  -
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:498
                                                                                                                                  -
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:299
                                                                                                                                  -
                                                                                                                                  size_t size_unit_convert(From num_froms)
                                                                                                                                  Answers the question what's the smallest integer number of Tos sufficient to verbatim store the given...
                                                                                                                                  Definition: util.hpp:321
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  -
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:233
                                                                                                                                  -
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:270
                                                                                                                                  -
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:254
                                                                                                                                  -
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:342
                                                                                                                                  -
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:388
                                                                                                                                  -
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:246
                                                                                                                                  +
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:287
                                                                                                                                  +
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:301
                                                                                                                                  +
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:307
                                                                                                                                  +
                                                                                                                                  void sequence_to_inverted_lookup_map(Sequence const &src_seq, Map *target_map, const Function< typename Map::mapped_type(size_t)> &idx_to_map_val_func)
                                                                                                                                  Similar to the 2-arg overload of sequence_to_inverted_lookup_map() but with the ability to store a va...
                                                                                                                                  Definition: util.hpp:392
                                                                                                                                  +
                                                                                                                                  double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  Utility that converts a bandwidth in arbitrary units in both numerator and denominator to the same ba...
                                                                                                                                  Definition: util.hpp:237
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  +
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:523
                                                                                                                                  +
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:324
                                                                                                                                  +
                                                                                                                                  size_t size_unit_convert(From num_froms)
                                                                                                                                  Answers the question what's the smallest integer number of Tos sufficient to verbatim store the given...
                                                                                                                                  Definition: util.hpp:346
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  +
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:258
                                                                                                                                  +
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:295
                                                                                                                                  +
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:279
                                                                                                                                  +
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  +
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:413
                                                                                                                                  +
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:271
                                                                                                                                  boost::shared_ptr< void > Auto_cleanup
                                                                                                                                  Helper type for setup_auto_cleanup().
                                                                                                                                  Definition: util_fwd.hpp:205
                                                                                                                                  -
                                                                                                                                  void feed_args_to_ostream(std::ostream *os, T1 const &ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  "Induction step" version of variadic function template that simply outputs arguments 2+ via << to the...
                                                                                                                                  Definition: util.hpp:327
                                                                                                                                  +
                                                                                                                                  void feed_args_to_ostream(std::ostream *os, T1 const &ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  "Induction step" version of variadic function template that simply outputs arguments 2+ via << to the...
                                                                                                                                  Definition: util.hpp:352
                                                                                                                                  +
                                                                                                                                  Useful as a no-unique-address private member to make a type noncopyable while keeping that type an ag...
                                                                                                                                  Definition: util.hpp:74
                                                                                                                                  +
                                                                                                                                  Noncopyable(const Noncopyable &)=delete
                                                                                                                                  Forbid copying.
                                                                                                                                  +
                                                                                                                                  void operator=(const Noncopyable &)=delete
                                                                                                                                  Forbid copying.
                                                                                                                                  +
                                                                                                                                  Noncopyable()=default
                                                                                                                                  Makes it possible to instantiate.
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/util_8cpp.html b/doc/flow_doc/generated/html_full/util_8cpp.html index f616971e3..620630176 100644 --- a/doc/flow_doc/generated/html_full/util_8cpp.html +++ b/doc/flow_doc/generated/html_full/util_8cpp.html @@ -108,7 +108,7 @@ diff --git a/doc/flow_doc/generated/html_full/util_8cpp_source.html b/doc/flow_doc/generated/html_full/util_8cpp_source.html index 67b00c971..0ffbfd2c2 100644 --- a/doc/flow_doc/generated/html_full/util_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/util_8cpp_source.html @@ -291,7 +291,7 @@ diff --git a/doc/flow_doc/generated/html_full/util__fwd_8hpp.html b/doc/flow_doc/generated/html_full/util__fwd_8hpp.html index 52d8034e8..5f943237d 100644 --- a/doc/flow_doc/generated/html_full/util__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/util__fwd_8hpp.html @@ -415,7 +415,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/util__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/util__fwd_8hpp_source.html index d2ba26886..cd867d48e 100644 --- a/doc/flow_doc/generated/html_full/util__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/util__fwd_8hpp_source.html @@ -1156,42 +1156,42 @@
                                                                                                                                  1084 while (false)
                                                                                                                                  1085
                                                                                                                                  1086} // namespace flow::util
                                                                                                                                  - +
                                                                                                                                  An object of this class is a map that combines the lookup speed of a boost::unordered_map<> and order...
                                                                                                                                  An object of this class is a set that combines the lookup speed of an unordered_set<> and ordering an...
                                                                                                                                  Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
                                                                                                                                  Definition: basic_blob.hpp:29
                                                                                                                                  boost::unique_lock< Mutex_recursive > Lock_guard_recursive
                                                                                                                                  (Deprecated given C++1x) Short-hand for advanced-capability RAII lock guard for Mutex_recursive mutex...
                                                                                                                                  Definition: util_fwd.hpp:291
                                                                                                                                  -
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:262
                                                                                                                                  -
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:276
                                                                                                                                  +
                                                                                                                                  bool in_closed_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a [low,...
                                                                                                                                  Definition: util.hpp:287
                                                                                                                                  +
                                                                                                                                  bool key_exists(const Container &container, const typename Container::key_type &key)
                                                                                                                                  Returns true if and only if the given key is present at least once in the given associative container...
                                                                                                                                  Definition: util.hpp:301
                                                                                                                                  void beautify_chrono_ostream(std::ostream *os_ptr)
                                                                                                                                  Sets certain chrono-related formatting on the given ostream that results in a consistent,...
                                                                                                                                  Definition: util.cpp:173
                                                                                                                                  -
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:282
                                                                                                                                  +
                                                                                                                                  Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                  Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                  Definition: util.hpp:307
                                                                                                                                  Thread::id Thread_id
                                                                                                                                  Short-hand for an OS-provided ID of a util::Thread.
                                                                                                                                  Definition: util_fwd.hpp:90
                                                                                                                                  -
                                                                                                                                  void sequence_to_inverted_lookup_map(Sequence const &src_seq, Map *target_map, const Function< typename Map::mapped_type(size_t)> &idx_to_map_val_func)
                                                                                                                                  Similar to the 2-arg overload of sequence_to_inverted_lookup_map() but with the ability to store a va...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  -
                                                                                                                                  double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  Utility that converts a bandwidth in arbitrary units in both numerator and denominator to the same ba...
                                                                                                                                  Definition: util.hpp:212
                                                                                                                                  -
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:481
                                                                                                                                  -
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:498
                                                                                                                                  +
                                                                                                                                  void sequence_to_inverted_lookup_map(Sequence const &src_seq, Map *target_map, const Function< typename Map::mapped_type(size_t)> &idx_to_map_val_func)
                                                                                                                                  Similar to the 2-arg overload of sequence_to_inverted_lookup_map() but with the ability to store a va...
                                                                                                                                  Definition: util.hpp:392
                                                                                                                                  +
                                                                                                                                  double to_mbit_per_sec(N_items items_per_time, size_t bits_per_item)
                                                                                                                                  Utility that converts a bandwidth in arbitrary units in both numerator and denominator to the same ba...
                                                                                                                                  Definition: util.hpp:237
                                                                                                                                  +
                                                                                                                                  std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                  Definition: util.hpp:506
                                                                                                                                  +
                                                                                                                                  Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)
                                                                                                                                  Deserializes an enum class value from a standard input stream.
                                                                                                                                  Definition: util.hpp:523
                                                                                                                                  boost::asio::ip::address_v6 Ip_address_v6
                                                                                                                                  Short-hand for the IPv6 address type.
                                                                                                                                  Definition: util_fwd.hpp:212
                                                                                                                                  boost::asio::ip::address_v4 Ip_address_v4
                                                                                                                                  Short-hand for the IPv4 address type.
                                                                                                                                  Definition: util_fwd.hpp:210
                                                                                                                                  -
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:299
                                                                                                                                  +
                                                                                                                                  bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                  Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                  Definition: util.hpp:324
                                                                                                                                  size_t deep_size(const std::string &val)
                                                                                                                                  Estimate of memory footprint of the given value, including memory allocated on its behalf – but exclu...
                                                                                                                                  Definition: util.cpp:186
                                                                                                                                  boost::unique_lock< Mutex > Lock_guard
                                                                                                                                  Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
                                                                                                                                  Definition: util_fwd.hpp:265
                                                                                                                                  boost::shared_mutex Mutex_shared_non_recursive
                                                                                                                                  Short-hand for non-reentrant, shared-or-exclusive mutex.
                                                                                                                                  Definition: util_fwd.hpp:243
                                                                                                                                  -
                                                                                                                                  size_t size_unit_convert(From num_froms)
                                                                                                                                  Answers the question what's the smallest integer number of Tos sufficient to verbatim store the given...
                                                                                                                                  Definition: util.hpp:321
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  size_t size_unit_convert(From num_froms)
                                                                                                                                  Answers the question what's the smallest integer number of Tos sufficient to verbatim store the given...
                                                                                                                                  Definition: util.hpp:346
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  boost::shared_lock< Mutex_shared_non_recursive > Lock_guard_shared_non_recursive_sh
                                                                                                                                  (Deprecated given C++1x) Short-hand for shared mode advanced-capability RAII lock guard for Mutex_sha...
                                                                                                                                  Definition: util_fwd.hpp:300
                                                                                                                                  -
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:233
                                                                                                                                  +
                                                                                                                                  Integer ceil_div(Integer dividend, Integer divisor)
                                                                                                                                  Returns the result of the given non-negative integer divided by a positive integer,...
                                                                                                                                  Definition: util.hpp:258
                                                                                                                                  void swap(Basic_blob< Allocator, S_SHARING_ALLOWED > &blob1, Basic_blob< Allocator, S_SHARING_ALLOWED > &blob2, log::Logger *logger_ptr)
                                                                                                                                  Equivalent to blob1.swap(blob2).
                                                                                                                                  -
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:270
                                                                                                                                  -
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:254
                                                                                                                                  -
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:342
                                                                                                                                  +
                                                                                                                                  bool in_open_open_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:295
                                                                                                                                  +
                                                                                                                                  bool in_open_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, given as a (low,...
                                                                                                                                  Definition: util.hpp:279
                                                                                                                                  +
                                                                                                                                  void ostream_op_to_string(std::string *target_str, T const &... ostream_args)
                                                                                                                                  Writes to the specified string, as if the given arguments were each passed, via << in sequence,...
                                                                                                                                  Definition: util.hpp:367
                                                                                                                                  boost::unique_lock< Mutex_non_recursive > Lock_guard_non_recursive
                                                                                                                                  (Deprecated given C++1x) Short-hand for advanced-capability RAII lock guard for Mutex_non_recursive m...
                                                                                                                                  Definition: util_fwd.hpp:283
                                                                                                                                  boost::recursive_mutex Mutex_recursive
                                                                                                                                  Short-hand for reentrant, exclusive mutex.
                                                                                                                                  Definition: util_fwd.hpp:218
                                                                                                                                  boost::unique_lock< Mutex_shared_non_recursive > Lock_guard_shared_non_recursive_ex
                                                                                                                                  (Deprecated given C++1x) Short-hand for exclusive mode advanced-capability RAII lock guard for Mutex_...
                                                                                                                                  Definition: util_fwd.hpp:309
                                                                                                                                  boost::shared_lock< Mutex_noop_shared_non_recursive > Lock_guard_noop_shared_non_recursive_sh
                                                                                                                                  (Deprecated given C++1x) Equivalent to Lock_guard_shared_non_recursive_sh but applied to Mutex_noop_s...
                                                                                                                                  Definition: util_fwd.hpp:318
                                                                                                                                  -
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:388
                                                                                                                                  +
                                                                                                                                  std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                  Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                  Definition: util.hpp:413
                                                                                                                                  Task_engine::strand Strand
                                                                                                                                  Short-hand for boost.asio strand, an ancillary class that works with Task_engine for advanced task sc...
                                                                                                                                  Definition: util_fwd.hpp:138
                                                                                                                                  -
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:246
                                                                                                                                  +
                                                                                                                                  bool in_closed_range(T const &min_val, T const &val, T const &max_val)
                                                                                                                                  Returns true if and only if the given value is within the given range, inclusive.
                                                                                                                                  Definition: util.hpp:271
                                                                                                                                  boost::shared_ptr< void > Auto_cleanup
                                                                                                                                  Helper type for setup_auto_cleanup().
                                                                                                                                  Definition: util_fwd.hpp:205
                                                                                                                                  boost::shared_lock< Shared_mutex > Shared_lock_guard
                                                                                                                                  Short-hand for shared mode advanced-capability RAII lock guard, particuarly for Mutex_shared_non_recu...
                                                                                                                                  Definition: util_fwd.hpp:275
                                                                                                                                  boost::chrono::microseconds time_since_posix_epoch()
                                                                                                                                  Get the current POSIX (Unix) time as a duration from the Epoch time point.
                                                                                                                                  Definition: util.cpp:147
                                                                                                                                  @@ -1202,11 +1202,11 @@
                                                                                                                                  boost::null_mutex Mutex_noop_shared_non_recursive
                                                                                                                                  Short-hand for a mutex type equivalent to util::Mutex_shared_non_recursive – except that the lock/unl...
                                                                                                                                  Definition: util_fwd.hpp:251
                                                                                                                                  boost::thread Thread
                                                                                                                                  Short-hand for standard thread class.
                                                                                                                                  Definition: util_fwd.hpp:78
                                                                                                                                  boost::asio::ip::udp::endpoint Udp_endpoint
                                                                                                                                  Short-hand for the UDP endpoint (IP/port) type.
                                                                                                                                  Definition: util_fwd.hpp:208
                                                                                                                                  -
                                                                                                                                  void feed_args_to_ostream(std::ostream *os, T1 const &ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  "Induction step" version of variadic function template that simply outputs arguments 2+ via << to the...
                                                                                                                                  Definition: util.hpp:327
                                                                                                                                  +
                                                                                                                                  void feed_args_to_ostream(std::ostream *os, T1 const &ostream_arg1, T_rest const &... remaining_ostream_args)
                                                                                                                                  "Induction step" version of variadic function template that simply outputs arguments 2+ via << to the...
                                                                                                                                  Definition: util.hpp:352
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/verbosity__config_8cpp.html b/doc/flow_doc/generated/html_full/verbosity__config_8cpp.html index 5a4dce845..0c20a67b8 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config_8cpp.html +++ b/doc/flow_doc/generated/html_full/verbosity__config_8cpp.html @@ -106,7 +106,7 @@ diff --git a/doc/flow_doc/generated/html_full/verbosity__config_8cpp_source.html b/doc/flow_doc/generated/html_full/verbosity__config_8cpp_source.html index c519ec38a..e6dab2584 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/verbosity__config_8cpp_source.html @@ -331,12 +331,12 @@
                                                                                                                                  Sev
                                                                                                                                  Enumeration containing one of several message severity levels, ordered from highest to lowest.
                                                                                                                                  Definition: log_fwd.hpp:224
                                                                                                                                  bool operator==(const Verbosity_config &val1, const Verbosity_config &val2)
                                                                                                                                  Checks for exact equality of two Verbosity_config objects.
                                                                                                                                  bool operator!=(const Verbosity_config &val1, const Verbosity_config &val2)
                                                                                                                                  Returns !(val1 == val2).
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/verbosity__config_8hpp.html b/doc/flow_doc/generated/html_full/verbosity__config_8hpp.html index 4a410c0e9..83ad844e6 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config_8hpp.html +++ b/doc/flow_doc/generated/html_full/verbosity__config_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/verbosity__config_8hpp_source.html b/doc/flow_doc/generated/html_full/verbosity__config_8hpp_source.html index 31bdfda60..84909bdb6 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/verbosity__config_8hpp_source.html @@ -237,7 +237,7 @@ diff --git a/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp.html b/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp.html index 17ff7db6c..ba020ad0f 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp_source.html b/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp_source.html index b5499b9e0..30be41ba7 100644 --- a/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/verbosity__config__fwd_8hpp_source.html @@ -171,7 +171,7 @@ diff --git a/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp.html index b6bd5d6ad..7e01e0a94 100644 --- a/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp_source.html b/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp_source.html index 5211db5f8..1c307b63b 100644 --- a/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp_source.html +++ b/doc/flow_doc/generated/html_full/x__thread__task__loop_8cpp_source.html @@ -502,7 +502,7 @@
                                                                                                                                  430
                                                                                                                                  431} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  const bool m_est_hw_core_pinning_helps_algo
                                                                                                                                  See constructor.
                                                                                                                                  util::Scheduled_task_handle schedule_from_now(const Fine_duration &from_now, Scheduled_task &&task) override
                                                                                                                                  Implements superclass API.
                                                                                                                                  @@ -545,23 +545,23 @@
                                                                                                                                  boost::shared_ptr< util::Task_engine > Task_engine_ptr
                                                                                                                                  Short-hand for reference-counting pointer to a mutable util::Task_engine (a/k/a boost::asio::io_servi...
                                                                                                                                  Definition: async_fwd.hpp:198
                                                                                                                                  unsigned int optimal_worker_thread_count_per_pool(flow::log::Logger *logger_ptr, bool est_hw_core_sharing_helps_algo)
                                                                                                                                  Assuming a planned thread pool will be receiving ~symmetrical load, and its UX-affecting (in particul...
                                                                                                                                  @ S_TRACE
                                                                                                                                  Message indicates any condition that may occur with great frequency (thus verbose if logged).
                                                                                                                                  -
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:356
                                                                                                                                  +
                                                                                                                                  std::string ostream_op_string(T const &... ostream_args)
                                                                                                                                  Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...
                                                                                                                                  Definition: util.hpp:381
                                                                                                                                  Scheduled_task_handle schedule_task_from_now(log::Logger *logger_ptr, const Fine_duration &from_now, bool single_threaded, Task_engine *task_engine, Scheduled_task_handler &&task_body_moved)
                                                                                                                                  Schedule the given function to execute in a certain amount of time: A handy wrapper around Timer (asi...
                                                                                                                                  Definition: sched_task.hpp:34
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Task_engine::strand Strand
                                                                                                                                  Short-hand for boost.asio strand, an ancillary class that works with Task_engine for advanced task sc...
                                                                                                                                  Definition: util_fwd.hpp:138
                                                                                                                                  boost::asio::io_service Task_engine
                                                                                                                                  Short-hand for boost.asio event service, the central class of boost.asio.
                                                                                                                                  Definition: util_fwd.hpp:135
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  boost::thread Thread
                                                                                                                                  Short-hand for standard thread class.
                                                                                                                                  Definition: util_fwd.hpp:78
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp.html index 4bde8d49f..7c133cb89 100644 --- a/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp_source.html b/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp_source.html index 507914475..0d998534f 100644 --- a/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp_source.html +++ b/doc/flow_doc/generated/html_full/x__thread__task__loop_8hpp_source.html @@ -380,7 +380,7 @@
                                                                                                                                  308
                                                                                                                                  309} // namespace flow::async
                                                                                                                                  - +
                                                                                                                                  The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...
                                                                                                                                  Function< void(size_t thread_idx)> Thread_init_func
                                                                                                                                  Short-hand for the thread-initializer-function optional arg type to start().
                                                                                                                                  Concrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute...
                                                                                                                                  @@ -418,12 +418,12 @@
                                                                                                                                  Function< void()> Task
                                                                                                                                  Short-hand for a task that can be posted for execution by a Concurrent_task_loop or flow::util::Task_...
                                                                                                                                  Definition: async_fwd.hpp:96
                                                                                                                                  boost::shared_ptr< Scheduled_task_handle_state > Scheduled_task_handle
                                                                                                                                  Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...
                                                                                                                                  Basic_string_view< char > String_view
                                                                                                                                  Commonly used char-based Basic_string_view. See its doc header.
                                                                                                                                  -
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:411
                                                                                                                                  -
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:408
                                                                                                                                  +
                                                                                                                                  Fine_clock::duration Fine_duration
                                                                                                                                  A high-res time duration as computed from two Fine_time_pts.
                                                                                                                                  Definition: common.hpp:416
                                                                                                                                  +
                                                                                                                                  Fine_clock::time_point Fine_time_pt
                                                                                                                                  A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.
                                                                                                                                  Definition: common.hpp:413
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/annotated.html b/doc/flow_doc/generated/html_public/annotated.html index a3fd1054c..aaef49130 100644 --- a/doc/flow_doc/generated/html_public/annotated.html +++ b/doc/flow_doc/generated/html_public/annotated.html @@ -142,21 +142,22 @@  CContainer_traits< util::Linked_hash_set< T, Hash, Pred > >Traits of flow::util::Linked_hash_set  CLinked_hash_mapAn object of this class is a map that combines the lookup speed of a boost::unordered_map<> and ordering and iterator stability capabilities of an std::list<>  CLinked_hash_setAn object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<> - CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor - CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator - CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved - CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object - CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value - CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively - CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string - CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end - CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function + CNoncopyableUseful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized) + CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor + CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator + CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved + CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object + CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value + CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively + CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string + CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end + CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function diff --git a/doc/flow_doc/generated/html_public/asio_2node_8cpp.html b/doc/flow_doc/generated/html_public/asio_2node_8cpp.html index b913d638c..bd89f7140 100644 --- a/doc/flow_doc/generated/html_public/asio_2node_8cpp.html +++ b/doc/flow_doc/generated/html_public/asio_2node_8cpp.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_public/asio_2node_8hpp.html b/doc/flow_doc/generated/html_public/asio_2node_8hpp.html index 5ef4ae656..ad8a3c723 100644 --- a/doc/flow_doc/generated/html_public/asio_2node_8hpp.html +++ b/doc/flow_doc/generated/html_public/asio_2node_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/asio_2peer__socket_8cpp.html b/doc/flow_doc/generated/html_public/asio_2peer__socket_8cpp.html index 186bf479d..9b2be865d 100644 --- a/doc/flow_doc/generated/html_public/asio_2peer__socket_8cpp.html +++ b/doc/flow_doc/generated/html_public/asio_2peer__socket_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/asio_2peer__socket_8hpp.html b/doc/flow_doc/generated/html_public/asio_2peer__socket_8hpp.html index aaaa84407..1b93837aa 100644 --- a/doc/flow_doc/generated/html_public/asio_2peer__socket_8hpp.html +++ b/doc/flow_doc/generated/html_public/asio_2peer__socket_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/asio_2server__socket_8cpp.html b/doc/flow_doc/generated/html_public/asio_2server__socket_8cpp.html index 9f5cd3de2..b5a0f3773 100644 --- a/doc/flow_doc/generated/html_public/asio_2server__socket_8cpp.html +++ b/doc/flow_doc/generated/html_public/asio_2server__socket_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/asio_2server__socket_8hpp.html b/doc/flow_doc/generated/html_public/asio_2server__socket_8hpp.html index c7d938440..385a2f9f0 100644 --- a/doc/flow_doc/generated/html_public/asio_2server__socket_8hpp.html +++ b/doc/flow_doc/generated/html_public/asio_2server__socket_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/async_2util_8hpp.html b/doc/flow_doc/generated/html_public/async_2util_8hpp.html index d8ad1deb8..cb3d29d13 100644 --- a/doc/flow_doc/generated/html_public/async_2util_8hpp.html +++ b/doc/flow_doc/generated/html_public/async_2util_8hpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/async__file__logger_8cpp.html b/doc/flow_doc/generated/html_public/async__file__logger_8cpp.html index 5e74693ff..677fd3efa 100644 --- a/doc/flow_doc/generated/html_public/async__file__logger_8cpp.html +++ b/doc/flow_doc/generated/html_public/async__file__logger_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/async__file__logger_8hpp.html b/doc/flow_doc/generated/html_public/async__file__logger_8hpp.html index cc0ec65de..ac36831df 100644 --- a/doc/flow_doc/generated/html_public/async__file__logger_8hpp.html +++ b/doc/flow_doc/generated/html_public/async__file__logger_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/async__fwd_8hpp.html b/doc/flow_doc/generated/html_public/async__fwd_8hpp.html index 93193fcef..fb3295f09 100644 --- a/doc/flow_doc/generated/html_public/async__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/async__fwd_8hpp.html @@ -154,7 +154,7 @@ diff --git a/doc/flow_doc/generated/html_public/basic__blob_8hpp.html b/doc/flow_doc/generated/html_public/basic__blob_8hpp.html index e94531eab..536273542 100644 --- a/doc/flow_doc/generated/html_public/basic__blob_8hpp.html +++ b/doc/flow_doc/generated/html_public/basic__blob_8hpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_public/blob_8hpp.html b/doc/flow_doc/generated/html_public/blob_8hpp.html index d4b6ccb0f..e75042c1f 100644 --- a/doc/flow_doc/generated/html_public/blob_8hpp.html +++ b/doc/flow_doc/generated/html_public/blob_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/blob__fwd_8hpp.html b/doc/flow_doc/generated/html_public/blob__fwd_8hpp.html index 6b611bc9b..ebff5b23e 100644 --- a/doc/flow_doc/generated/html_public/blob__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/blob__fwd_8hpp.html @@ -117,7 +117,7 @@ diff --git a/doc/flow_doc/generated/html_public/buffer__logger_8cpp.html b/doc/flow_doc/generated/html_public/buffer__logger_8cpp.html index c075bc4a0..9ead2fdc8 100644 --- a/doc/flow_doc/generated/html_public/buffer__logger_8cpp.html +++ b/doc/flow_doc/generated/html_public/buffer__logger_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/buffer__logger_8hpp.html b/doc/flow_doc/generated/html_public/buffer__logger_8hpp.html index 472628d00..440ea20d3 100644 --- a/doc/flow_doc/generated/html_public/buffer__logger_8hpp.html +++ b/doc/flow_doc/generated/html_public/buffer__logger_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/cfg__fwd_8hpp.html b/doc/flow_doc/generated/html_public/cfg__fwd_8hpp.html index c040ceeb3..c6b5eadc0 100644 --- a/doc/flow_doc/generated/html_public/cfg__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/cfg__fwd_8hpp.html @@ -124,7 +124,7 @@ diff --git a/doc/flow_doc/generated/html_public/cfg__manager_8cpp.html b/doc/flow_doc/generated/html_public/cfg__manager_8cpp.html index a9a6a470a..855ed34bf 100644 --- a/doc/flow_doc/generated/html_public/cfg__manager_8cpp.html +++ b/doc/flow_doc/generated/html_public/cfg__manager_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/cfg__manager_8hpp.html b/doc/flow_doc/generated/html_public/cfg__manager_8hpp.html index b910adc12..ba8dad079 100644 --- a/doc/flow_doc/generated/html_public/cfg__manager_8hpp.html +++ b/doc/flow_doc/generated/html_public/cfg__manager_8hpp.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_public/cfg__manager__fwd_8hpp.html b/doc/flow_doc/generated/html_public/cfg__manager__fwd_8hpp.html index 38ff03b21..c67d994ec 100644 --- a/doc/flow_doc/generated/html_public/cfg__manager__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/cfg__manager__fwd_8hpp.html @@ -149,7 +149,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/checkpt__timer_8cpp.html b/doc/flow_doc/generated/html_public/checkpt__timer_8cpp.html index 9b92bfc5f..ead79e069 100644 --- a/doc/flow_doc/generated/html_public/checkpt__timer_8cpp.html +++ b/doc/flow_doc/generated/html_public/checkpt__timer_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/checkpt__timer_8hpp.html b/doc/flow_doc/generated/html_public/checkpt__timer_8hpp.html index e64c97f0b..3b6eba57e 100644 --- a/doc/flow_doc/generated/html_public/checkpt__timer_8hpp.html +++ b/doc/flow_doc/generated/html_public/checkpt__timer_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_public/classes.html b/doc/flow_doc/generated/html_public/classes.html index 3bd6cffa0..77914279a 100644 --- a/doc/flow_doc/generated/html_public/classes.html +++ b/doc/flow_doc/generated/html_public/classes.html @@ -97,7 +97,7 @@
                                                                                                                                  Msg_metadata (flow::log)
                                                                                                                                  N
                                                                                                                                  -
                                                                                                                                  Net_env_simulator (flow::net_flow)
                                                                                                                                  Node (flow::net_flow::asio)
                                                                                                                                  Node (flow::net_flow)
                                                                                                                                  Node_options (flow::net_flow)
                                                                                                                                  Null_interface (flow::util)
                                                                                                                                  Null_value_set (flow::cfg)
                                                                                                                                  +
                                                                                                                                  Net_env_simulator (flow::net_flow)
                                                                                                                                  Node (flow::net_flow::asio)
                                                                                                                                  Node (flow::net_flow)
                                                                                                                                  Node_options (flow::net_flow)
                                                                                                                                  Noncopyable (flow::util)
                                                                                                                                  Null_interface (flow::util)
                                                                                                                                  Null_value_set (flow::cfg)
                                                                                                                                  O
                                                                                                                                  Config_manager::On_dynamic_change_func_handle (flow::cfg)
                                                                                                                                  Op_list (flow::async)
                                                                                                                                  Option_set (flow::cfg)
                                                                                                                                  Option_set_base (flow::cfg)
                                                                                                                                  Ostream_log_msg_writer (flow::log)
                                                                                                                                  @@ -123,7 +123,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html index 16b3cd439..8b6ae7d0f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html b/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html index c82be03a0..60c845ed1 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1Function_3_01Result_07Args_8_8_8_08_4.html @@ -188,7 +188,7 @@

                                                                                                                                  Rationale

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop-members.html index 2e2d83a15..376d89237 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop-members.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop.html index 40ef6bf16..aa72d7a03 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Concurrent__task__loop.html @@ -905,7 +905,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop-members.html index 37af88577..396f41012 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop-members.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop.html index 3c0e543ed..fe6ddaeaa 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Cross__thread__task__loop.html @@ -896,7 +896,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list-members.html index 3f277612b..32bba9d85 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list-members.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list.html index 32242f964..d92cb5b0a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Op__list.html @@ -331,7 +331,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop-members.html index 1803ac77b..6603be13a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop-members.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop.html index 0a86d6baa..96373a688 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Segregated__thread__task__loop.html @@ -892,7 +892,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop-members.html index 3af20eedc..937a96ebe 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop-members.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop.html index ae29e42df..c32933956 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Single__thread__task__loop.html @@ -541,7 +541,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html index 225c5ace1..1554b1331 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop-members.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop.html index 6264af498..f06578c02 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop.html @@ -273,7 +273,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html index 2ee80ac15..a8d1f8833 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl-members.html @@ -96,7 +96,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html index baba75679..d42ea47e5 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html @@ -828,7 +828,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html index 4ab82a905..4335121ec 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop-members.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop.html b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop.html index ecba806c4..c6a8fb5f5 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1async_1_1Timed__single__thread__task__loop.html @@ -447,7 +447,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager-members.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager-members.html index 3ab3913c3..dada4cc66 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager-members.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager.html index 799a71adf..17503c52a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Config__manager.html @@ -1381,7 +1381,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html index 0e2937f4c..60ef19185 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context-members.html @@ -83,7 +83,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context.html index 7a44bb8b6..08daaa840 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Dynamic__cfg__context.html @@ -262,7 +262,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set-members.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set-members.html index 1ac53d454..720ab070b 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set-members.html @@ -118,7 +118,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set.html index 28b5f149f..0a74a8d25 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set.html @@ -1339,7 +1339,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base-members.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base-members.html index 76d7b2658..284735493 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base.html index 3079a701c..40766e87f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Option__set__base.html @@ -436,7 +436,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager-members.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager-members.html index 3c03b048f..fc7ea6926 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager-members.html @@ -87,7 +87,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager.html b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager.html index be7b43119..1e3a64477 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1cfg_1_1Static__config__manager.html @@ -511,7 +511,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error-members.html b/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error-members.html index 1e0a7131e..d976bf5cf 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error.html b/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error.html index ea3ba7b9d..b3794e07d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1error_1_1Runtime__error.html @@ -220,7 +220,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger-members.html index 7950434d2..28e5d54ae 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger-members.html @@ -107,7 +107,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger.html index 062077335..2f082dcc9 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Async__file__logger.html @@ -584,7 +584,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger-members.html index 51fbe06e1..da203548a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger-members.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger.html index 7de401332..98fa9b74c 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Buffer__logger.html @@ -394,7 +394,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component-members.html index 35b771cb1..e163f501c 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component-members.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component.html index c021b2beb..6ba339165 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Component.html @@ -457,7 +457,7 @@

                                                                                                                                  Log_context(..., Cool_log_component::S_WIDGETRY) // Ditto for your own code. Use your own enum.
                                                                                                                                  Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
                                                                                                                                  Definition: log.hpp:1619
                                                                                                                                  An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...
                                                                                                                                  Definition: node.hpp:937
                                                                                                                                  -
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:633
                                                                                                                                  +
                                                                                                                                  Flow_log_component
                                                                                                                                  The flow::log::Component payload enumeration comprising various log components used by Flow's own int...
                                                                                                                                  Definition: common.hpp:638

                                                                                                                                  Now, this->get_log_component().payload_type() will equal that of Flow_log_component and Cool_log_component, respectively, within those 2 classes. In particular, a custom Logger implementation can use payload_type() – and in particular the derived payload_type_index() – to interpret the Components of values from the 2 entirely disparate enums in different ways. More in particular, the out-of-the-box Loggers use Config to do all of that without your having to worry about it (but your own Logger would potentially have to worry about it particularly if not using log::Config... though we suggest that you should, barring excellent design counter-reasons).

                                                                                                                                  Returns
                                                                                                                                  See above.
                                                                                                                                  @@ -491,7 +491,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config-members.html index e1644ae63..54d3e7ddb 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config-members.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config.html index 4a85a9b83..b99d71e1a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Config.html @@ -905,7 +905,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context-members.html index 425fbbcf4..9e18a140d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context-members.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context.html index 194c7fa88..8302e7cf9 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Log__context.html @@ -447,7 +447,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger-members.html index 9b8c22742..60281189d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger-members.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger.html index 45d58a993..81f56967b 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Logger.html @@ -610,7 +610,7 @@

                                                                                                                                  Naming rationale

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer-members.html index a6dc66517..0a063922d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer.html index d1446617b..10b90f7da 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Ostream__log__msg__writer.html @@ -196,7 +196,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger-members.html index cffc710dd..2fca301db 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger-members.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger.html index ad999f40e..afcaca251 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Simple__ostream__logger.html @@ -372,7 +372,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config-members.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config-members.html index 20f370b50..cbeeebeef 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config-members.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config.html b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config.html index c609debb2..1b6db7958 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1log_1_1Verbosity__config.html @@ -454,7 +454,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set-members.html index f294aae16..b9c414f56 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set-members.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set.html index e52ef840c..b6d8196af 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set.html @@ -1166,7 +1166,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html index 84114034b..370648e29 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html index 7890b965b..fbedec189 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html @@ -134,7 +134,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html index 909da46d6..2c1c1cf2a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html index 8ef19fbae..faf45bbe0 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html @@ -123,7 +123,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator-members.html index e20528fbd..6650e1c8f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator-members.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator.html index 51c7c3743..05820082f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Net__env__simulator.html @@ -324,7 +324,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node-members.html index 917479030..67bd42bed 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node-members.html @@ -110,7 +110,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node.html index ab430902c..fdd7ceb2e 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Node.html @@ -1073,7 +1073,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket-members.html index 83967e78a..5e76ff961 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket-members.html @@ -118,7 +118,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket.html index 95ca0fb99..a08149b47 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket.html @@ -1326,7 +1326,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html index eaa5a3c5f..585cc37ad 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats-members.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats.html index 5a221dead..2f37a6fd2 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Peer__socket__send__stats.html @@ -328,7 +328,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket-members.html index 3cce263d3..c2672d354 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket-members.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket.html index 8996f2faf..ba21aea73 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1Server__socket.html @@ -648,7 +648,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node-members.html index df121bce2..f3a84f4a7 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node-members.html @@ -117,7 +117,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node.html index 37499f96e..c3393ad5d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Node.html @@ -786,7 +786,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html index 8b97778b4..bc653afee 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket-members.html @@ -131,7 +131,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html index fd71b7cba..fc7766cf3 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Peer__socket.html @@ -893,7 +893,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html index 2537d583a..5b39570ba 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket-members.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket.html b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket.html index bb586082e..19854b124 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1net__flow_1_1asio_1_1Server__socket.html @@ -615,7 +615,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer-members.html b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer-members.html index dd7f1b4c5..32ebfb522 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer-members.html @@ -103,7 +103,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer.html b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer.html index 31b1122c5..0ca50d543 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer.html @@ -743,7 +743,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html index b16584bdf..51bc91536 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html index b4579c4f0..eac2c415b 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html @@ -424,7 +424,7 @@

                                                                                                                                  Performance

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob-members.html index 438d5eaad..85f2dda87 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob-members.html @@ -147,7 +147,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob.html index 4752b7050..01f2b1a6b 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__blob.html @@ -2290,7 +2290,7 @@

                                                                                                                                  Implications of diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view-members.html index edc1f91ae..ab533589c 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view-members.html @@ -90,7 +90,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view.html index 44a87d20e..6fc5cd7fa 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Basic__string__view.html @@ -544,7 +544,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context-members.html index eb181f00a..82b249a31 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context-members.html @@ -178,7 +178,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context.html index 8d4c8d036..0447cf751 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Blob__with__log__context.html @@ -1228,7 +1228,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits-members.html index 120268499..842ecabc7 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits.html index 7f504f8f7..a2d8a828f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits.html @@ -114,7 +114,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html index 30b151749..36103e5fd 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html index 19792c81b..a9038180d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01boost_1_1unordered__set_3_01T_01_4_01_4.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html index 976b212d3..041d0bb91 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html index 1661e183b..e68f63ce5 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1map_3_01K_00_01V_01_4_01_4.html @@ -114,7 +114,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html index f2b5e80f1..49edb1b70 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html index f995ed122..edf526daa 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01std_1_1set_3_01T_01_4_01_4.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html index e540ce13a..bb196525a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html index 015845e22..fc1eb790d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__map_3_01K_00_01V_01_4_01_4.html @@ -114,7 +114,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html index 13a5c1641..091f26edb 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html index 1f5f002e9..6395ee13b 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Container__traits_3_01util_1_1Linked__hash__set_3_01T_00_01Hash_00_01Pred_01_4_01_4.html @@ -115,7 +115,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map-members.html index 2aef1684f..ac7a9749c 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map-members.html @@ -138,7 +138,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map.html index be0372488..cbdf08fd6 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__map.html @@ -1429,7 +1429,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set-members.html index 6dbfc9aa6..058a1613c 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set-members.html @@ -133,7 +133,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set.html index 2dff82ccb..f953687a9 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Linked__hash__set.html @@ -1306,7 +1306,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface-members.html index 97ec787e5..28e28bb6d 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface.html index b4efc7e36..0e7c0d936 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Null__interface.html @@ -132,7 +132,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html index dfe724e36..9cc5ae5d0 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range-members.html @@ -80,7 +80,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range.html index 6d27b6b86..06520368f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range.html @@ -242,7 +242,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html index 1ce15b25b..cd594e41f 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html index 19316e0b2..425f7a2fc 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__base.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html index 2163aa1b6..afa9f99f5 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html index 807886d99..4a379b8bd 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html @@ -133,7 +133,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter-members.html index 01c359572..1e8488219 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter.html index e4479e399..d065bc2a6 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Scoped__setter.html @@ -119,7 +119,7 @@
                                                                                                                                  } // Restored from 125 to 75.
                                                                                                                                  ...
                                                                                                                                  } // Restored from (probably) 75 to (whatever).
                                                                                                                                  -
                                                                                                                                  A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
                                                                                                                                  Definition: util.hpp:120
                                                                                                                                  +
                                                                                                                                  A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...
                                                                                                                                  Definition: util.hpp:145

                                                                                                                                  The object is movable, not copyable (which is similar to unique_ptr) to prevent "double-restore." Related: one can easily return customized auto-setter/restorers:

                                                                                                                                  thread_local Widget s_widget;
                                                                                                                                  auto widget_setter_auto(Widget&& widget_moved)
                                                                                                                                  @@ -223,7 +223,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html index cac5fac68..48f526f96 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder-members.html @@ -82,7 +82,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder.html index be0f78a74..aa4ab2409 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Shared__ptr__alias__holder.html @@ -329,7 +329,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream-members.html index 36b7a3599..0aebabb6a 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream.html index df92ceb05..9c9d473c2 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1String__ostream.html @@ -233,7 +233,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder-members.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder-members.html index d465954ce..4afc33404 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder-members.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder.html b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder.html index 1d5ca64b0..61f7a3312 100644 --- a/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder.html +++ b/doc/flow_doc/generated/html_public/classflow_1_1util_1_1Unique__id__holder.html @@ -278,7 +278,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/clock__type_8cpp.html b/doc/flow_doc/generated/html_public/clock__type_8cpp.html index 8ec470d84..2cf7b2ea5 100644 --- a/doc/flow_doc/generated/html_public/clock__type_8cpp.html +++ b/doc/flow_doc/generated/html_public/clock__type_8cpp.html @@ -110,7 +110,7 @@ diff --git a/doc/flow_doc/generated/html_public/clock__type__fwd_8hpp.html b/doc/flow_doc/generated/html_public/clock__type__fwd_8hpp.html index ce6fa52d3..6526dab78 100644 --- a/doc/flow_doc/generated/html_public/clock__type__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/clock__type__fwd_8hpp.html @@ -152,7 +152,7 @@ diff --git a/doc/flow_doc/generated/html_public/common_8cpp.html b/doc/flow_doc/generated/html_public/common_8cpp.html index 984a2d416..38f67bafe 100644 --- a/doc/flow_doc/generated/html_public/common_8cpp.html +++ b/doc/flow_doc/generated/html_public/common_8cpp.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/common_8hpp.html b/doc/flow_doc/generated/html_public/common_8hpp.html index 88e1b20d9..dc7a26eb6 100644 --- a/doc/flow_doc/generated/html_public/common_8hpp.html +++ b/doc/flow_doc/generated/html_public/common_8hpp.html @@ -142,7 +142,7 @@ diff --git a/doc/flow_doc/generated/html_public/concurrent__task__loop_8cpp.html b/doc/flow_doc/generated/html_public/concurrent__task__loop_8cpp.html index 8b710db8e..8f63a6701 100644 --- a/doc/flow_doc/generated/html_public/concurrent__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_public/concurrent__task__loop_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/concurrent__task__loop_8hpp.html b/doc/flow_doc/generated/html_public/concurrent__task__loop_8hpp.html index c165bcea3..e5ca7bbcd 100644 --- a/doc/flow_doc/generated/html_public/concurrent__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_public/concurrent__task__loop_8hpp.html @@ -149,7 +149,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/config_8cpp.html b/doc/flow_doc/generated/html_public/config_8cpp.html index a98cea658..967f585e5 100644 --- a/doc/flow_doc/generated/html_public/config_8cpp.html +++ b/doc/flow_doc/generated/html_public/config_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/config_8hpp.html b/doc/flow_doc/generated/html_public/config_8hpp.html index 8f50cb643..7ceedccfb 100644 --- a/doc/flow_doc/generated/html_public/config_8hpp.html +++ b/doc/flow_doc/generated/html_public/config_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/config__enum__end__cpp_8macros_8hpp.html b/doc/flow_doc/generated/html_public/config__enum__end__cpp_8macros_8hpp.html index 1e7739bd7..16c57f347 100644 --- a/doc/flow_doc/generated/html_public/config__enum__end__cpp_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_public/config__enum__end__cpp_8macros_8hpp.html @@ -73,7 +73,7 @@ diff --git a/doc/flow_doc/generated/html_public/config__enum__end__hdr_8macros_8hpp.html b/doc/flow_doc/generated/html_public/config__enum__end__hdr_8macros_8hpp.html index 07ba93d93..ccdec424c 100644 --- a/doc/flow_doc/generated/html_public/config__enum__end__hdr_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_public/config__enum__end__hdr_8macros_8hpp.html @@ -73,7 +73,7 @@ diff --git a/doc/flow_doc/generated/html_public/config__enum__start__cpp_8macros_8hpp.html b/doc/flow_doc/generated/html_public/config__enum__start__cpp_8macros_8hpp.html index 469277d8a..b2eced880 100644 --- a/doc/flow_doc/generated/html_public/config__enum__start__cpp_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_public/config__enum__start__cpp_8macros_8hpp.html @@ -73,7 +73,7 @@ diff --git a/doc/flow_doc/generated/html_public/config__enum__start__hdr_8macros_8hpp.html b/doc/flow_doc/generated/html_public/config__enum__start__hdr_8macros_8hpp.html index 2cc977fa2..e19522040 100644 --- a/doc/flow_doc/generated/html_public/config__enum__start__hdr_8macros_8hpp.html +++ b/doc/flow_doc/generated/html_public/config__enum__start__hdr_8macros_8hpp.html @@ -73,7 +73,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_000000_000009.html b/doc/flow_doc/generated/html_public/dir_000000_000009.html index b4f6451d3..895fa5352 100644 --- a/doc/flow_doc/generated/html_public/dir_000000_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000000_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  asio → util Relation

                                                                                                                                  File in net_flow/asioIncludes file in util
                                                                                                                                  node.hppsched_task.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000001_000005.html b/doc/flow_doc/generated/html_public/dir_000001_000005.html index 061cd78fe..6fb9e9720 100644 --- a/doc/flow_doc/generated/html_public/dir_000001_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000001_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  async → log Relation

                                                                                                                                  File in asyncIncludes file in log
                                                                                                                                  op.hpplog.hpp
                                                                                                                                  segregated_thread_task_loop.hpplog.hpp
                                                                                                                                  x_thread_task_loop.hpplog.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000001_000008.html b/doc/flow_doc/generated/html_public/dir_000001_000008.html index ff172ccf8..e2bae8c6a 100644 --- a/doc/flow_doc/generated/html_public/dir_000001_000008.html +++ b/doc/flow_doc/generated/html_public/dir_000001_000008.html @@ -70,7 +70,7 @@

                                                                                                                                  async → perf Relation

                                                                                                                                  File in asyncIncludes file in perf
                                                                                                                                  single_thread_task_loop.hppclock_type_fwd.hpp
                                                                                                                                  timed_concurrent_task_loop.hpptimed_handler.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000001_000009.html b/doc/flow_doc/generated/html_public/dir_000001_000009.html index 625c798f3..393944c70 100644 --- a/doc/flow_doc/generated/html_public/dir_000001_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000001_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  async → util Relation

                                                                                                                                  File in asyncIncludes file in util
                                                                                                                                  async_fwd.hppsched_task_fwd.hpp
                                                                                                                                  async_fwd.hpputil_fwd.hpp
                                                                                                                                  concurrent_task_loop.hppsched_task_fwd.hpp
                                                                                                                                  concurrent_task_loop.hpputil.hpp
                                                                                                                                  op.hpprandom.hpp
                                                                                                                                  segregated_thread_task_loop.cppsched_task.hpp
                                                                                                                                  single_thread_task_loop.hpputil.hpp
                                                                                                                                  x_thread_task_loop.cppsched_task.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000002_000005.html b/doc/flow_doc/generated/html_public/dir_000002_000005.html index dd16587af..1e56ab4ed 100644 --- a/doc/flow_doc/generated/html_public/dir_000002_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000002_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  cfg → log Relation

                                                                                                                                  File in cfgIncludes file in log
                                                                                                                                  option_set.hpplog.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000002_000009.html b/doc/flow_doc/generated/html_public/dir_000002_000009.html index 40d575f4f..c9e8e9e24 100644 --- a/doc/flow_doc/generated/html_public/dir_000002_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000002_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  cfg → util Relation

                                                                                                                                  File in cfgIncludes file in util
                                                                                                                                  cfg_fwd.hpputil_fwd.hpp
                                                                                                                                  cfg_manager.hppshared_ptr_alias_holder.hpp
                                                                                                                                  cfg_manager.hpputil.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000003_000005.html b/doc/flow_doc/generated/html_public/dir_000003_000005.html index 843f40b9e..25c4bd9dc 100644 --- a/doc/flow_doc/generated/html_public/dir_000003_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000003_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  error → log Relation

                                                                                                                                  File in errorIncludes file in log
                                                                                                                                  error.hpplog.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000003_000009.html b/doc/flow_doc/generated/html_public/dir_000003_000009.html index ba43b65c3..67f94f2a9 100644 --- a/doc/flow_doc/generated/html_public/dir_000003_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000003_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  error → util Relation

                                                                                                                                  File in errorIncludes file in util
                                                                                                                                  error_fwd.hpputil_fwd.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000004_000009.html b/doc/flow_doc/generated/html_public/dir_000004_000009.html index f4256e417..bcfe53626 100644 --- a/doc/flow_doc/generated/html_public/dir_000004_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000004_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  error → util Relation

                                                                                                                                  File in net_flow/errorIncludes file in util
                                                                                                                                  error.cpputil.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000005_000001.html b/doc/flow_doc/generated/html_public/dir_000005_000001.html index 99594ea1d..3105b59b3 100644 --- a/doc/flow_doc/generated/html_public/dir_000005_000001.html +++ b/doc/flow_doc/generated/html_public/dir_000005_000001.html @@ -70,7 +70,7 @@

                                                                                                                                  log → async Relation

                                                                                                                                  File in logIncludes file in async
                                                                                                                                  async_file_logger.hppsingle_thread_task_loop.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000005_000009.html b/doc/flow_doc/generated/html_public/dir_000005_000009.html index f8590bc35..08b5ef969 100644 --- a/doc/flow_doc/generated/html_public/dir_000005_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000005_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  log → util Relation

                                                                                                                                  File in logIncludes file in util
                                                                                                                                  async_file_logger.hpputil_fwd.hpp
                                                                                                                                  buffer_logger.hppstring_ostream.hpp
                                                                                                                                  buffer_logger.hpputil_fwd.hpp
                                                                                                                                  log.cpputil_fwd.hpp
                                                                                                                                  log.hppuniq_id_holder.hpp
                                                                                                                                  log.hpputil.hpp
                                                                                                                                  ostream_log_msg_writer.cppfmt.hpp
                                                                                                                                  ostream_log_msg_writer.cppstring_view.hpp
                                                                                                                                  simple_ostream_logger.hpputil_fwd.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000007_000001.html b/doc/flow_doc/generated/html_public/dir_000007_000001.html index 5461dde02..fb90330c6 100644 --- a/doc/flow_doc/generated/html_public/dir_000007_000001.html +++ b/doc/flow_doc/generated/html_public/dir_000007_000001.html @@ -70,7 +70,7 @@

                                                                                                                                  net_flow → async Relation

                                                                                                                                  File in net_flowIncludes file in async
                                                                                                                                  event_set.cpputil.hpp
                                                                                                                                  peer_socket.cpputil.hpp
                                                                                                                                  server_socket.cpputil.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000007_000004.html b/doc/flow_doc/generated/html_public/dir_000007_000004.html index b497a47f5..1ed46ad65 100644 --- a/doc/flow_doc/generated/html_public/dir_000007_000004.html +++ b/doc/flow_doc/generated/html_public/dir_000007_000004.html @@ -70,7 +70,7 @@

                                                                                                                                  net_flow → error Relation

                                                                                                                                  File in net_flowIncludes file in net_flow/error
                                                                                                                                  event_set.hpperror.hpp
                                                                                                                                  node.hpperror.hpp
                                                                                                                                  peer_socket.hpperror.hpp
                                                                                                                                  server_socket.hpperror.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000007_000005.html b/doc/flow_doc/generated/html_public/dir_000007_000005.html index acd7f964c..e20324028 100644 --- a/doc/flow_doc/generated/html_public/dir_000007_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000007_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  net_flow → log Relation

                                                                                                                                  File in net_flowIncludes file in log
                                                                                                                                  net_env_simulator.hpplog.hpp
                                                                                                                                  node.hpplog.hpp
                                                                                                                                  server_socket.hpplog.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000007_000009.html b/doc/flow_doc/generated/html_public/dir_000007_000009.html index b8748ebd1..bfefa1737 100644 --- a/doc/flow_doc/generated/html_public/dir_000007_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000007_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  net_flow → util Relation

                                                                                                                                  File in net_flowIncludes file in util
                                                                                                                                  endpoint.hpputil_fwd.hpp
                                                                                                                                  error / error.cpputil.hpp
                                                                                                                                  event_set.hppshared_ptr_alias_holder.hpp
                                                                                                                                  event_set.hpptraits.hpp
                                                                                                                                  net_env_simulator.hpprandom.hpp
                                                                                                                                  node.cppsched_task.hpp
                                                                                                                                  asio / node.hppsched_task.hpp
                                                                                                                                  node.hpputil.hpp
                                                                                                                                  peer_socket.cppsched_task.hpp
                                                                                                                                  peer_socket.hpplinked_hash_map.hpp
                                                                                                                                  peer_socket.hppsched_task_fwd.hpp
                                                                                                                                  peer_socket.hppshared_ptr_alias_holder.hpp
                                                                                                                                  peer_socket.hpputil.hpp
                                                                                                                                  server_socket.hpplinked_hash_set.hpp
                                                                                                                                  server_socket.hppshared_ptr_alias_holder.hpp
                                                                                                                                  server_socket.hpputil.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000008_000005.html b/doc/flow_doc/generated/html_public/dir_000008_000005.html index 433e14d4c..2b2070285 100644 --- a/doc/flow_doc/generated/html_public/dir_000008_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000008_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  perf → log Relation

                                                                                                                                  File in perfIncludes file in log
                                                                                                                                  checkpt_timer.hpplog.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000008_000009.html b/doc/flow_doc/generated/html_public/dir_000008_000009.html index 0ab86444e..8fe2fef75 100644 --- a/doc/flow_doc/generated/html_public/dir_000008_000009.html +++ b/doc/flow_doc/generated/html_public/dir_000008_000009.html @@ -70,7 +70,7 @@

                                                                                                                                  perf → util Relation

                                                                                                                                  File in perfIncludes file in util
                                                                                                                                  clock_type.cppstring_ostream.hpp
                                                                                                                                  clock_type.cpputil.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_000009_000005.html b/doc/flow_doc/generated/html_public/dir_000009_000005.html index ea98565b6..54f59708f 100644 --- a/doc/flow_doc/generated/html_public/dir_000009_000005.html +++ b/doc/flow_doc/generated/html_public/dir_000009_000005.html @@ -70,7 +70,7 @@

                                                                                                                                  util → log Relation

                                                                                                                                  File in utilIncludes file in log
                                                                                                                                  basic_blob.hpplog.hpp
                                                                                                                                  blob_fwd.hpplog_fwd.hpp
                                                                                                                                  sched_task.hpplog.hpp
                                                                                                                                  sched_task_fwd.hpplog_fwd.hpp
                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/dir_183f5ca7bfa2ee923b1b08301562c36a.html b/doc/flow_doc/generated/html_public/dir_183f5ca7bfa2ee923b1b08301562c36a.html index 6ea0dc7f6..1194c2e43 100644 --- a/doc/flow_doc/generated/html_public/dir_183f5ca7bfa2ee923b1b08301562c36a.html +++ b/doc/flow_doc/generated/html_public/dir_183f5ca7bfa2ee923b1b08301562c36a.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_23ec12649285f9fabf3a6b7380226c28.html b/doc/flow_doc/generated/html_public/dir_23ec12649285f9fabf3a6b7380226c28.html index d35f6d261..4921f522e 100644 --- a/doc/flow_doc/generated/html_public/dir_23ec12649285f9fabf3a6b7380226c28.html +++ b/doc/flow_doc/generated/html_public/dir_23ec12649285f9fabf3a6b7380226c28.html @@ -123,7 +123,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_460afd45d0ec637b1427e0e06a6fbcf7.html b/doc/flow_doc/generated/html_public/dir_460afd45d0ec637b1427e0e06a6fbcf7.html index 105c3c1dd..bf53b864a 100644 --- a/doc/flow_doc/generated/html_public/dir_460afd45d0ec637b1427e0e06a6fbcf7.html +++ b/doc/flow_doc/generated/html_public/dir_460afd45d0ec637b1427e0e06a6fbcf7.html @@ -124,7 +124,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_4c52cb8b55b918be67d078d7a231760a.html b/doc/flow_doc/generated/html_public/dir_4c52cb8b55b918be67d078d7a231760a.html index 946566a0d..2a40697af 100644 --- a/doc/flow_doc/generated/html_public/dir_4c52cb8b55b918be67d078d7a231760a.html +++ b/doc/flow_doc/generated/html_public/dir_4c52cb8b55b918be67d078d7a231760a.html @@ -89,7 +89,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_9381a7bbd03577d6d8720c7f35c94ffa.html b/doc/flow_doc/generated/html_public/dir_9381a7bbd03577d6d8720c7f35c94ffa.html index 9f5347d11..985bfb880 100644 --- a/doc/flow_doc/generated/html_public/dir_9381a7bbd03577d6d8720c7f35c94ffa.html +++ b/doc/flow_doc/generated/html_public/dir_9381a7bbd03577d6d8720c7f35c94ffa.html @@ -120,7 +120,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_aee2b3c67924e0eefa590b781c13db02.html b/doc/flow_doc/generated/html_public/dir_aee2b3c67924e0eefa590b781c13db02.html index 65419e3b6..74cb62370 100644 --- a/doc/flow_doc/generated/html_public/dir_aee2b3c67924e0eefa590b781c13db02.html +++ b/doc/flow_doc/generated/html_public/dir_aee2b3c67924e0eefa590b781c13db02.html @@ -87,7 +87,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_bf37cf39814650876b4aa4513810c0b4.html b/doc/flow_doc/generated/html_public/dir_bf37cf39814650876b4aa4513810c0b4.html index 76a82fa51..adc7df799 100644 --- a/doc/flow_doc/generated/html_public/dir_bf37cf39814650876b4aa4513810c0b4.html +++ b/doc/flow_doc/generated/html_public/dir_bf37cf39814650876b4aa4513810c0b4.html @@ -91,7 +91,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_c3b46db8887e8285e98d946e3c1c617e.html b/doc/flow_doc/generated/html_public/dir_c3b46db8887e8285e98d946e3c1c617e.html index 0ad253d22..ef86621de 100644 --- a/doc/flow_doc/generated/html_public/dir_c3b46db8887e8285e98d946e3c1c617e.html +++ b/doc/flow_doc/generated/html_public/dir_c3b46db8887e8285e98d946e3c1c617e.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_cfb2ffb2869bbb27b7281952022eb856.html b/doc/flow_doc/generated/html_public/dir_cfb2ffb2869bbb27b7281952022eb856.html index 4443bfff7..d43a162f4 100644 --- a/doc/flow_doc/generated/html_public/dir_cfb2ffb2869bbb27b7281952022eb856.html +++ b/doc/flow_doc/generated/html_public/dir_cfb2ffb2869bbb27b7281952022eb856.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_public/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html b/doc/flow_doc/generated/html_public/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html index fbe31edf6..03524fdf7 100644 --- a/doc/flow_doc/generated/html_public/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html +++ b/doc/flow_doc/generated/html_public/dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_public/dynamic__cfg__context_8hpp.html b/doc/flow_doc/generated/html_public/dynamic__cfg__context_8hpp.html index 0eacf77fb..0bea576ec 100644 --- a/doc/flow_doc/generated/html_public/dynamic__cfg__context_8hpp.html +++ b/doc/flow_doc/generated/html_public/dynamic__cfg__context_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/endpoint_8cpp.html b/doc/flow_doc/generated/html_public/endpoint_8cpp.html index 8c042900c..94dd5ef23 100644 --- a/doc/flow_doc/generated/html_public/endpoint_8cpp.html +++ b/doc/flow_doc/generated/html_public/endpoint_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/endpoint_8hpp.html b/doc/flow_doc/generated/html_public/endpoint_8hpp.html index 1a0270330..5abe428ff 100644 --- a/doc/flow_doc/generated/html_public/endpoint_8hpp.html +++ b/doc/flow_doc/generated/html_public/endpoint_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/error_2error_8cpp.html b/doc/flow_doc/generated/html_public/error_2error_8cpp.html index f6641f234..a3777bacb 100644 --- a/doc/flow_doc/generated/html_public/error_2error_8cpp.html +++ b/doc/flow_doc/generated/html_public/error_2error_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/error_2error_8hpp.html b/doc/flow_doc/generated/html_public/error_2error_8hpp.html index 859e3381b..e21f95de4 100644 --- a/doc/flow_doc/generated/html_public/error_2error_8hpp.html +++ b/doc/flow_doc/generated/html_public/error_2error_8hpp.html @@ -149,7 +149,7 @@

                                                                                                                                  "[" << FLOW_ERROR_EMIT_ERR_val.message() << "]."); \
                                                                                                                                  *err_code = FLOW_ERROR_EMIT_ERR_val; \
                                                                                                                                  )
                                                                                                                                  -
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:503
                                                                                                                                  +
                                                                                                                                  boost::system::error_code Error_code
                                                                                                                                  Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                  Definition: common.hpp:508
                                                                                                                                  #define FLOW_UTIL_SEMICOLON_SAFE(ARG_func_macro_definition)
                                                                                                                                  Use this to create a semicolon-safe version of a "void" functional macro definition consisting of at ...
                                                                                                                                  Definition: util_fwd.hpp:1079

                                                                                                                                  Sets *err_code to ARG_val and logs a warning about the error using FLOW_LOG_WARNING().

                                                                                                                                  @@ -449,7 +449,7 @@

                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/error__fwd_8hpp.html b/doc/flow_doc/generated/html_public/error__fwd_8hpp.html index a8a78e30d..f4fe3abae 100644 --- a/doc/flow_doc/generated/html_public/error__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/error__fwd_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_public/event__set_8cpp.html b/doc/flow_doc/generated/html_public/event__set_8cpp.html index 2cc4e3025..85e854cb9 100644 --- a/doc/flow_doc/generated/html_public/event__set_8cpp.html +++ b/doc/flow_doc/generated/html_public/event__set_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/event__set_8hpp.html b/doc/flow_doc/generated/html_public/event__set_8hpp.html index 58da2d3a4..b993d24bf 100644 --- a/doc/flow_doc/generated/html_public/event__set_8hpp.html +++ b/doc/flow_doc/generated/html_public/event__set_8hpp.html @@ -109,7 +109,7 @@ diff --git a/doc/flow_doc/generated/html_public/files.html b/doc/flow_doc/generated/html_public/files.html index 81d65365c..fc93a76c0 100644 --- a/doc/flow_doc/generated/html_public/files.html +++ b/doc/flow_doc/generated/html_public/files.html @@ -182,7 +182,7 @@ diff --git a/doc/flow_doc/generated/html_public/fmt_8hpp.html b/doc/flow_doc/generated/html_public/fmt_8hpp.html index c8138f447..301ac9281 100644 --- a/doc/flow_doc/generated/html_public/fmt_8hpp.html +++ b/doc/flow_doc/generated/html_public/fmt_8hpp.html @@ -73,7 +73,7 @@ diff --git a/doc/flow_doc/generated/html_public/functions.html b/doc/flow_doc/generated/html_public/functions.html index 97edcc7e2..9854b5b37 100644 --- a/doc/flow_doc/generated/html_public/functions.html +++ b/doc/flow_doc/generated/html_public/functions.html @@ -98,7 +98,7 @@

                                                                                                                                  - a -

                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_b.html b/doc/flow_doc/generated/html_public/functions_b.html index 5d9cac505..34f2a6534 100644 --- a/doc/flow_doc/generated/html_public/functions_b.html +++ b/doc/flow_doc/generated/html_public/functions_b.html @@ -80,7 +80,7 @@

                                                                                                                                    - b -

                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_c.html b/doc/flow_doc/generated/html_public/functions_c.html index 20d052e3f..8c670591d 100644 --- a/doc/flow_doc/generated/html_public/functions_c.html +++ b/doc/flow_doc/generated/html_public/functions_c.html @@ -99,14 +99,14 @@

                                                                                                                                      - c -

                                                                                                                                      • const_data() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                      • const_end() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                      • const_front() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • -
                                                                                                                                      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                      • const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                      • -
                                                                                                                                      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                      • +
                                                                                                                                      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                      • const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                      • -
                                                                                                                                      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                      • +
                                                                                                                                      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                      • const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                      • -
                                                                                                                                      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • +
                                                                                                                                      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                      • const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • +
                                                                                                                                      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • const_newest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • const_oldest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • const_past_newest() : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                      • @@ -128,7 +128,7 @@

                                                                                                                                        - c -

                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_d.html b/doc/flow_doc/generated/html_public/functions_d.html index f30c2b005..4def8032a 100644 --- a/doc/flow_doc/generated/html_public/functions_d.html +++ b/doc/flow_doc/generated/html_public/functions_d.html @@ -85,7 +85,7 @@

                                                                                                                                          - d -

                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_e.html b/doc/flow_doc/generated/html_public/functions_e.html index 96d1a140a..901c92819 100644 --- a/doc/flow_doc/generated/html_public/functions_e.html +++ b/doc/flow_doc/generated/html_public/functions_e.html @@ -83,7 +83,7 @@

                                                                                                                                            - e -

                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/functions_enum.html b/doc/flow_doc/generated/html_public/functions_enum.html index 027d622e4..c9d8e7146 100644 --- a/doc/flow_doc/generated/html_public/functions_enum.html +++ b/doc/flow_doc/generated/html_public/functions_enum.html @@ -74,7 +74,7 @@ diff --git a/doc/flow_doc/generated/html_public/functions_eval.html b/doc/flow_doc/generated/html_public/functions_eval.html index 93fbc4d3a..a634fe9ff 100644 --- a/doc/flow_doc/generated/html_public/functions_eval.html +++ b/doc/flow_doc/generated/html_public/functions_eval.html @@ -69,7 +69,7 @@ diff --git a/doc/flow_doc/generated/html_public/functions_f.html b/doc/flow_doc/generated/html_public/functions_f.html index 73fe62755..75e0b7e53 100644 --- a/doc/flow_doc/generated/html_public/functions_f.html +++ b/doc/flow_doc/generated/html_public/functions_f.html @@ -75,7 +75,7 @@

                                                                                                                                              - f -

                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_func.html b/doc/flow_doc/generated/html_public/functions_func.html index 3e04b5b9c..fbd55b8e4 100644 --- a/doc/flow_doc/generated/html_public/functions_func.html +++ b/doc/flow_doc/generated/html_public/functions_func.html @@ -96,7 +96,7 @@

                                                                                                                                                - a -

                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/functions_func_b.html b/doc/flow_doc/generated/html_public/functions_func_b.html index a31154023..0e8451beb 100644 --- a/doc/flow_doc/generated/html_public/functions_func_b.html +++ b/doc/flow_doc/generated/html_public/functions_func_b.html @@ -79,7 +79,7 @@

                                                                                                                                                  - b -

                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_func_c.html b/doc/flow_doc/generated/html_public/functions_func_c.html index df901cc44..a0c4222b3 100644 --- a/doc/flow_doc/generated/html_public/functions_func_c.html +++ b/doc/flow_doc/generated/html_public/functions_func_c.html @@ -110,7 +110,7 @@

                                                                                                                                                    - c -

                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_func_d.html b/doc/flow_doc/generated/html_public/functions_func_d.html index 9e048fe6f..0fe61e75e 100644 --- a/doc/flow_doc/generated/html_public/functions_func_d.html +++ b/doc/flow_doc/generated/html_public/functions_func_d.html @@ -82,7 +82,7 @@

                                                                                                                                                      - d -

                                                                                                                                                        diff --git a/doc/flow_doc/generated/html_public/functions_func_e.html b/doc/flow_doc/generated/html_public/functions_func_e.html index a6adcb93a..6c4224be3 100644 --- a/doc/flow_doc/generated/html_public/functions_func_e.html +++ b/doc/flow_doc/generated/html_public/functions_func_e.html @@ -79,7 +79,7 @@

                                                                                                                                                        - e -

                                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_func_f.html b/doc/flow_doc/generated/html_public/functions_func_f.html index 91e3a0afd..53ced93a9 100644 --- a/doc/flow_doc/generated/html_public/functions_func_f.html +++ b/doc/flow_doc/generated/html_public/functions_func_f.html @@ -72,7 +72,7 @@

                                                                                                                                                          - f -

                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_func_g.html b/doc/flow_doc/generated/html_public/functions_func_g.html index 8a9ab2650..c831f77a0 100644 --- a/doc/flow_doc/generated/html_public/functions_func_g.html +++ b/doc/flow_doc/generated/html_public/functions_func_g.html @@ -74,7 +74,7 @@

                                                                                                                                                            - g -

                                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/functions_func_h.html b/doc/flow_doc/generated/html_public/functions_func_h.html index a1f425b07..740375c07 100644 --- a/doc/flow_doc/generated/html_public/functions_func_h.html +++ b/doc/flow_doc/generated/html_public/functions_func_h.html @@ -73,7 +73,7 @@

                                                                                                                                                              - h -

                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_func_i.html b/doc/flow_doc/generated/html_public/functions_func_i.html index 804bfc427..ac830c500 100644 --- a/doc/flow_doc/generated/html_public/functions_func_i.html +++ b/doc/flow_doc/generated/html_public/functions_func_i.html @@ -76,7 +76,7 @@

                                                                                                                                                                - i -

                                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/functions_func_l.html b/doc/flow_doc/generated/html_public/functions_func_l.html index 87f4fd087..034f6575e 100644 --- a/doc/flow_doc/generated/html_public/functions_func_l.html +++ b/doc/flow_doc/generated/html_public/functions_func_l.html @@ -86,7 +86,7 @@

                                                                                                                                                                  - l -

                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_func_m.html b/doc/flow_doc/generated/html_public/functions_func_m.html index 05f98e5d1..327f2f102 100644 --- a/doc/flow_doc/generated/html_public/functions_func_m.html +++ b/doc/flow_doc/generated/html_public/functions_func_m.html @@ -75,7 +75,7 @@

                                                                                                                                                                    - m -

                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_func_n.html b/doc/flow_doc/generated/html_public/functions_func_n.html index 6ff1fa5f2..652895af0 100644 --- a/doc/flow_doc/generated/html_public/functions_func_n.html +++ b/doc/flow_doc/generated/html_public/functions_func_n.html @@ -74,13 +74,14 @@

                                                                                                                                                                      - n -

                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_func_o.html b/doc/flow_doc/generated/html_public/functions_func_o.html index 7e95043db..e056af3f0 100644 --- a/doc/flow_doc/generated/html_public/functions_func_o.html +++ b/doc/flow_doc/generated/html_public/functions_func_o.html @@ -76,7 +76,7 @@

                                                                                                                                                                      - o -

                                                                                                                                                                      • operator-() : flow::perf::Time_pt_set
                                                                                                                                                                      • operator/=() : flow::perf::Duration_set
                                                                                                                                                                      • operator<<() : flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >, flow::log::Verbosity_config, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket, flow::net_flow::Event_set, flow::net_flow::Peer_socket, flow::net_flow::Peer_socket_info, flow::net_flow::Peer_socket_options, flow::net_flow::Peer_socket_receive_stats, flow::net_flow::Peer_socket_send_stats, flow::net_flow::Remote_endpoint, flow::net_flow::Server_socket, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer, flow::perf::Duration_set
                                                                                                                                                                      • -
                                                                                                                                                                      • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                                                                                                      • +
                                                                                                                                                                      • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Noncopyable, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                                                                                                      • operator==() : flow::log::Verbosity_config, flow::net_flow::Remote_endpoint
                                                                                                                                                                      • operator>>() : flow::log::Verbosity_config, flow::net_flow::Peer_socket_options
                                                                                                                                                                      • operator[]() : flow::async::Op_list, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                                                      • @@ -94,7 +94,7 @@

                                                                                                                                                                        - o -

                                                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_func_p.html b/doc/flow_doc/generated/html_public/functions_func_p.html index f3614281f..49104f54f 100644 --- a/doc/flow_doc/generated/html_public/functions_func_p.html +++ b/doc/flow_doc/generated/html_public/functions_func_p.html @@ -91,7 +91,7 @@

                                                                                                                                                                          - p -

                                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_func_r.html b/doc/flow_doc/generated/html_public/functions_func_r.html index ce9c09fd1..e17a3d452 100644 --- a/doc/flow_doc/generated/html_public/functions_func_r.html +++ b/doc/flow_doc/generated/html_public/functions_func_r.html @@ -88,7 +88,7 @@

                                                                                                                                                                            - r -

                                                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/functions_func_s.html b/doc/flow_doc/generated/html_public/functions_func_s.html index f737f1540..6c57fbcd4 100644 --- a/doc/flow_doc/generated/html_public/functions_func_s.html +++ b/doc/flow_doc/generated/html_public/functions_func_s.html @@ -122,7 +122,7 @@

                                                                                                                                                                              - s -

                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_func_t.html b/doc/flow_doc/generated/html_public/functions_func_t.html index 18f90deb8..e040e3d11 100644 --- a/doc/flow_doc/generated/html_public/functions_func_t.html +++ b/doc/flow_doc/generated/html_public/functions_func_t.html @@ -84,7 +84,7 @@

                                                                                                                                                                                - t -

                                                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/functions_func_u.html b/doc/flow_doc/generated/html_public/functions_func_u.html index 41de90b74..847152b98 100644 --- a/doc/flow_doc/generated/html_public/functions_func_u.html +++ b/doc/flow_doc/generated/html_public/functions_func_u.html @@ -74,7 +74,7 @@

                                                                                                                                                                                  - u -

                                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_func_v.html b/doc/flow_doc/generated/html_public/functions_func_v.html index 1db405cb4..66cbbbb31 100644 --- a/doc/flow_doc/generated/html_public/functions_func_v.html +++ b/doc/flow_doc/generated/html_public/functions_func_v.html @@ -78,7 +78,7 @@

                                                                                                                                                                                    - v -

                                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_func_w.html b/doc/flow_doc/generated/html_public/functions_func_w.html index 0e36182a9..4ad1adef1 100644 --- a/doc/flow_doc/generated/html_public/functions_func_w.html +++ b/doc/flow_doc/generated/html_public/functions_func_w.html @@ -71,7 +71,7 @@

                                                                                                                                                                                      - w -

                                                                                                                                                                                        diff --git a/doc/flow_doc/generated/html_public/functions_func_z.html b/doc/flow_doc/generated/html_public/functions_func_z.html index ac2117abf..d7364e062 100644 --- a/doc/flow_doc/generated/html_public/functions_func_z.html +++ b/doc/flow_doc/generated/html_public/functions_func_z.html @@ -71,7 +71,7 @@

                                                                                                                                                                                        - z -

                                                                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_func_~.html b/doc/flow_doc/generated/html_public/functions_func_~.html index 1a35058ff..0440cc0be 100644 --- a/doc/flow_doc/generated/html_public/functions_func_~.html +++ b/doc/flow_doc/generated/html_public/functions_func_~.html @@ -84,7 +84,7 @@

                                                                                                                                                                                          - ~ -

                                                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_g.html b/doc/flow_doc/generated/html_public/functions_g.html index 7b8ab35b4..d1aba4509 100644 --- a/doc/flow_doc/generated/html_public/functions_g.html +++ b/doc/flow_doc/generated/html_public/functions_g.html @@ -75,7 +75,7 @@

                                                                                                                                                                                            - g -

                                                                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/functions_h.html b/doc/flow_doc/generated/html_public/functions_h.html index 7ab04af2d..c1b4a276c 100644 --- a/doc/flow_doc/generated/html_public/functions_h.html +++ b/doc/flow_doc/generated/html_public/functions_h.html @@ -74,7 +74,7 @@

                                                                                                                                                                                              - h -

                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_i.html b/doc/flow_doc/generated/html_public/functions_i.html index 64461be7a..22e086179 100644 --- a/doc/flow_doc/generated/html_public/functions_i.html +++ b/doc/flow_doc/generated/html_public/functions_i.html @@ -86,7 +86,7 @@

                                                                                                                                                                                                - i -

                                                                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/functions_k.html b/doc/flow_doc/generated/html_public/functions_k.html index 3709319f4..f5b551f3e 100644 --- a/doc/flow_doc/generated/html_public/functions_k.html +++ b/doc/flow_doc/generated/html_public/functions_k.html @@ -72,7 +72,7 @@

                                                                                                                                                                                                  - k -

                                                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_l.html b/doc/flow_doc/generated/html_public/functions_l.html index db7581307..58d4c482a 100644 --- a/doc/flow_doc/generated/html_public/functions_l.html +++ b/doc/flow_doc/generated/html_public/functions_l.html @@ -88,7 +88,7 @@

                                                                                                                                                                                                    - l -

                                                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_m.html b/doc/flow_doc/generated/html_public/functions_m.html index 6c08da259..af1bdc715 100644 --- a/doc/flow_doc/generated/html_public/functions_m.html +++ b/doc/flow_doc/generated/html_public/functions_m.html @@ -238,7 +238,7 @@

                                                                                                                                                                                                      - m -

                                                                                                                                                                                                        diff --git a/doc/flow_doc/generated/html_public/functions_n.html b/doc/flow_doc/generated/html_public/functions_n.html index 525c603e0..020efbcc6 100644 --- a/doc/flow_doc/generated/html_public/functions_n.html +++ b/doc/flow_doc/generated/html_public/functions_n.html @@ -74,13 +74,14 @@

                                                                                                                                                                                                        - n -

                                                                                                                                                                                                        diff --git a/doc/flow_doc/generated/html_public/functions_o.html b/doc/flow_doc/generated/html_public/functions_o.html index fbdadcc70..3f9f9eea5 100644 --- a/doc/flow_doc/generated/html_public/functions_o.html +++ b/doc/flow_doc/generated/html_public/functions_o.html @@ -78,7 +78,7 @@

                                                                                                                                                                                                        - o -

                                                                                                                                                                                                        • operator-() : flow::perf::Time_pt_set
                                                                                                                                                                                                        • operator/=() : flow::perf::Duration_set
                                                                                                                                                                                                        • operator<<() : flow::cfg::Config_manager< S_d_value_set >, flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >, flow::log::Verbosity_config, flow::net_flow::asio::Peer_socket, flow::net_flow::asio::Server_socket, flow::net_flow::Event_set, flow::net_flow::Node_options, flow::net_flow::Peer_socket, flow::net_flow::Peer_socket_info, flow::net_flow::Peer_socket_options, flow::net_flow::Peer_socket_receive_stats, flow::net_flow::Peer_socket_send_stats, flow::net_flow::Remote_endpoint, flow::net_flow::Server_socket, flow::perf::Checkpointing_timer::Checkpoint, flow::perf::Checkpointing_timer, flow::perf::Duration_set
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • operator=() : flow::log::Component, flow::log::Config, flow::log::Log_context, flow::perf::Checkpointing_timer, flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Basic_string_view< Ch, Traits >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >, flow::util::Noncopyable, flow::util::Scoped_setter< Value >, flow::util::Unique_id_holder
                                                                                                                                                                                                        • operator==() : flow::log::Verbosity_config, flow::net_flow::Remote_endpoint
                                                                                                                                                                                                        • operator>>() : flow::log::Verbosity_config, flow::net_flow::Peer_socket_options
                                                                                                                                                                                                        • operator[]() : flow::async::Op_list, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                                                                                        • @@ -98,7 +98,7 @@

                                                                                                                                                                                                          - o -

                                                                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_p.html b/doc/flow_doc/generated/html_public/functions_p.html index 7306d3fbd..f4f8d8a84 100644 --- a/doc/flow_doc/generated/html_public/functions_p.html +++ b/doc/flow_doc/generated/html_public/functions_p.html @@ -97,7 +97,7 @@

                                                                                                                                                                                                            - p -

                                                                                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/functions_r.html b/doc/flow_doc/generated/html_public/functions_r.html index cca769c56..2ced047d7 100644 --- a/doc/flow_doc/generated/html_public/functions_r.html +++ b/doc/flow_doc/generated/html_public/functions_r.html @@ -92,7 +92,7 @@

                                                                                                                                                                                                              - r -

                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_rela.html b/doc/flow_doc/generated/html_public/functions_rela.html index a4d6351cf..32f1c5187 100644 --- a/doc/flow_doc/generated/html_public/functions_rela.html +++ b/doc/flow_doc/generated/html_public/functions_rela.html @@ -69,7 +69,7 @@ diff --git a/doc/flow_doc/generated/html_public/functions_s.html b/doc/flow_doc/generated/html_public/functions_s.html index a251c968a..3790ed3cf 100644 --- a/doc/flow_doc/generated/html_public/functions_s.html +++ b/doc/flow_doc/generated/html_public/functions_s.html @@ -126,12 +126,12 @@

                                                                                                                                                                                                                - s -

                                                                                                                                                                                                                • start_past_prefix() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                                                                                                • start_past_prefix_inc() : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                                                                                                • starts_with() : flow::util::Basic_string_view< Ch, Traits >
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • State : flow::net_flow::Event_set
                                                                                                                                                                                                                • state() : flow::net_flow::Event_set
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • State : flow::net_flow::Peer_socket
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • State : flow::net_flow::Event_set
                                                                                                                                                                                                                • state() : flow::net_flow::Peer_socket
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • State : flow::net_flow::Server_socket
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • State : flow::net_flow::Peer_socket
                                                                                                                                                                                                                • state() : flow::net_flow::Server_socket
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • State : flow::net_flow::Server_socket
                                                                                                                                                                                                                • state_to_ostream() : flow::cfg::Config_manager< S_d_value_set >
                                                                                                                                                                                                                • Static_config_manager() : flow::cfg::Static_config_manager< Value_set >
                                                                                                                                                                                                                • static_values() : flow::cfg::Config_manager< S_d_value_set >
                                                                                                                                                                                                                • @@ -153,7 +153,7 @@

                                                                                                                                                                                                                  - s -

                                                                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_t.html b/doc/flow_doc/generated/html_public/functions_t.html index 721124ad1..9cf0ba17b 100644 --- a/doc/flow_doc/generated/html_public/functions_t.html +++ b/doc/flow_doc/generated/html_public/functions_t.html @@ -87,7 +87,7 @@

                                                                                                                                                                                                                    - t -

                                                                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_type.html b/doc/flow_doc/generated/html_public/functions_type.html index 6a5e3b20e..84fa36dd9 100644 --- a/doc/flow_doc/generated/html_public/functions_type.html +++ b/doc/flow_doc/generated/html_public/functions_type.html @@ -80,14 +80,14 @@

                                                                                                                                                                                                                      - c -

                                                                                                                                                                                                                      • Component_sev_pair_seq : flow::log::Verbosity_config
                                                                                                                                                                                                                      • Component_to_union_idx_func : flow::log::Config
                                                                                                                                                                                                                      • component_union_idx_t : flow::log::Config
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Const_iterator : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Const_iterator : flow::util::Blob_with_log_context< S_SHARING_ALLOWED >
                                                                                                                                                                                                                      • const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Const_iterator : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >
                                                                                                                                                                                                                      • const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • Const_iterator : flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                      • const_pointer : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                      • Const_ptr : flow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >
                                                                                                                                                                                                                      • const_reference : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                      • @@ -206,7 +206,7 @@

                                                                                                                                                                                                                        - v -

                                                                                                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_u.html b/doc/flow_doc/generated/html_public/functions_u.html index 4d955e9df..9a8e9612b 100644 --- a/doc/flow_doc/generated/html_public/functions_u.html +++ b/doc/flow_doc/generated/html_public/functions_u.html @@ -74,7 +74,7 @@

                                                                                                                                                                                                                          - u -

                                                                                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/functions_v.html b/doc/flow_doc/generated/html_public/functions_v.html index 54ec93ad4..63bd74586 100644 --- a/doc/flow_doc/generated/html_public/functions_v.html +++ b/doc/flow_doc/generated/html_public/functions_v.html @@ -73,9 +73,8 @@

                                                                                                                                                                                                                            - v -

                                                                                                                                                                                                                            • value : boost::system::is_error_code_enum<::flow::net_flow::error::Code >
                                                                                                                                                                                                                            • Value : flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                            • value_type : flow::util::Basic_blob< Allocator, S_SHARING_ALLOWED >, flow::util::Blob_with_log_context< S_SHARING_ALLOWED >, flow::util::Linked_hash_map< Key, Mapped, Hash, Pred >, flow::util::Linked_hash_set< Key, Hash, Pred >
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • values() : flow::cfg::Option_set< Value_set >
                                                                                                                                                                                                                            • Values : flow::cfg::Option_set< Value_set >
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • values() : flow::cfg::Static_config_manager< Value_set >
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • values() : flow::cfg::Option_set< Value_set >, flow::cfg::Static_config_manager< Value_set >
                                                                                                                                                                                                                            • values_candidate() : flow::cfg::Option_set< Value_set >
                                                                                                                                                                                                                            • Values_ptr : flow::cfg::Option_set< Value_set >
                                                                                                                                                                                                                            • values_to_ostream() : flow::cfg::Option_set< Value_set >
                                                                                                                                                                                                                            • @@ -84,7 +83,7 @@

                                                                                                                                                                                                                              - v -

                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/functions_vars.html b/doc/flow_doc/generated/html_public/functions_vars.html index 93c784ef9..1bab20fbc 100644 --- a/doc/flow_doc/generated/html_public/functions_vars.html +++ b/doc/flow_doc/generated/html_public/functions_vars.html @@ -231,7 +231,7 @@

                                                                                                                                                                                                                                - m -

                                                                                                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/functions_vars_s.html b/doc/flow_doc/generated/html_public/functions_vars_s.html index ea369f01e..4c1c318dd 100644 --- a/doc/flow_doc/generated/html_public/functions_vars_s.html +++ b/doc/flow_doc/generated/html_public/functions_vars_s.html @@ -92,7 +92,7 @@

                                                                                                                                                                                                                                  - s -

                                                                                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/functions_vars_v.html b/doc/flow_doc/generated/html_public/functions_vars_v.html index f603e7466..2f737c495 100644 --- a/doc/flow_doc/generated/html_public/functions_vars_v.html +++ b/doc/flow_doc/generated/html_public/functions_vars_v.html @@ -71,7 +71,7 @@

                                                                                                                                                                                                                                    - v -

                                                                                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/functions_w.html b/doc/flow_doc/generated/html_public/functions_w.html index 5e0e05fad..04ff6d5e5 100644 --- a/doc/flow_doc/generated/html_public/functions_w.html +++ b/doc/flow_doc/generated/html_public/functions_w.html @@ -71,7 +71,7 @@

                                                                                                                                                                                                                                      - w -

                                                                                                                                                                                                                                        diff --git a/doc/flow_doc/generated/html_public/functions_z.html b/doc/flow_doc/generated/html_public/functions_z.html index f9e495ad1..39f55b0ba 100644 --- a/doc/flow_doc/generated/html_public/functions_z.html +++ b/doc/flow_doc/generated/html_public/functions_z.html @@ -71,7 +71,7 @@

                                                                                                                                                                                                                                        - z -

                                                                                                                                                                                                                                          diff --git a/doc/flow_doc/generated/html_public/functions_~.html b/doc/flow_doc/generated/html_public/functions_~.html index 59f015882..82a4dafcb 100644 --- a/doc/flow_doc/generated/html_public/functions_~.html +++ b/doc/flow_doc/generated/html_public/functions_~.html @@ -84,7 +84,7 @@

                                                                                                                                                                                                                                          - ~ -

                                                                                                                                                                                                                                            diff --git a/doc/flow_doc/generated/html_public/globals.html b/doc/flow_doc/generated/html_public/globals.html index 0958c854d..312660938 100644 --- a/doc/flow_doc/generated/html_public/globals.html +++ b/doc/flow_doc/generated/html_public/globals.html @@ -112,7 +112,7 @@

                                                                                                                                                                                                                                            - f -

                                                                                                                                                                                                                                              diff --git a/doc/flow_doc/generated/html_public/globals_defs.html b/doc/flow_doc/generated/html_public/globals_defs.html index 3feb30cc4..f886b0c4e 100644 --- a/doc/flow_doc/generated/html_public/globals_defs.html +++ b/doc/flow_doc/generated/html_public/globals_defs.html @@ -112,7 +112,7 @@

                                                                                                                                                                                                                                              - f -

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/graph_legend.html b/doc/flow_doc/generated/html_public/graph_legend.html index 4064a51c5..3c45bb90f 100644 --- a/doc/flow_doc/generated/html_public/graph_legend.html +++ b/doc/flow_doc/generated/html_public/graph_legend.html @@ -129,7 +129,7 @@ diff --git a/doc/flow_doc/generated/html_public/hierarchy.html b/doc/flow_doc/generated/html_public/hierarchy.html index f8c2ac043..622fa04e2 100644 --- a/doc/flow_doc/generated/html_public/hierarchy.html +++ b/doc/flow_doc/generated/html_public/hierarchy.html @@ -96,89 +96,90 @@  Cflow::util::Linked_hash_set< Key, Hash, Pred >An object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<>  Cflow::util::Linked_hash_set< Peer_socket_ptr >  Cflow::log::Log_contextConvenience class that simply stores a Logger and/or Component passed into a constructor; and returns this Logger and Component via get_logger() and get_log_component() public accessors - Cflow::cfg::Config_manager< Value_set, Null_value_set > - Cflow::cfg::Static_config_manager< Value_set >A Config_manager-related adapter-style class that manages a simple config setup involving a single (though arbitrarily complex) Option_set<>-ready raw value struct config store type Value_set, meant to be used only in static fashion - Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency - Cflow::async::Op_listSimple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N worker threads, with typically used operations such as [index] and random Op selection - Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks - Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved - Cflow::async::Timed_single_thread_task_loopIdentical to Single_thread_task_loop, but all tasks posted through it are automatically timed, with the result accessible via accumulated_time() + Cflow::cfg::Config_manager< Value_set, Null_value_set > + Cflow::cfg::Static_config_manager< Value_set >A Config_manager-related adapter-style class that manages a simple config setup involving a single (though arbitrarily complex) Option_set<>-ready raw value struct config store type Value_set, meant to be used only in static fashion + Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency + Cflow::async::Op_listSimple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N worker threads, with typically used operations such as [index] and random Op selection + Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks + Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved + Cflow::async::Timed_single_thread_task_loopIdentical to Single_thread_task_loop, but all tasks posted through it are automatically timed, with the result accessible via accumulated_time()  Cflow::cfg::Config_manager< S_d_value_set >Manages a config setup, intended for a single daemon process, by maintaining 1 or more set(s) of static config and dynamic config, each, via that number of Option_set<>-ready raw value struct types supplied by the user as template arguments  Cflow::cfg::Option_set< Value_set >The core config-parsing facility, which builds parsing/comparison/output capabilities on top of a given simple config-holding object, of the type Value_set, a template argument to this class template  Cflow::log::Async_file_loggerAn implementation of Logger that logs messages to a given file-system path but never blocks any logging thread for file I/O; suitable for heavy-duty file logging  Cflow::net_flow::Event_setA user-set collection of sockets and desired conditions on those sockets (such as: "socket has data to read"), with the ability to wait for those conditions to become true and signal the user when so  Cflow::net_flow::Net_env_simulatorObjects of this class can be fed to Node to make it internally simulate network conditions like loss, latency, and data duplication - Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer - Cflow::net_flow::asio::NodeA subclass of net_flow::Node that adds the ability to easily and directly use net_flow sockets in general boost.asio event loops - Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support - Cflow::net_flow::asio::Peer_socketA net_flow::Peer_socket that adds integration with boost.asio - Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established - Cflow::net_flow::asio::Server_socketA net_flow::Server_socket that adds integration with boost.asio - Cflow::perf::Checkpointing_timerThe central class in the perf Flow module, this efficiently times the user's operation, with a specified subset of timing methods; and with the optional ability to time intermediate checkpoints within the overall operation - Cflow::perf::Checkpointing_timer::AggregatorThis companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpointing_timers each measuring some user operation being repeated many times; particularly when the operation consists of multiple steps (checkpoints) of interest - Cflow::util::Blob_with_log_context< S_SHARING_ALLOWED >Basic_blob that works in regular heap (and is itself placed in heap or stack) and memorizes a log::Logger, enabling easier logging albeit with a small perf trade-off - Cflow::log::Msg_metadataSimple data store containing all of the information generated at every logging call site by flow::log, except the message itself, which is passed to Logger::do_log() assuming Logger::should_log() had returned true - Cflow::net_flow::Node_optionsA set of low-level options affecting a single Flow Node, including Peer_socket objects and other objects subsequently generated by that Flow Node - Cflow::util::Null_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor - Cflow::async::Concurrent_task_loopThe core flow::async interface, providing an optionally multi-threaded thread pool onto which runnable Tasks, optionally arranged into concurrency-avoiding Ops, can be boost.asio-posted for subsequent execution - Cflow::async::Timed_concurrent_task_loop_impl< std::atomic< perf::duration_rep_t > > - Cflow::async::Timed_concurrent_task_loopDecorates a general – potentially multi-threaded – Concurrent_task_loop of any kind but with timing capabilities - Cflow::async::Timed_concurrent_task_loop_impl< perf::duration_rep_t > - Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency - Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks - Cflow::async::Timed_concurrent_task_loop_impl< Time_accumulator >Decorator of a Concurrent_task_loop with same or greater lifetime that accumulates time elapsed in any tasks posted or scheduled onto that loop - Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved - Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) - Cflow::log::Async_file_loggerAn implementation of Logger that logs messages to a given file-system path but never blocks any logging thread for file I/O; suitable for heavy-duty file logging - Cflow::log::Buffer_loggerAn implementation of Logger that logs messages to an internal std::string buffer and provides read-only access to this buffer (for example, if one wants to write out its contents when exiting program) - Cflow::log::Simple_ostream_loggerAn implementation of Logger that logs messages to the given ostreams (e.g., cout or an ofstream for a file) - Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer - Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support - Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established - Cflow::cfg::Config_manager< S_d_value_set >::On_dynamic_change_func_handleOpaque handle for managing a dynamic config change callback - Cflow::cfg::Option_set_baseUn-templated base for Option_set - Cflow::cfg::Option_set< Value_set >The core config-parsing facility, which builds parsing/comparison/output capabilities on top of a given simple config-holding object, of the type Value_set, a template argument to this class template - Cflow::log::Ostream_log_msg_writerUtility class, each object of which wraps a given ostream and outputs discrete messages to it adorned with time stamps and other formatting such as separating newlines - Cflow::net_flow::Peer_socket_infoA data store that keeps stats about the a Peer_socket connection - Cflow::net_flow::Peer_socket_optionsA set of low-level options affecting a single Peer_socket - Cflow::net_flow::Peer_socket_receive_statsA data store that keeps stats about the incoming direction of a Peer_socket connection to another Flow-protocol Peer_socket - Cflow::net_flow::Peer_socket_send_statsA data store that keeps stats about the outgoing direction of a Peer_socket connection to another Flow-protocol Peer_socket - Cflow::net_flow::Remote_endpointRepresents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remote Node and the logical Flow-protocol port within that Node - Cflow::util::Rnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved - Cflow::util::Rnd_gen_uniform_range< size_t > - Cflow::util::Rnd_gen_uniform_range_mt< size_t > - Cflow::util::Rnd_gen_uniform_range< Peer_socket::security_token_t > - Cflow::util::Rnd_gen_uniform_range< range_t >Simple, non-thread-safe uniform-range random number generator - Cflow::util::Rnd_gen_uniform_range_mt< range_t >Identical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object - Cflow::error::Runtime_errorAn std::runtime_error (which is an std::exception) that stores an Error_code - Cflow::util::Scoped_setter< Value >A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value - Cflow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >Convenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Event_set > > - Cflow::net_flow::Event_setA user-set collection of sockets and desired conditions on those sockets (such as: "socket has data + Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer + Cflow::net_flow::asio::NodeA subclass of net_flow::Node that adds the ability to easily and directly use net_flow sockets in general boost.asio event loops + Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support + Cflow::net_flow::asio::Peer_socketA net_flow::Peer_socket that adds integration with boost.asio + Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established + Cflow::net_flow::asio::Server_socketA net_flow::Server_socket that adds integration with boost.asio + Cflow::perf::Checkpointing_timerThe central class in the perf Flow module, this efficiently times the user's operation, with a specified subset of timing methods; and with the optional ability to time intermediate checkpoints within the overall operation + Cflow::perf::Checkpointing_timer::AggregatorThis companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpointing_timers each measuring some user operation being repeated many times; particularly when the operation consists of multiple steps (checkpoints) of interest + Cflow::util::Blob_with_log_context< S_SHARING_ALLOWED >Basic_blob that works in regular heap (and is itself placed in heap or stack) and memorizes a log::Logger, enabling easier logging albeit with a small perf trade-off + Cflow::log::Msg_metadataSimple data store containing all of the information generated at every logging call site by flow::log, except the message itself, which is passed to Logger::do_log() assuming Logger::should_log() had returned true + Cflow::net_flow::Node_optionsA set of low-level options affecting a single Flow Node, including Peer_socket objects and other objects subsequently generated by that Flow Node + Cflow::util::NoncopyableUseful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized) + Cflow::util::Null_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor + Cflow::async::Concurrent_task_loopThe core flow::async interface, providing an optionally multi-threaded thread pool onto which runnable Tasks, optionally arranged into concurrency-avoiding Ops, can be boost.asio-posted for subsequent execution + Cflow::async::Timed_concurrent_task_loop_impl< std::atomic< perf::duration_rep_t > > + Cflow::async::Timed_concurrent_task_loopDecorates a general – potentially multi-threaded – Concurrent_task_loop of any kind but with timing capabilities + Cflow::async::Timed_concurrent_task_loop_impl< perf::duration_rep_t > + Cflow::async::Cross_thread_task_loopConcrete Concurrent_task_loop that is able to efficiently schedule Tasks within a given Op to execute in different threads while still properly avoiding concurrency + Cflow::async::Segregated_thread_task_loopConcrete Concurrent_task_loop that uses the legacy pin-Tasks-within-1-Op-to-1-thread method of achieving required non-concurrency of Tasks + Cflow::async::Timed_concurrent_task_loop_impl< Time_accumulator >Decorator of a Concurrent_task_loop with same or greater lifetime that accumulates time elapsed in any tasks posted or scheduled onto that loop + Cflow::async::Single_thread_task_loopA Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essentially it is pleasant syntactic sugar around a Concurrent_task_loop impl that cuts out concepts that become irrelevant with only one thread involved + Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) + Cflow::log::Async_file_loggerAn implementation of Logger that logs messages to a given file-system path but never blocks any logging thread for file I/O; suitable for heavy-duty file logging + Cflow::log::Buffer_loggerAn implementation of Logger that logs messages to an internal std::string buffer and provides read-only access to this buffer (for example, if one wants to write out its contents when exiting program) + Cflow::log::Simple_ostream_loggerAn implementation of Logger that logs messages to the given ostreams (e.g., cout or an ofstream for a file) + Cflow::net_flow::NodeAn object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a distinct IP address and UDP port; and (2) it speaks the Flow protocol over a UDP transport layer + Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support + Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established + Cflow::cfg::Config_manager< S_d_value_set >::On_dynamic_change_func_handleOpaque handle for managing a dynamic config change callback + Cflow::cfg::Option_set_baseUn-templated base for Option_set + Cflow::cfg::Option_set< Value_set >The core config-parsing facility, which builds parsing/comparison/output capabilities on top of a given simple config-holding object, of the type Value_set, a template argument to this class template + Cflow::log::Ostream_log_msg_writerUtility class, each object of which wraps a given ostream and outputs discrete messages to it adorned with time stamps and other formatting such as separating newlines + Cflow::net_flow::Peer_socket_infoA data store that keeps stats about the a Peer_socket connection + Cflow::net_flow::Peer_socket_optionsA set of low-level options affecting a single Peer_socket + Cflow::net_flow::Peer_socket_receive_statsA data store that keeps stats about the incoming direction of a Peer_socket connection to another Flow-protocol Peer_socket + Cflow::net_flow::Peer_socket_send_statsA data store that keeps stats about the outgoing direction of a Peer_socket connection to another Flow-protocol Peer_socket + Cflow::net_flow::Remote_endpointRepresents the remote endpoint of a Flow-protocol connection; identifies the UDP endpoint of the remote Node and the logical Flow-protocol port within that Node + Cflow::util::Rnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved + Cflow::util::Rnd_gen_uniform_range< size_t > + Cflow::util::Rnd_gen_uniform_range_mt< size_t > + Cflow::util::Rnd_gen_uniform_range< Peer_socket::security_token_t > + Cflow::util::Rnd_gen_uniform_range< range_t >Simple, non-thread-safe uniform-range random number generator + Cflow::util::Rnd_gen_uniform_range_mt< range_t >Identical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object + Cflow::error::Runtime_errorAn std::runtime_error (which is an std::exception) that stores an Error_code + Cflow::util::Scoped_setter< Value >A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value + Cflow::util::Shared_ptr_alias_holder< Target_ptr, Const_target_ptr >Convenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Event_set > > + Cflow::net_flow::Event_setA user-set collection of sockets and desired conditions on those sockets (such as: "socket has data to read"), with the ability to wait for those conditions to become true and signal the user when so - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Null_value_set > > - Cflow::cfg::Null_value_setEmpty struct suitable as a *_value_set template arg for Config_manager, when a slot requires a Value_set, but you have no config to actually parse there - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket > > - Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Received_packet > > - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Sent_packet > > - Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Server_socket > > - Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established - Cflow::net_flow::Event_set::Socket_as_any_equalsEquality predicate class used in storing various sockets of types wrapped as boost::anys in the Sockets type - Cflow::net_flow::Event_set::Socket_as_any_hashHasher class used in storing various sockets of types wrapped as boost::anys in the Sockets type - Cflow::util::String_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string - Cflow::log::Async_file_logger::Throttling_cfgControls behavior of the throttling algorithm as described in Async_file_logger doc header Throttling section - Cflow::perf::Time_pt_setConvenience wrapper around an array<Time_pt, N>, which stores a time point for each of the N possible clock types in perf::Clock_type - Cflow::util::Unique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end - Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) - Cflow::log::Verbosity_configOptional-use structure encapsulating a full set of verbosity config, such that one can parse it from a config source (like an options file) in concise form and apply it to a log::Config object + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Null_value_set > > + Cflow::cfg::Null_value_setEmpty struct suitable as a *_value_set template arg for Config_manager, when a slot requires a Value_set, but you have no config to actually parse there + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket > > + Cflow::net_flow::Peer_socketA peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes and reliability support + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Received_packet > > + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Peer_socket::Sent_packet > > + Cflow::util::Shared_ptr_alias_holder< boost::shared_ptr< Server_socket > > + Cflow::net_flow::Server_socketA server socket able to listen on a single Flow port for incoming connections and return peer sockets (Peer_socket objects) to the local user once such connections are established + Cflow::net_flow::Event_set::Socket_as_any_equalsEquality predicate class used in storing various sockets of types wrapped as boost::anys in the Sockets type + Cflow::net_flow::Event_set::Socket_as_any_hashHasher class used in storing various sockets of types wrapped as boost::anys in the Sockets type + Cflow::util::String_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string + Cflow::log::Async_file_logger::Throttling_cfgControls behavior of the throttling algorithm as described in Async_file_logger doc header Throttling section + Cflow::perf::Time_pt_setConvenience wrapper around an array<Time_pt, N>, which stores a time point for each of the N possible clock types in perf::Clock_type + Cflow::util::Unique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end + Cflow::log::LoggerInterface that the user should implement, passing the implementing Logger into logging classes (Flow's own classes like net_flow::Node; and user's own logging classes) at construction (plus free/static logging functions) + Cflow::log::Verbosity_configOptional-use structure encapsulating a full set of verbosity config, such that one can parse it from a config source (like an options file) in concise form and apply it to a log::Config object diff --git a/doc/flow_doc/generated/html_public/index.html b/doc/flow_doc/generated/html_public/index.html index eae69a547..bca85d6b5 100644 --- a/doc/flow_doc/generated/html_public/index.html +++ b/doc/flow_doc/generated/html_public/index.html @@ -71,7 +71,7 @@ diff --git a/doc/flow_doc/generated/html_public/info_8cpp.html b/doc/flow_doc/generated/html_public/info_8cpp.html index 0cf258902..74e2140cf 100644 --- a/doc/flow_doc/generated/html_public/info_8cpp.html +++ b/doc/flow_doc/generated/html_public/info_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/info_8hpp.html b/doc/flow_doc/generated/html_public/info_8hpp.html index 4ea401f63..2e162a433 100644 --- a/doc/flow_doc/generated/html_public/info_8hpp.html +++ b/doc/flow_doc/generated/html_public/info_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/inherit_graph_37.map b/doc/flow_doc/generated/html_public/inherit_graph_37.map index de1e168e0..098fe07e9 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_37.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_37.map @@ -1,8 +1,3 @@ - - - - - - + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_37.md5 b/doc/flow_doc/generated/html_public/inherit_graph_37.md5 index 9b10ff265..53ae598f7 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_37.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_37.md5 @@ -1 +1 @@ -d6d00749adadfaacd636d1b45e1da5a9 \ No newline at end of file +b08793a7b48bcd7a1fcaede138326f35 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_37.svg b/doc/flow_doc/generated/html_public/inherit_graph_37.svg index 3926e30f8..fdc32467c 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_37.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_37.svg @@ -4,101 +4,19 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Rnd_gen -_uniform_range_base + + +flow::util::Noncopyable - - -Node1 - - -flow::util::Rnd_gen -_uniform_range< size_t > - - - - - -Node0->Node1 - - - - - -Node3 - - -flow::util::Rnd_gen -_uniform_range< Peer -_socket::security_token_t > - - - - - -Node0->Node3 - - - - - -Node4 - - -flow::util::Rnd_gen -_uniform_range< range_t > - - - - - -Node0->Node4 - - - - - -Node2 - - -flow::util::Rnd_gen -_uniform_range_mt< size_t > - - - - - -Node1->Node2 - - - - - -Node5 - - -flow::util::Rnd_gen -_uniform_range_mt< range_t > - - - - - -Node4->Node5 - - - diff --git a/doc/flow_doc/generated/html_public/inherit_graph_38.map b/doc/flow_doc/generated/html_public/inherit_graph_38.map index 3b8fcefd8..de1e168e0 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_38.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_38.map @@ -1,3 +1,8 @@ - + + + + + + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_38.md5 b/doc/flow_doc/generated/html_public/inherit_graph_38.md5 index 9322a8379..9b10ff265 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_38.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_38.md5 @@ -1 +1 @@ -825e30a437002041c14da93b11c67493 \ No newline at end of file +d6d00749adadfaacd636d1b45e1da5a9 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_38.svg b/doc/flow_doc/generated/html_public/inherit_graph_38.svg index 340b181bc..3926e30f8 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_38.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_38.svg @@ -4,20 +4,101 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Scoped -_setter< Value > + + +flow::util::Rnd_gen +_uniform_range_base + + +Node1 + + +flow::util::Rnd_gen +_uniform_range< size_t > + + + + + +Node0->Node1 + + + + + +Node3 + + +flow::util::Rnd_gen +_uniform_range< Peer +_socket::security_token_t > + + + + + +Node0->Node3 + + + + + +Node4 + + +flow::util::Rnd_gen +_uniform_range< range_t > + + + + + +Node0->Node4 + + + + + +Node2 + + +flow::util::Rnd_gen +_uniform_range_mt< size_t > + + + + + +Node1->Node2 + + + + + +Node5 + + +flow::util::Rnd_gen +_uniform_range_mt< range_t > + + + + + +Node4->Node5 + + + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_39.map b/doc/flow_doc/generated/html_public/inherit_graph_39.map index feeafeb8f..3b8fcefd8 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_39.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_39.map @@ -1,4 +1,3 @@ - - + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_39.md5 b/doc/flow_doc/generated/html_public/inherit_graph_39.md5 index f764e8d61..9322a8379 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_39.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_39.md5 @@ -1 +1 @@ -f3ba3775c34b8f1def0185f220da279a \ No newline at end of file +825e30a437002041c14da93b11c67493 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_39.svg b/doc/flow_doc/generated/html_public/inherit_graph_39.svg index 78802dd6f..340b181bc 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_39.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_39.svg @@ -4,37 +4,20 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Shared -_ptr_alias_holder< boost -::shared_ptr< Null_value -_set > > + + +flow::util::Scoped +_setter< Value > - - -Node1 - - -flow::cfg::Null_value_set - - - - - -Node0->Node1 - - - diff --git a/doc/flow_doc/generated/html_public/inherit_graph_40.map b/doc/flow_doc/generated/html_public/inherit_graph_40.map index bb1227dcd..feeafeb8f 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_40.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_40.map @@ -1,3 +1,4 @@ - + + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_40.md5 b/doc/flow_doc/generated/html_public/inherit_graph_40.md5 index b0fd2e80e..f764e8d61 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_40.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_40.md5 @@ -1 +1 @@ -febe0c8510cf78c4ca09197a79d53e60 \ No newline at end of file +f3ba3775c34b8f1def0185f220da279a \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_40.svg b/doc/flow_doc/generated/html_public/inherit_graph_40.svg index 1410d8ead..78802dd6f 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_40.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_40.svg @@ -4,22 +4,37 @@ - + Graphical Class Hierarchy - + Node0 - + flow::util::Shared _ptr_alias_holder< boost -::shared_ptr< Peer_socket -::Received_packet > > +::shared_ptr< Null_value +_set > > + + +Node1 + + +flow::cfg::Null_value_set + + + + + +Node0->Node1 + + + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_41.md5 b/doc/flow_doc/generated/html_public/inherit_graph_41.md5 index f913f8550..b0fd2e80e 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_41.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_41.md5 @@ -1 +1 @@ -e02091778ca229f73a33be1aa69bf556 \ No newline at end of file +febe0c8510cf78c4ca09197a79d53e60 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_41.svg b/doc/flow_doc/generated/html_public/inherit_graph_41.svg index f3b950991..1410d8ead 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_41.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_41.svg @@ -17,7 +17,7 @@ flow::util::Shared _ptr_alias_holder< boost ::shared_ptr< Peer_socket -::Sent_packet > > +::Received_packet > > diff --git a/doc/flow_doc/generated/html_public/inherit_graph_42.map b/doc/flow_doc/generated/html_public/inherit_graph_42.map index 1f9296a31..bb1227dcd 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_42.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_42.map @@ -1,3 +1,3 @@ - + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_42.md5 b/doc/flow_doc/generated/html_public/inherit_graph_42.md5 index 9b6b6e191..f913f8550 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_42.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_42.md5 @@ -1 +1 @@ -fbea1374fb9aa614dc9d506fe5bfab59 \ No newline at end of file +e02091778ca229f73a33be1aa69bf556 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_42.svg b/doc/flow_doc/generated/html_public/inherit_graph_42.svg index 219482527..f3b950991 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_42.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_42.svg @@ -4,19 +4,20 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::Shared -_ptr_alias_holder< Target -_ptr, Const_target_ptr > + + +flow::util::Shared +_ptr_alias_holder< boost +::shared_ptr< Peer_socket +::Sent_packet > > diff --git a/doc/flow_doc/generated/html_public/inherit_graph_43.map b/doc/flow_doc/generated/html_public/inherit_graph_43.map index 60152f1af..1f9296a31 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_43.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_43.map @@ -1,3 +1,3 @@ - + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_43.md5 b/doc/flow_doc/generated/html_public/inherit_graph_43.md5 index 030694f84..9b6b6e191 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_43.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_43.md5 @@ -1 +1 @@ -4f33a488e0ec0790c201965250d3e558 \ No newline at end of file +fbea1374fb9aa614dc9d506fe5bfab59 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_43.svg b/doc/flow_doc/generated/html_public/inherit_graph_43.svg index 677685513..219482527 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_43.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_43.svg @@ -4,18 +4,19 @@ - - + + Graphical Class Hierarchy - + Node0 - - -flow::util::String -_ostream + + +flow::util::Shared +_ptr_alias_holder< Target +_ptr, Const_target_ptr > diff --git a/doc/flow_doc/generated/html_public/inherit_graph_44.map b/doc/flow_doc/generated/html_public/inherit_graph_44.map index 1b0eee54d..60152f1af 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_44.map +++ b/doc/flow_doc/generated/html_public/inherit_graph_44.map @@ -1,4 +1,3 @@ - - + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_44.md5 b/doc/flow_doc/generated/html_public/inherit_graph_44.md5 index 6334f2e9c..030694f84 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_44.md5 +++ b/doc/flow_doc/generated/html_public/inherit_graph_44.md5 @@ -1 +1 @@ -52c4cecb7f0e1188846428a0e8e187eb \ No newline at end of file +4f33a488e0ec0790c201965250d3e558 \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_44.svg b/doc/flow_doc/generated/html_public/inherit_graph_44.svg index cff797d97..677685513 100644 --- a/doc/flow_doc/generated/html_public/inherit_graph_44.svg +++ b/doc/flow_doc/generated/html_public/inherit_graph_44.svg @@ -4,36 +4,20 @@ - + Graphical Class Hierarchy - + Node0 - - -std::basic_string_view -< Char > + + +flow::util::String +_ostream - - -Node1 - - -flow::util::Basic_string -_view< Ch, Traits > - - - - - -Node0->Node1 - - - diff --git a/doc/flow_doc/generated/html_public/inherit_graph_45.map b/doc/flow_doc/generated/html_public/inherit_graph_45.map new file mode 100644 index 000000000..1b0eee54d --- /dev/null +++ b/doc/flow_doc/generated/html_public/inherit_graph_45.map @@ -0,0 +1,4 @@ + + + + diff --git a/doc/flow_doc/generated/html_public/inherit_graph_45.md5 b/doc/flow_doc/generated/html_public/inherit_graph_45.md5 new file mode 100644 index 000000000..6334f2e9c --- /dev/null +++ b/doc/flow_doc/generated/html_public/inherit_graph_45.md5 @@ -0,0 +1 @@ +52c4cecb7f0e1188846428a0e8e187eb \ No newline at end of file diff --git a/doc/flow_doc/generated/html_public/inherit_graph_45.svg b/doc/flow_doc/generated/html_public/inherit_graph_45.svg new file mode 100644 index 000000000..cff797d97 --- /dev/null +++ b/doc/flow_doc/generated/html_public/inherit_graph_45.svg @@ -0,0 +1,39 @@ + + + + + + +Graphical Class Hierarchy + + + +Node0 + + +std::basic_string_view +< Char > + + + + + +Node1 + + +flow::util::Basic_string +_view< Ch, Traits > + + + + + +Node0->Node1 + + + + + diff --git a/doc/flow_doc/generated/html_public/inherits.html b/doc/flow_doc/generated/html_public/inherits.html index 6d677fc20..ad41eb81c 100644 --- a/doc/flow_doc/generated/html_public/inherits.html +++ b/doc/flow_doc/generated/html_public/inherits.html @@ -143,27 +143,29 @@

                                                                                                                                                                                                                                                This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

                                                                                                                                                                                                                                                - + - + - + - + - + - + - + + + diff --git a/doc/flow_doc/generated/html_public/linked__hash__map_8hpp.html b/doc/flow_doc/generated/html_public/linked__hash__map_8hpp.html index e76d0672e..c2aae33e1 100644 --- a/doc/flow_doc/generated/html_public/linked__hash__map_8hpp.html +++ b/doc/flow_doc/generated/html_public/linked__hash__map_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/linked__hash__set_8hpp.html b/doc/flow_doc/generated/html_public/linked__hash__set_8hpp.html index 5f36c86e1..0b91b0bcf 100644 --- a/doc/flow_doc/generated/html_public/linked__hash__set_8hpp.html +++ b/doc/flow_doc/generated/html_public/linked__hash__set_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/log_8cpp.html b/doc/flow_doc/generated/html_public/log_8cpp.html index b0ce90ee3..972911ff5 100644 --- a/doc/flow_doc/generated/html_public/log_8cpp.html +++ b/doc/flow_doc/generated/html_public/log_8cpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_public/log_8hpp.html b/doc/flow_doc/generated/html_public/log_8hpp.html index c2af087ec..f65ef083b 100644 --- a/doc/flow_doc/generated/html_public/log_8hpp.html +++ b/doc/flow_doc/generated/html_public/log_8hpp.html @@ -922,7 +922,7 @@

                                                                                                                                                                                                                                                Severity selection

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/log__fwd_8hpp.html b/doc/flow_doc/generated/html_public/log__fwd_8hpp.html index f509dc89d..449e795af 100644 --- a/doc/flow_doc/generated/html_public/log__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/log__fwd_8hpp.html @@ -127,7 +127,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaceboost_1_1filesystem.html b/doc/flow_doc/generated/html_public/namespaceboost_1_1filesystem.html index 49727fca7..89a64d15f 100644 --- a/doc/flow_doc/generated/html_public/namespaceboost_1_1filesystem.html +++ b/doc/flow_doc/generated/html_public/namespaceboost_1_1filesystem.html @@ -151,7 +151,7 @@

                                                                                                                                                                                                                                                Rationale

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceboost_1_1system.html b/doc/flow_doc/generated/html_public/namespaceboost_1_1system.html index 4032ebd8e..a7925c06f 100644 --- a/doc/flow_doc/generated/html_public/namespaceboost_1_1system.html +++ b/doc/flow_doc/generated/html_public/namespaceboost_1_1system.html @@ -87,7 +87,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaceflow.html b/doc/flow_doc/generated/html_public/namespaceflow.html index 2ac5b1db2..b242b9f79 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow.html +++ b/doc/flow_doc/generated/html_public/namespaceflow.html @@ -191,7 +191,7 @@

                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                boost::system::error_code Error_code
                                                                                                                                                                                                                                                Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                                                                                                                                Definition: common.hpp:503
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                boost::system::error_code Error_code
                                                                                                                                                                                                                                                Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                                                                                                                                Definition: common.hpp:508

                                                                                                                                                                                                                                                Then, there are two possibilities. If you pass in non-null err_code, then after return *err_code is success (falsy) or a truthy enum-like value, representing a specific error. If, instead, you pass in null, then a flow::error::Runtime_error() exc is thrown if and only if *err_code would have been set to truthy value e_c had a non-null err_code been passed in. If such an exception is thrown, Error_code e_c is encapsulated in exception object exc. If and only if no exception is thrown, there was no error (*err_code would have been falsy).

                                                                                                                                                                                                                                                Thus, you get the best of both worlds: you can get the simplicity and performance of an error code; or the various features of an exception (including access to the error code via exc.code() if desired), with the same API signature. (boost.asio follows a similar concept, though it requires two API signatures for each operation, one without an Error_code argument, and one with non-const Error_code& out-arg. The above convention is more compact; plus we provide certain tools to reduce boiler-plate in connection with this.)

                                                                                                                                                                                                                                                Intro to Error_code, a/k/a boost.system error_code

                                                                                                                                                                                                                                                @@ -325,7 +325,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1async.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1async.html index f5d9f5ab2..f08a1d741 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1async.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1async.html @@ -796,7 +796,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg.html index 46a8a4b03..d2286eaeb 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg.html @@ -634,7 +634,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1fs.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1fs.html index f527caf9a..f8dbb94c5 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1fs.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1fs.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1opts.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1opts.html index d5b83ec4e..884bcd937 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1opts.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1cfg_1_1opts.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1error.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1error.html index cb099c47f..f00339d4d 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1error.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1error.html @@ -222,7 +222,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1log.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1log.html index ec03c4ce5..3faa99dde 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1log.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1log.html @@ -626,7 +626,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1log_1_1fs.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1log_1_1fs.html index 83b0deb04..9d1e77159 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1log_1_1fs.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1log_1_1fs.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow.html index d19caf31c..839de0c81 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow.html @@ -837,7 +837,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1asio.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1asio.html index b802b6fe3..e8709714e 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1asio.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1asio.html @@ -185,7 +185,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1error.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1error.html index ae55a48ec..df0a618ab 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1error.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1net__flow_1_1error.html @@ -142,7 +142,7 @@

                                                                                                                                                                                                                                                Synopsis

                                                                                                                                                                                                                                                throw flow::error::Runtime_error(code, "Additional context info here!");
                                                                                                                                                                                                                                                An std::runtime_error (which is an std::exception) that stores an Error_code.
                                                                                                                                                                                                                                                Definition: error.hpp:49
                                                                                                                                                                                                                                                @ S_CONN_REFUSED
                                                                                                                                                                                                                                                Other side refused connection.
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                boost::system::error_code Error_code
                                                                                                                                                                                                                                                Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                                                                                                                                Definition: common.hpp:503
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                boost::system::error_code Error_code
                                                                                                                                                                                                                                                Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...
                                                                                                                                                                                                                                                Definition: common.hpp:508

                                                                                                                                                                                                                                                Discussion

                                                                                                                                                                                                                                                The contents of this namespace is one instance (and model example) for how one can easily create their own simple error code set enum (and corresponding string messages) and hook it into the flexible, yet maximally fast, boost.system error facility. Another example (a peer of ours) would be boost.asio's error code set. See flow::Error_code doc header for a top-down summary of the Flow-used-and-recommended error reporting system.

                                                                                                                                                                                                                                                For boost.system experts wondering whether there is support for error_condition equivalence (i.e., the ability to compare a given flow::error::error_code to a more general boost::system::error_condition), currently the answer is no, there isn't. We may add error_conditions as Error_code usage patterns emerge over time.

                                                                                                                                                                                                                                                @@ -264,7 +264,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1perf.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1perf.html index 669d718fc..3a93f456c 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1perf.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1perf.html @@ -933,7 +933,7 @@

                                                                                                                                                                                                                                                Synopsis/examples

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1util.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1util.html index ecbeddac3..8b5a30d56 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1util.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1util.html @@ -120,6 +120,9 @@ class  Linked_hash_set  An object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<>. More...
                                                                                                                                                                                                                                                  +struct  Noncopyable + Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). More...
                                                                                                                                                                                                                                                +  class  Null_interface  An empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor. More...
                                                                                                                                                                                                                                                  @@ -959,7 +962,7 @@

                                                                                                                                                                                                                                                boost::asio::buffer(bytes), // Turn a single memory array into a buffer sequence.
                                                                                                                                                                                                                                                " ");
                                                                                                                                                                                                                                                << "]."; // This will be on its own line at the end.
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                                                                                                                                Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                                                                                                                                Definition: util.hpp:388
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                std::ostream & buffers_to_ostream(std::ostream &os, const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                                                                                                                                Writes a multi- or single-line string representation of the provided binary data to an output stream,...
                                                                                                                                                                                                                                                Definition: util.hpp:413

                                                                                                                                                                                                                                                See also buffers_dump_string() which returns a string and can thus be more easily used directly inside FLOW_LOG_DATA() and similar log macros.

                                                                                                                                                                                                                                                Performance

                                                                                                                                                                                                                                                This thing is slow... it's not trying to be fast and can't be all that fast anyway. As usual, though, if used in FLOW_LOG_DATA() (etc.) its slowness will only come into play if the log filter passes which (esp. for log::Severity::S_DATA) it usually won't.

                                                                                                                                                                                                                                                @@ -980,7 +983,7 @@

                                                                                                                                                                                                                                                Performance

                                                                                                                                                                                                                                                << "].");
                                                                                                                                                                                                                                                // flow::util::ostream_op_string() is a bit of an improvement but still. :-)
                                                                                                                                                                                                                                                #define FLOW_LOG_INFO(ARG_stream_fragment)
                                                                                                                                                                                                                                                Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
                                                                                                                                                                                                                                                Definition: log.hpp:197
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                                                                                                                                Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                                                                                                                                Definition: util.hpp:481
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                std::string buffers_dump_string(const Const_buffer_sequence &data, const std::string &indentation, size_t bytes_per_line)
                                                                                                                                                                                                                                                Identical to buffers_to_ostream() but returns an std::string instead of writing to a given ostream.
                                                                                                                                                                                                                                                Definition: util.hpp:506

                                                                                                                                                                                                                                                Rationale

                                                                                                                                                                                                                                                The reason it returns os and takes a reference-to-mutable instead of the customary (for this project's style, to indicate modification potential at call sites) pointer-to-mutable is in order to be bind()able in such a way as to make an ostream manipulator. In the example above we use a lambda instead of bind() however.

                                                                                                                                                                                                                                                Template Parameters
                                                                                                                                                                                                                                                @@ -2115,7 +2118,7 @@

                                                                                                                                                                                                                                                // Now delete_x(x) will be called no matter how the current { block } exits.
                                                                                                                                                                                                                                                // ...
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                                                                                                                                Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                                                                                                                                Definition: util.hpp:282
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Auto_cleanup setup_auto_cleanup(const Cleanup_func &func)
                                                                                                                                                                                                                                                Provides a way to execute arbitrary (cleanup) code at the exit of the current block.
                                                                                                                                                                                                                                                Definition: util.hpp:307
                                                                                                                                                                                                                                                Todo:
                                                                                                                                                                                                                                                setup_auto_cleanup() should take a function via move semantics.
                                                                                                                                                                                                                                                Template Parameters
                                                                                                                                                                                                                                                @@ -2213,7 +2216,7 @@

                                                                                                                                                                                                                                                subtract_with_floor(&t, x) &&
                                                                                                                                                                                                                                                subtract_with_floor(&t, long_computation()) &&
                                                                                                                                                                                                                                                subtract_with_floor(&t, another_long_computation());
                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                                                                                                                                Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                                                                                                                                Definition: util.hpp:299
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                bool subtract_with_floor(Minuend *minuend, const Subtrahend &subtrahend, const Minuend &floor)
                                                                                                                                                                                                                                                Performs *minuend -= subtrahend, subject to a floor of floor.
                                                                                                                                                                                                                                                Definition: util.hpp:324
                                                                                                                                                                                                                                                Template Parameters

                                                                                                                                                                                                                                                @@ -2501,7 +2504,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/namespaceflow_1_1util_1_1this__thread.html b/doc/flow_doc/generated/html_public/namespaceflow_1_1util_1_1this__thread.html index d35a9689f..1b731c3dc 100644 --- a/doc/flow_doc/generated/html_public/namespaceflow_1_1util_1_1this__thread.html +++ b/doc/flow_doc/generated/html_public/namespaceflow_1_1util_1_1this__thread.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespacemembers.html b/doc/flow_doc/generated/html_public/namespacemembers.html index 50a9fdf33..5946fbe93 100644 --- a/doc/flow_doc/generated/html_public/namespacemembers.html +++ b/doc/flow_doc/generated/html_public/namespacemembers.html @@ -252,7 +252,7 @@

                                                                                                                                                                                                                                                - x -

                                                                                                                                                                                                                                                  diff --git a/doc/flow_doc/generated/html_public/namespacemembers_enum.html b/doc/flow_doc/generated/html_public/namespacemembers_enum.html index 095f72cf7..3131615ed 100644 --- a/doc/flow_doc/generated/html_public/namespacemembers_enum.html +++ b/doc/flow_doc/generated/html_public/namespacemembers_enum.html @@ -75,7 +75,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespacemembers_func.html b/doc/flow_doc/generated/html_public/namespacemembers_func.html index 180764b68..c1b9b1639 100644 --- a/doc/flow_doc/generated/html_public/namespacemembers_func.html +++ b/doc/flow_doc/generated/html_public/namespacemembers_func.html @@ -184,7 +184,7 @@

                                                                                                                                                                                                                                                  - v -

                                                                                                                                                                                                                                                    diff --git a/doc/flow_doc/generated/html_public/namespacemembers_type.html b/doc/flow_doc/generated/html_public/namespacemembers_type.html index 1e041326e..96ffcdfb1 100644 --- a/doc/flow_doc/generated/html_public/namespacemembers_type.html +++ b/doc/flow_doc/generated/html_public/namespacemembers_type.html @@ -165,7 +165,7 @@

                                                                                                                                                                                                                                                    - u -

                                                                                                                                                                                                                                                      diff --git a/doc/flow_doc/generated/html_public/namespacemembers_vars.html b/doc/flow_doc/generated/html_public/namespacemembers_vars.html index 5984a1285..f73cbe820 100644 --- a/doc/flow_doc/generated/html_public/namespacemembers_vars.html +++ b/doc/flow_doc/generated/html_public/namespacemembers_vars.html @@ -70,7 +70,7 @@ diff --git a/doc/flow_doc/generated/html_public/namespaces.html b/doc/flow_doc/generated/html_public/namespaces.html index 8b85f8656..6b98191cd 100644 --- a/doc/flow_doc/generated/html_public/namespaces.html +++ b/doc/flow_doc/generated/html_public/namespaces.html @@ -144,21 +144,22 @@

                                                                                                                                                                                                                                                - - - - - - - - - + + + + + + + + + +
                                                                                                                                                                                                                                                MinuendNumeric type.
                                                                                                                                                                                                                                                 CContainer_traits< util::Linked_hash_set< T, Hash, Pred > >Traits of flow::util::Linked_hash_set
                                                                                                                                                                                                                                                 CLinked_hash_mapAn object of this class is a map that combines the lookup speed of a boost::unordered_map<> and ordering and iterator stability capabilities of an std::list<>
                                                                                                                                                                                                                                                 CLinked_hash_setAn object of this class is a set that combines the lookup speed of an unordered_set<> and ordering and iterator stability capabilities of an std::list<>
                                                                                                                                                                                                                                                 CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor
                                                                                                                                                                                                                                                 CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator
                                                                                                                                                                                                                                                 CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved
                                                                                                                                                                                                                                                 CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object
                                                                                                                                                                                                                                                 CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value
                                                                                                                                                                                                                                                 CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively
                                                                                                                                                                                                                                                 CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string
                                                                                                                                                                                                                                                 CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end
                                                                                                                                                                                                                                                 CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function
                                                                                                                                                                                                                                                 CNoncopyableUseful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized)
                                                                                                                                                                                                                                                 CNull_interfaceAn empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor
                                                                                                                                                                                                                                                 CRnd_gen_uniform_rangeSimple, non-thread-safe uniform-range random number generator
                                                                                                                                                                                                                                                 CRnd_gen_uniform_range_baseBase class for Rnd_gen_uniform_range and Rnd_gen_uniform_range_mt for various aliases and similar, so template arguments need not be involved
                                                                                                                                                                                                                                                 CRnd_gen_uniform_range_mtIdentical to Rnd_gen_uniform_range but safe for concurrent RNG given a single object
                                                                                                                                                                                                                                                 CScoped_setterA simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value
                                                                                                                                                                                                                                                 CShared_ptr_alias_holderConvenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr aliased to shared_ptr<T> and shared_ptr<const T> respectively
                                                                                                                                                                                                                                                 CString_ostreamSimilar to ostringstream but allows fast read-only access directly into the std::string being written; and some limited write access to that string
                                                                                                                                                                                                                                                 CUnique_id_holderEach object of this class stores (at construction) and returns (on demand) a numeric ID unique from all other objects of the same class ever constructed, across all time from program start to end
                                                                                                                                                                                                                                                 CFunction< Result(Args...)>Intended as the polymorphic function wrapper of choice for Flow, internally and externally; to be used instead of std::function or boost::function
                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/net__env__simulator_8cpp.html b/doc/flow_doc/generated/html_public/net__env__simulator_8cpp.html index 3e50f9c9d..e537f48dd 100644 --- a/doc/flow_doc/generated/html_public/net__env__simulator_8cpp.html +++ b/doc/flow_doc/generated/html_public/net__env__simulator_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/net__env__simulator_8hpp.html b/doc/flow_doc/generated/html_public/net__env__simulator_8hpp.html index 8c2203c88..a197a3d92 100644 --- a/doc/flow_doc/generated/html_public/net__env__simulator_8hpp.html +++ b/doc/flow_doc/generated/html_public/net__env__simulator_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/net__flow_2error_2error_8cpp.html b/doc/flow_doc/generated/html_public/net__flow_2error_2error_8cpp.html index 7b75d551f..b8082d53a 100644 --- a/doc/flow_doc/generated/html_public/net__flow_2error_2error_8cpp.html +++ b/doc/flow_doc/generated/html_public/net__flow_2error_2error_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/net__flow_2error_2error_8hpp.html b/doc/flow_doc/generated/html_public/net__flow_2error_2error_8hpp.html index 7aeffffb1..7c71e3d37 100644 --- a/doc/flow_doc/generated/html_public/net__flow_2error_2error_8hpp.html +++ b/doc/flow_doc/generated/html_public/net__flow_2error_2error_8hpp.html @@ -150,7 +150,7 @@ diff --git a/doc/flow_doc/generated/html_public/net__flow__fwd_8hpp.html b/doc/flow_doc/generated/html_public/net__flow__fwd_8hpp.html index 9d7ed3680..7c92839e7 100644 --- a/doc/flow_doc/generated/html_public/net__flow__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/net__flow__fwd_8hpp.html @@ -154,7 +154,7 @@ diff --git a/doc/flow_doc/generated/html_public/node_8cpp.html b/doc/flow_doc/generated/html_public/node_8cpp.html index ca9c1c735..c92b92e4d 100644 --- a/doc/flow_doc/generated/html_public/node_8cpp.html +++ b/doc/flow_doc/generated/html_public/node_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/node_8hpp.html b/doc/flow_doc/generated/html_public/node_8hpp.html index 1bef71b08..61773942a 100644 --- a/doc/flow_doc/generated/html_public/node_8hpp.html +++ b/doc/flow_doc/generated/html_public/node_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/op_8cpp.html b/doc/flow_doc/generated/html_public/op_8cpp.html index eab0403df..97f366328 100644 --- a/doc/flow_doc/generated/html_public/op_8cpp.html +++ b/doc/flow_doc/generated/html_public/op_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/op_8hpp.html b/doc/flow_doc/generated/html_public/op_8hpp.html index 8d000cf12..d7a060f83 100644 --- a/doc/flow_doc/generated/html_public/op_8hpp.html +++ b/doc/flow_doc/generated/html_public/op_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/option__set_8cpp.html b/doc/flow_doc/generated/html_public/option__set_8cpp.html index 97046bb26..1cc1e6c79 100644 --- a/doc/flow_doc/generated/html_public/option__set_8cpp.html +++ b/doc/flow_doc/generated/html_public/option__set_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/option__set_8hpp.html b/doc/flow_doc/generated/html_public/option__set_8hpp.html index 0e142570e..cfd9d1ce6 100644 --- a/doc/flow_doc/generated/html_public/option__set_8hpp.html +++ b/doc/flow_doc/generated/html_public/option__set_8hpp.html @@ -542,7 +542,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/options_8cpp.html b/doc/flow_doc/generated/html_public/options_8cpp.html index 6b17b0f6d..d0bdb04e6 100644 --- a/doc/flow_doc/generated/html_public/options_8cpp.html +++ b/doc/flow_doc/generated/html_public/options_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/options_8hpp.html b/doc/flow_doc/generated/html_public/options_8hpp.html index 2c207174a..1df5095cd 100644 --- a/doc/flow_doc/generated/html_public/options_8hpp.html +++ b/doc/flow_doc/generated/html_public/options_8hpp.html @@ -105,7 +105,7 @@ diff --git a/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8cpp.html b/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8cpp.html index 1f663af96..c4f300ac2 100644 --- a/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8cpp.html +++ b/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8hpp.html b/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8hpp.html index 757749b4a..d6cc5f0e6 100644 --- a/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8hpp.html +++ b/doc/flow_doc/generated/html_public/ostream__log__msg__writer_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/pages.html b/doc/flow_doc/generated/html_public/pages.html index 65804deef..76255ffd3 100644 --- a/doc/flow_doc/generated/html_public/pages.html +++ b/doc/flow_doc/generated/html_public/pages.html @@ -74,7 +74,7 @@ diff --git a/doc/flow_doc/generated/html_public/peer__socket_8cpp.html b/doc/flow_doc/generated/html_public/peer__socket_8cpp.html index c5cabe426..e8ba3842e 100644 --- a/doc/flow_doc/generated/html_public/peer__socket_8cpp.html +++ b/doc/flow_doc/generated/html_public/peer__socket_8cpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/peer__socket_8hpp.html b/doc/flow_doc/generated/html_public/peer__socket_8hpp.html index b2e069e66..dbba85210 100644 --- a/doc/flow_doc/generated/html_public/peer__socket_8hpp.html +++ b/doc/flow_doc/generated/html_public/peer__socket_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/perf__fwd_8hpp.html b/doc/flow_doc/generated/html_public/perf__fwd_8hpp.html index 81771e11f..af79e3e1e 100644 --- a/doc/flow_doc/generated/html_public/perf__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/perf__fwd_8hpp.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_public/random_8hpp.html b/doc/flow_doc/generated/html_public/random_8hpp.html index 5b27ddb70..50b3780aa 100644 --- a/doc/flow_doc/generated/html_public/random_8hpp.html +++ b/doc/flow_doc/generated/html_public/random_8hpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/sched__task_8cpp.html b/doc/flow_doc/generated/html_public/sched__task_8cpp.html index b16d51c52..24e9c3cd2 100644 --- a/doc/flow_doc/generated/html_public/sched__task_8cpp.html +++ b/doc/flow_doc/generated/html_public/sched__task_8cpp.html @@ -104,7 +104,7 @@ diff --git a/doc/flow_doc/generated/html_public/sched__task_8hpp.html b/doc/flow_doc/generated/html_public/sched__task_8hpp.html index f5e25d9fe..b1fe494b1 100644 --- a/doc/flow_doc/generated/html_public/sched__task_8hpp.html +++ b/doc/flow_doc/generated/html_public/sched__task_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_public/sched__task__fwd_8hpp.html b/doc/flow_doc/generated/html_public/sched__task__fwd_8hpp.html index d2de07cc5..fce230feb 100644 --- a/doc/flow_doc/generated/html_public/sched__task__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/sched__task__fwd_8hpp.html @@ -125,7 +125,7 @@ diff --git a/doc/flow_doc/generated/html_public/search/all_10.js b/doc/flow_doc/generated/html_public/search/all_10.js index ee98071f1..2a9777c5c 100644 --- a/doc/flow_doc/generated/html_public/search/all_10.js +++ b/doc/flow_doc/generated/html_public/search/all_10.js @@ -172,8 +172,8 @@ var searchData= ['start_5fpast_5fprefix_169',['start_past_prefix',['../classflow_1_1util_1_1Basic__blob.html#af98832169c8e46d84f6c06987a3670e3',1,'flow::util::Basic_blob']]], ['start_5fpast_5fprefix_5finc_170',['start_past_prefix_inc',['../classflow_1_1util_1_1Basic__blob.html#a9c3497d662be650e7a560eb7a703acc1',1,'flow::util::Basic_blob']]], ['starts_5fwith_171',['starts_with',['../classflow_1_1util_1_1Basic__string__view.html#afdb616000a65f5e65ee99ce7808153e8',1,'flow::util::Basic_string_view::starts_with(Basic_string_view needle) const'],['../classflow_1_1util_1_1Basic__string__view.html#ae0846fbeb776ef1e083a041a7f816567',1,'flow::util::Basic_string_view::starts_with(Ch const *needle) const'],['../classflow_1_1util_1_1Basic__string__view.html#a2cbc4a17df32bba3f48567c548589874',1,'flow::util::Basic_string_view::starts_with(Ch needle) const']]], - ['state_172',['State',['../classflow_1_1net__flow_1_1Server__socket.html#a8bc789b851677a47d7c0a1aa0c69a997',1,'flow::net_flow::Server_socket::State()'],['../classflow_1_1net__flow_1_1Event__set.html#a2855bd159b6e63bf448ed1f41b608975',1,'flow::net_flow::Event_set::State()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6a9bb727c8982f24bcf978c10c2c7345',1,'flow::net_flow::Peer_socket::State()']]], - ['state_173',['state',['../classflow_1_1net__flow_1_1Event__set.html#a8453cccdaaf22ea6b027c5de9738f0f0',1,'flow::net_flow::Event_set::state()'],['../classflow_1_1net__flow_1_1Server__socket.html#ab2683ecde1fac2b0a79a957de1a2a8ff',1,'flow::net_flow::Server_socket::state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#af982953b5136c1df488066eacc293a78',1,'flow::net_flow::Peer_socket::state()']]], + ['state_172',['state',['../classflow_1_1net__flow_1_1Server__socket.html#ab2683ecde1fac2b0a79a957de1a2a8ff',1,'flow::net_flow::Server_socket::state()'],['../classflow_1_1net__flow_1_1Event__set.html#a8453cccdaaf22ea6b027c5de9738f0f0',1,'flow::net_flow::Event_set::state()'],['../classflow_1_1net__flow_1_1Peer__socket.html#af982953b5136c1df488066eacc293a78',1,'flow::net_flow::Peer_socket::state()']]], + ['state_173',['State',['../classflow_1_1net__flow_1_1Event__set.html#a2855bd159b6e63bf448ed1f41b608975',1,'flow::net_flow::Event_set::State()'],['../classflow_1_1net__flow_1_1Server__socket.html#a8bc789b851677a47d7c0a1aa0c69a997',1,'flow::net_flow::Server_socket::State()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a6a9bb727c8982f24bcf978c10c2c7345',1,'flow::net_flow::Peer_socket::State()']]], ['state_5fto_5fostream_174',['state_to_ostream',['../classflow_1_1cfg_1_1Config__manager.html#a19ae9775f51953805ea08086c276a78d',1,'flow::cfg::Config_manager']]], ['static_5fcfg_5fmanager_2ehpp_175',['static_cfg_manager.hpp',['../static__cfg__manager_8hpp.html',1,'']]], ['static_5fconfig_5fmanager_176',['Static_config_manager',['../classflow_1_1cfg_1_1Static__config__manager.html',1,'flow::cfg::Static_config_manager< Value_set >'],['../classflow_1_1cfg_1_1Static__config__manager.html#a77853af82c708377723671c92c6ab948',1,'flow::cfg::Static_config_manager::Static_config_manager()']]], diff --git a/doc/flow_doc/generated/html_public/search/all_13.js b/doc/flow_doc/generated/html_public/search/all_13.js index 4715f0574..3aeec6b81 100644 --- a/doc/flow_doc/generated/html_public/search/all_13.js +++ b/doc/flow_doc/generated/html_public/search/all_13.js @@ -5,14 +5,14 @@ var searchData= ['validate_5fparsed_5foption_2',['validate_parsed_option',['../classflow_1_1cfg_1_1Option__set__base.html#ab79c61f62032b238cb25e132ce1e1d43',1,'flow::cfg::Option_set_base']]], ['validate_5fvalues_3',['validate_values',['../classflow_1_1cfg_1_1Option__set.html#a4a3d6a15332fd7e2da1b852adc81aec3',1,'flow::cfg::Option_set::validate_values(bool *success_or_null=0) const'],['../classflow_1_1cfg_1_1Option__set.html#a7f3924bff19cae0beb9f06b6dffbd504',1,'flow::cfg::Option_set::validate_values(log::Logger *logger_ptr, const Values &values_to_validate, const Declare_options_func &declare_opts_func, bool *success_or_null=0)'],['../classflow_1_1cfg_1_1Option__set.html#a601592ed6eacb42eb5296a2c79fb6ace',1,'flow::cfg::Option_set::validate_values(const Values &values_to_validate, bool *success_or_null=0) const']]], ['validate_5fvalues_5fcandidate_4',['validate_values_candidate',['../classflow_1_1cfg_1_1Option__set.html#ae6b85e12065536214e78266d086be3b2',1,'flow::cfg::Option_set']]], - ['value_5',['value',['../structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html#a3a8d09a793eba817e718a3837fd1cd75',1,'boost::system::is_error_code_enum<::flow::net_flow::error::Code >']]], - ['value_6',['Value',['../classflow_1_1util_1_1Linked__hash__map.html#af8b3b1128da79536a4c86e9feadb0c66',1,'flow::util::Linked_hash_map::Value()'],['../classflow_1_1util_1_1Linked__hash__set.html#a591977b7bbcb0112db06722a9c9180a3',1,'flow::util::Linked_hash_set::Value()']]], + ['value_5',['Value',['../classflow_1_1util_1_1Linked__hash__map.html#af8b3b1128da79536a4c86e9feadb0c66',1,'flow::util::Linked_hash_map::Value()'],['../classflow_1_1util_1_1Linked__hash__set.html#a591977b7bbcb0112db06722a9c9180a3',1,'flow::util::Linked_hash_set::Value()']]], + ['value_6',['value',['../structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html#a3a8d09a793eba817e718a3837fd1cd75',1,'boost::system::is_error_code_enum<::flow::net_flow::error::Code >']]], ['value_5fset_5fmember_5fid_5fto_5fopt_5fname_7',['value_set_member_id_to_opt_name',['../namespaceflow_1_1cfg.html#a696eee859b6e3f0fc0b6473a1d2836b0',1,'flow::cfg']]], ['value_5fset_5fmember_5fid_5fto_5fopt_5fname_5fkeyed_8',['value_set_member_id_to_opt_name_keyed',['../namespaceflow_1_1cfg.html#aafaf432a612183beab72175831aaa960',1,'flow::cfg']]], ['value_5fto_5fostream_9',['value_to_ostream',['../namespaceflow_1_1cfg.html#a66d8d4f33601a06cb7bc109b22800387',1,'flow::cfg::value_to_ostream(std::ostream &os, const std::vector< Element > &val)'],['../namespaceflow_1_1cfg.html#ac3782f31b7c020d7b08e250e89198ad4',1,'flow::cfg::value_to_ostream(std::ostream &os, const boost::chrono::duration< Rep, Period > &val)'],['../namespaceflow_1_1cfg.html#a1f5ff766e52aae24e6d5c876b3b26e96',1,'flow::cfg::value_to_ostream(std::ostream &os, const Value &val)']]], ['value_5ftype_10',['value_type',['../classflow_1_1util_1_1Linked__hash__map.html#af0885cc03a4dffbaffe810b6cd8e28f6',1,'flow::util::Linked_hash_map::value_type()'],['../classflow_1_1util_1_1Linked__hash__set.html#a495a8e84dda748d4f91cc3d3d2dabe6a',1,'flow::util::Linked_hash_set::value_type()'],['../classflow_1_1util_1_1Blob__with__log__context.html#ade5daefad95ed92fa68f1d028dd67a65',1,'flow::util::Blob_with_log_context::value_type()'],['../classflow_1_1util_1_1Basic__blob.html#aeb9b64885b78263048d406ec34907ecf',1,'flow::util::Basic_blob::value_type()']]], - ['values_11',['values',['../classflow_1_1cfg_1_1Option__set.html#a93ab889bf230d21961c22bd4bf21e06a',1,'flow::cfg::Option_set::values()'],['../classflow_1_1cfg_1_1Static__config__manager.html#ae3576d329b71639e6acf38bb7a80e000',1,'flow::cfg::Static_config_manager::values()']]], - ['values_12',['Values',['../classflow_1_1cfg_1_1Option__set.html#ab12751047ec45932c26364e533a96e7c',1,'flow::cfg::Option_set']]], + ['values_11',['Values',['../classflow_1_1cfg_1_1Option__set.html#ab12751047ec45932c26364e533a96e7c',1,'flow::cfg::Option_set']]], + ['values_12',['values',['../classflow_1_1cfg_1_1Option__set.html#a93ab889bf230d21961c22bd4bf21e06a',1,'flow::cfg::Option_set::values()'],['../classflow_1_1cfg_1_1Static__config__manager.html#ae3576d329b71639e6acf38bb7a80e000',1,'flow::cfg::Static_config_manager::values()']]], ['values_5fcandidate_13',['values_candidate',['../classflow_1_1cfg_1_1Option__set.html#adce212853383183bd1b60505157f7215',1,'flow::cfg::Option_set']]], ['values_5fptr_14',['Values_ptr',['../classflow_1_1cfg_1_1Option__set.html#aa1aec14275948fe5b66ca75ba5f3b43d',1,'flow::cfg::Option_set']]], ['values_5fto_5fostream_15',['values_to_ostream',['../classflow_1_1cfg_1_1Option__set.html#adbbf2ec0dd43cb8372f33a3f4cc23633',1,'flow::cfg::Option_set']]], diff --git a/doc/flow_doc/generated/html_public/search/all_2.js b/doc/flow_doc/generated/html_public/search/all_2.js index 7db41ff6c..6e4a0dab2 100644 --- a/doc/flow_doc/generated/html_public/search/all_2.js +++ b/doc/flow_doc/generated/html_public/search/all_2.js @@ -59,8 +59,8 @@ var searchData= ['const_5fdata_56',['const_data',['../classflow_1_1util_1_1Basic__blob.html#a75d4c0a1e530596982a3b5d3e0ff91e6',1,'flow::util::Basic_blob']]], ['const_5fend_57',['const_end',['../classflow_1_1util_1_1Basic__blob.html#ae4f1d8c42aea63ba4f127cb7ed5776d6',1,'flow::util::Basic_blob']]], ['const_5ffront_58',['const_front',['../classflow_1_1util_1_1Basic__blob.html#a90859b0e130bef705a2e556ccb27df53',1,'flow::util::Basic_blob::const_front()'],['../classflow_1_1util_1_1Linked__hash__map.html#a775a99fd89e114b1efffce15c974e76e',1,'flow::util::Linked_hash_map::const_front()'],['../classflow_1_1util_1_1Linked__hash__set.html#a926db7e9160df1ff73634a7039e7c30c',1,'flow::util::Linked_hash_set::const_front()']]], - ['const_5fiterator_59',['Const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()']]], - ['const_5fiterator_60',['const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()']]], + ['const_5fiterator_59',['const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()']]], + ['const_5fiterator_60',['Const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()'],['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()']]], ['const_5fnewest_61',['const_newest',['../classflow_1_1util_1_1Linked__hash__map.html#a79ac8c4685ed84eac8407164f3bd8b84',1,'flow::util::Linked_hash_map::const_newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#a91021f4ea7018811502cab360284c6aa',1,'flow::util::Linked_hash_set::const_newest() const']]], ['const_5foldest_62',['const_oldest',['../classflow_1_1util_1_1Linked__hash__set.html#ae0cb0394a239b8855a711d417aabe8e7',1,'flow::util::Linked_hash_set::const_oldest()'],['../classflow_1_1util_1_1Linked__hash__map.html#ae415abb7c6b73bb42cde44b12113a154',1,'flow::util::Linked_hash_map::const_oldest() const']]], ['const_5fpast_5fnewest_63',['const_past_newest',['../classflow_1_1util_1_1Linked__hash__map.html#ae4e7882d9cbaea74f08b216b1e546cb8',1,'flow::util::Linked_hash_map::const_past_newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#a16f0324ec7c8fb399ab002ea52ff4252',1,'flow::util::Linked_hash_set::const_past_newest()']]], diff --git a/doc/flow_doc/generated/html_public/search/all_c.js b/doc/flow_doc/generated/html_public/search/all_c.js index 5c6486955..81f9ffc13 100644 --- a/doc/flow_doc/generated/html_public/search/all_c.js +++ b/doc/flow_doc/generated/html_public/search/all_c.js @@ -6,12 +6,12 @@ var searchData= ['net_5fenv_5fsimulator_2ehpp_3',['net_env_simulator.hpp',['../net__env__simulator_8hpp.html',1,'']]], ['net_5fflow_5ffwd_2ehpp_4',['net_flow_fwd.hpp',['../net__flow__fwd_8hpp.html',1,'']]], ['newest_5',['newest',['../classflow_1_1util_1_1Linked__hash__set.html#ac2d182fa6a6b6814527477991bc6ca68',1,'flow::util::Linked_hash_set::newest()'],['../classflow_1_1util_1_1Linked__hash__map.html#a4b796f7ddb4dbc2f2e64ea25985d43b8',1,'flow::util::Linked_hash_map::newest()']]], - ['node_6',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node']]], + ['node_6',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node'],['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()']]], ['node_7',['node',['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()']]], - ['node_8',['Node',['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()']]], - ['node_2ecpp_9',['node.cpp',['../asio_2node_8cpp.html',1,'(Global Namespace)'],['../node_8cpp.html',1,'(Global Namespace)']]], - ['node_2ehpp_10',['node.hpp',['../asio_2node_8hpp.html',1,'(Global Namespace)'],['../node_8hpp.html',1,'(Global Namespace)']]], - ['node_5foptions_11',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow::Node_options'],['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options::Node_options()']]], + ['node_2ecpp_8',['node.cpp',['../node_8cpp.html',1,'(Global Namespace)'],['../asio_2node_8cpp.html',1,'(Global Namespace)']]], + ['node_2ehpp_9',['node.hpp',['../asio_2node_8hpp.html',1,'(Global Namespace)'],['../node_8hpp.html',1,'(Global Namespace)']]], + ['node_5foptions_10',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow::Node_options'],['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options::Node_options()']]], + ['noncopyable_11',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html',1,'flow::util::Noncopyable'],['../structflow_1_1util_1_1Noncopyable.html#ac59627ad248129dd7b37d2d9286761cf',1,'flow::util::Noncopyable::Noncopyable()=default'],['../structflow_1_1util_1_1Noncopyable.html#a14a71cd2314f39996c2609ab383145e8',1,'flow::util::Noncopyable::Noncopyable(const Noncopyable &)=delete']]], ['now_12',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], ['null_13',['null',['../structflow_1_1cfg_1_1Final__validator__func.html#aa930ac2fbe3ad6abc07994984f875c81',1,'flow::cfg::Final_validator_func::null()'],['../classflow_1_1cfg_1_1Option__set.html#accd086867406387070ac766b03e7998c',1,'flow::cfg::Option_set::null()']]], ['null_5fdeclare_5fopts_5ffunc_14',['null_declare_opts_func',['../namespaceflow_1_1cfg.html#adfe41c8484a878742976ddb84aa9e2d8',1,'flow::cfg']]], diff --git a/doc/flow_doc/generated/html_public/search/all_d.js b/doc/flow_doc/generated/html_public/search/all_d.js index 428bddb7f..414d82538 100644 --- a/doc/flow_doc/generated/html_public/search/all_d.js +++ b/doc/flow_doc/generated/html_public/search/all_d.js @@ -13,12 +13,12 @@ var searchData= ['open_5fsub_5fstate_10',['Open_sub_state',['../classflow_1_1net__flow_1_1Peer__socket.html#a6f48d01d1269c9d4260d972baa40e548',1,'flow::net_flow::Peer_socket']]], ['operator_21_3d_11',['operator!=',['../namespaceflow_1_1log.html#acf78eb12c635e06cb37dfbcaac70144d',1,'flow::log::operator!=()'],['../classflow_1_1log_1_1Verbosity__config.html#acf78eb12c635e06cb37dfbcaac70144d',1,'flow::log::Verbosity_config::operator!=()']]], ['operator_28_29_12',['operator()',['../classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__hash.html#acdda0f516ad0c1e562ff1797cea653cc',1,'flow::net_flow::Event_set::Socket_as_any_hash::operator()()'],['../classflow_1_1net__flow_1_1Event__set_1_1Socket__as__any__equals.html#a2651cf79dd65bdc60707ff3a368f5d9a',1,'flow::net_flow::Event_set::Socket_as_any_equals::operator()()'],['../classflow_1_1util_1_1Rnd__gen__uniform__range.html#a579080b18b6c95d49039a5098afe707b',1,'flow::util::Rnd_gen_uniform_range::operator()()'],['../classflow_1_1util_1_1Rnd__gen__uniform__range__mt.html#ae9a26e2e155c9f24bcef57bd9404eca3',1,'flow::util::Rnd_gen_uniform_range_mt::operator()()']]], - ['operator_2a_3d_13',['operator*=',['../namespaceflow_1_1perf.html#a129032bde1082e8f2681669acf6bf03d',1,'flow::perf::operator*=()'],['../structflow_1_1perf_1_1Duration__set.html#a129032bde1082e8f2681669acf6bf03d',1,'flow::perf::Duration_set::operator*=(Duration_set &target, uint64_t mult_scale)']]], + ['operator_2a_3d_13',['operator*=',['../structflow_1_1perf_1_1Duration__set.html#a129032bde1082e8f2681669acf6bf03d',1,'flow::perf::Duration_set::operator*=()'],['../namespaceflow_1_1perf.html#a129032bde1082e8f2681669acf6bf03d',1,'flow::perf::operator*=()']]], ['operator_2b_3d_14',['operator+=',['../structflow_1_1perf_1_1Duration__set.html#a1c1e96770f8264d938ac09546a7cdb95',1,'flow::perf::Duration_set::operator+=()'],['../namespaceflow_1_1perf.html#a1c1e96770f8264d938ac09546a7cdb95',1,'flow::perf::operator+=(Duration_set &target, const Duration_set &to_add)'],['../namespaceflow_1_1perf.html#a46efb90b848b87bb7bbaa3e415616e6e',1,'flow::perf::operator+=(Time_pt_set &target, const Duration_set &to_add)']]], - ['operator_2d_15',['operator-',['../structflow_1_1perf_1_1Time__pt__set.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::Time_pt_set::operator-()'],['../namespaceflow_1_1perf.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::operator-()']]], - ['operator_2f_3d_16',['operator/=',['../structflow_1_1perf_1_1Duration__set.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::Duration_set::operator/=()'],['../namespaceflow_1_1perf.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::operator/=()']]], - ['operator_3c_3c_17',['operator<<',['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_info &stats)'],['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<()'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<()'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<(std::ostream &os, const Verbosity_config &val)'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<(std::ostream &os, Sev val)'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<(std::ostream &os, const Node_options &opts)'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#a3954beff8f73e2d6f566f4e15c30219c',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../structflow_1_1net__flow_1_1Node__options.html#a6a3a56f6379c0d5b075bc35f078f9e3d',1,'flow::net_flow::Node_options::operator<<()'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()']]], - ['operator_3d_18',['operator=',['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=(Blob_with_log_context &&moved_src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=(const Blob_with_log_context &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map const &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map &&src)'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set const &src)'],['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set &&src)'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()']]], + ['operator_2d_15',['operator-',['../structflow_1_1perf_1_1Time__pt__set.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::Time_pt_set::operator-()'],['../namespaceflow_1_1perf.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::operator-(const Time_pt_set &to, const Time_pt_set &from)']]], + ['operator_2f_3d_16',['operator/=',['../namespaceflow_1_1perf.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::operator/=()'],['../structflow_1_1perf_1_1Duration__set.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::Duration_set::operator/=()']]], + ['operator_3c_3c_17',['operator<<',['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_info &stats)'],['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options::Congestion_control_strategy_choice &strategy_choice)'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<()'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<(std::ostream &os, const Verbosity_config &val)'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<(std::ostream &os, Sev val)'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<(std::ostream &os, const Node_options &opts)'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#a3954beff8f73e2d6f566f4e15c30219c',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../structflow_1_1net__flow_1_1Node__options.html#a6a3a56f6379c0d5b075bc35f078f9e3d',1,'flow::net_flow::Node_options::operator<<()'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()']]], + ['operator_3d_18',['operator=',['../structflow_1_1util_1_1Noncopyable.html#a50501b7b5fcc26f2bcb4503c7b32a360',1,'flow::util::Noncopyable::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map const &src)'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=(Linked_hash_map &&src)'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set const &src)'],['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=(Linked_hash_set &&src)'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=()'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=()'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()']]], ['operator_3d_3d_19',['operator==',['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==()'],['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()']]], ['operator_3e_3e_20',['operator>>',['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>(std::istream &is, Sev &val)'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>(std::istream &is, Verbosity_config &val)'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()']]], ['operator_5b_5d_21',['operator[]',['../classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265',1,'flow::async::Op_list::operator[]()'],['../classflow_1_1util_1_1Linked__hash__map.html#a60d1d95f11148f7ed30a7dd92193563a',1,'flow::util::Linked_hash_map::operator[]()']]], @@ -31,10 +31,10 @@ var searchData= ['option_5fset_2ecpp_28',['option_set.cpp',['../option__set_8cpp.html',1,'']]], ['option_5fset_2ehpp_29',['option_set.hpp',['../option__set_8hpp.html',1,'']]], ['option_5fset_5fbase_30',['Option_set_base',['../classflow_1_1cfg_1_1Option__set__base.html',1,'flow::cfg']]], - ['options_31',['options',['../classflow_1_1net__flow_1_1Peer__socket.html#ad94e37c8cca01f801f13e9e0e0bc857d',1,'flow::net_flow::Peer_socket::options()'],['../classflow_1_1net__flow_1_1Node.html#a159b9c2b9a8a969f5e3715341c433aec',1,'flow::net_flow::Node::options()']]], + ['options_31',['options',['../classflow_1_1net__flow_1_1Node.html#a159b9c2b9a8a969f5e3715341c433aec',1,'flow::net_flow::Node::options()'],['../classflow_1_1net__flow_1_1Peer__socket.html#ad94e37c8cca01f801f13e9e0e0bc857d',1,'flow::net_flow::Peer_socket::options()']]], ['options_2ecpp_32',['options.cpp',['../options_8cpp.html',1,'']]], ['options_2ehpp_33',['options.hpp',['../options_8hpp.html',1,'']]], - ['options_5fdescription_34',['Options_description',['../structflow_1_1net__flow_1_1Node__options.html#af93781c0e8136a82e41080701719d996',1,'flow::net_flow::Node_options::Options_description()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad65db0c4fdf22bf5723dc3018174b4aa',1,'flow::net_flow::Peer_socket_options::Options_description()']]], + ['options_5fdescription_34',['Options_description',['../structflow_1_1net__flow_1_1Peer__socket__options.html#ad65db0c4fdf22bf5723dc3018174b4aa',1,'flow::net_flow::Peer_socket_options::Options_description()'],['../structflow_1_1net__flow_1_1Node__options.html#af93781c0e8136a82e41080701719d996',1,'flow::net_flow::Node_options::Options_description()']]], ['os_35',['os',['../classflow_1_1util_1_1String__ostream.html#a7e64b069ae0e221952068c13fdc0f080',1,'flow::util::String_ostream::os()'],['../classflow_1_1util_1_1String__ostream.html#aa727e60e370a7fab3148f5bf8c31ad99',1,'flow::util::String_ostream::os() const']]], ['ostream_5flog_5fmsg_5fwriter_36',['Ostream_log_msg_writer',['../classflow_1_1log_1_1Ostream__log__msg__writer.html',1,'flow::log::Ostream_log_msg_writer'],['../classflow_1_1log_1_1Ostream__log__msg__writer.html#a701b932c4f46f1edb96a975ad7076ccf',1,'flow::log::Ostream_log_msg_writer::Ostream_log_msg_writer()']]], ['ostream_5flog_5fmsg_5fwriter_2ecpp_37',['ostream_log_msg_writer.cpp',['../ostream__log__msg__writer_8cpp.html',1,'']]], diff --git a/doc/flow_doc/generated/html_public/search/classes_9.js b/doc/flow_doc/generated/html_public/search/classes_9.js index 9979b117a..d2d24ae8b 100644 --- a/doc/flow_doc/generated/html_public/search/classes_9.js +++ b/doc/flow_doc/generated/html_public/search/classes_9.js @@ -3,6 +3,7 @@ var searchData= ['net_5fenv_5fsimulator_0',['Net_env_simulator',['../classflow_1_1net__flow_1_1Net__env__simulator.html',1,'flow::net_flow']]], ['node_1',['Node',['../classflow_1_1net__flow_1_1asio_1_1Node.html',1,'flow::net_flow::asio::Node'],['../classflow_1_1net__flow_1_1Node.html',1,'flow::net_flow::Node']]], ['node_5foptions_2',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html',1,'flow::net_flow']]], - ['null_5finterface_3',['Null_interface',['../classflow_1_1util_1_1Null__interface.html',1,'flow::util']]], - ['null_5fvalue_5fset_4',['Null_value_set',['../structflow_1_1cfg_1_1Null__value__set.html',1,'flow::cfg']]] + ['noncopyable_3',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html',1,'flow::util']]], + ['null_5finterface_4',['Null_interface',['../classflow_1_1util_1_1Null__interface.html',1,'flow::util']]], + ['null_5fvalue_5fset_5',['Null_value_set',['../structflow_1_1cfg_1_1Null__value__set.html',1,'flow::cfg']]] ]; diff --git a/doc/flow_doc/generated/html_public/search/functions_c.js b/doc/flow_doc/generated/html_public/search/functions_c.js index c7d40b8ef..f63f1f258 100644 --- a/doc/flow_doc/generated/html_public/search/functions_c.js +++ b/doc/flow_doc/generated/html_public/search/functions_c.js @@ -3,11 +3,12 @@ var searchData= ['n_5fthreads_0',['n_threads',['../classflow_1_1async_1_1Segregated__thread__task__loop.html#a28d7c70f0d3147ba48a10afa84ef98c1',1,'flow::async::Segregated_thread_task_loop::n_threads()'],['../classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a2138f93d5fd11407973a7b7b13ca7353',1,'flow::async::Timed_concurrent_task_loop_impl::n_threads()'],['../classflow_1_1async_1_1Cross__thread__task__loop.html#a5c9a3da291fa961bb4d8c4be13c39bb8',1,'flow::async::Cross_thread_task_loop::n_threads()'],['../classflow_1_1async_1_1Concurrent__task__loop.html#a131335863b19446dbc349de181d4b5a1',1,'flow::async::Concurrent_task_loop::n_threads()']]], ['net_5fenv_5fsimulator_1',['Net_env_simulator',['../classflow_1_1net__flow_1_1Net__env__simulator.html#a29cbd6ad9be0d9bf7ac72a4e0675d4b8',1,'flow::net_flow::Net_env_simulator']]], ['newest_2',['newest',['../classflow_1_1util_1_1Linked__hash__map.html#a4b796f7ddb4dbc2f2e64ea25985d43b8',1,'flow::util::Linked_hash_map::newest()'],['../classflow_1_1util_1_1Linked__hash__set.html#ac2d182fa6a6b6814527477991bc6ca68',1,'flow::util::Linked_hash_set::newest()']]], - ['node_3',['node',['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()'],['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()']]], - ['node_4',['Node',['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()']]], + ['node_3',['Node',['../classflow_1_1net__flow_1_1Node.html#acd93ba39d6a9cdee60c2ad7da1085902',1,'flow::net_flow::Node::Node()'],['../classflow_1_1net__flow_1_1asio_1_1Node.html#a7db28ab33b1a9afcdcd1884e08f33bee',1,'flow::net_flow::asio::Node::Node()']]], + ['node_4',['node',['../classflow_1_1net__flow_1_1Server__socket.html#ae22e94978d59dfe23559a254349670bd',1,'flow::net_flow::Server_socket::node()'],['../classflow_1_1net__flow_1_1Peer__socket.html#aa9e7e1be830c901bc7348742e79ba2e7',1,'flow::net_flow::Peer_socket::node()'],['../classflow_1_1net__flow_1_1Event__set.html#aafa4275ad4f93ae274f7f88fd257ce33',1,'flow::net_flow::Event_set::node()']]], ['node_5foptions_5',['Node_options',['../structflow_1_1net__flow_1_1Node__options.html#a5e19fc9671473ace300d457f7334dc31',1,'flow::net_flow::Node_options']]], - ['now_6',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], - ['null_7',['null',['../structflow_1_1cfg_1_1Final__validator__func.html#aa930ac2fbe3ad6abc07994984f875c81',1,'flow::cfg::Final_validator_func::null()'],['../classflow_1_1cfg_1_1Option__set.html#accd086867406387070ac766b03e7998c',1,'flow::cfg::Option_set::null()']]], - ['null_5fdeclare_5fopts_5ffunc_8',['null_declare_opts_func',['../namespaceflow_1_1cfg.html#adfe41c8484a878742976ddb84aa9e2d8',1,'flow::cfg']]], - ['null_5ffinal_5fvalidator_5ffunc_9',['null_final_validator_func',['../namespaceflow_1_1cfg.html#af1a4e0a153ec8216ead76450e900e386',1,'flow::cfg']]] + ['noncopyable_6',['Noncopyable',['../structflow_1_1util_1_1Noncopyable.html#ac59627ad248129dd7b37d2d9286761cf',1,'flow::util::Noncopyable::Noncopyable()=default'],['../structflow_1_1util_1_1Noncopyable.html#a14a71cd2314f39996c2609ab383145e8',1,'flow::util::Noncopyable::Noncopyable(const Noncopyable &)=delete']]], + ['now_7',['now',['../classflow_1_1perf_1_1Checkpointing__timer.html#a3b73f2812c2bf6a27ef2becc13859d73',1,'flow::perf::Checkpointing_timer::now() const'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a3138f716f6f5b3973a5ed53f68a3c332',1,'flow::perf::Checkpointing_timer::now(Clock_type clock_type)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a019df7b02e8aed1e86002c8a7b40dcf7',1,'flow::perf::Checkpointing_timer::now(const Clock_types_subset &which_clocks)']]], + ['null_8',['null',['../structflow_1_1cfg_1_1Final__validator__func.html#aa930ac2fbe3ad6abc07994984f875c81',1,'flow::cfg::Final_validator_func::null()'],['../classflow_1_1cfg_1_1Option__set.html#accd086867406387070ac766b03e7998c',1,'flow::cfg::Option_set::null()']]], + ['null_5fdeclare_5fopts_5ffunc_9',['null_declare_opts_func',['../namespaceflow_1_1cfg.html#adfe41c8484a878742976ddb84aa9e2d8',1,'flow::cfg']]], + ['null_5ffinal_5fvalidator_5ffunc_10',['null_final_validator_func',['../namespaceflow_1_1cfg.html#af1a4e0a153ec8216ead76450e900e386',1,'flow::cfg']]] ]; diff --git a/doc/flow_doc/generated/html_public/search/functions_d.js b/doc/flow_doc/generated/html_public/search/functions_d.js index 2f75750b2..8dc88e883 100644 --- a/doc/flow_doc/generated/html_public/search/functions_d.js +++ b/doc/flow_doc/generated/html_public/search/functions_d.js @@ -12,9 +12,9 @@ var searchData= ['operator_2d_9',['operator-',['../structflow_1_1perf_1_1Time__pt__set.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::Time_pt_set::operator-()'],['../namespaceflow_1_1perf.html#af4b93cb0638c3d0bcfcf36903f0a3e46',1,'flow::perf::operator-()']]], ['operator_2f_3d_10',['operator/=',['../structflow_1_1perf_1_1Duration__set.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::Duration_set::operator/=()'],['../namespaceflow_1_1perf.html#aff603762f38b9e3e3d50b833e09c3f91',1,'flow::perf::operator/=()']]], ['operator_3c_3c_11',['operator<<',['../namespaceflow_1_1net__flow.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_send_stats &stats)'],['../namespaceflow_1_1net__flow.html#a5d6e84102fc55993f914ec64d04566bc',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow.html#a53102c8d63b1e7749104a263fb8574e8',1,'flow::net_flow::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1net__flow.html#a665ca8642963a22acdc07e901dd23ee4',1,'flow::net_flow::operator<<(std::ostream &os, const Node_options &opts)'],['../namespaceflow_1_1net__flow.html#ae43c5c856d519777fa381fc29b4bf581',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options &opts)'],['../namespaceflow_1_1net__flow.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_options::Congestion_control_strategy_choice &strategy_choice)'],['../namespaceflow_1_1net__flow.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::operator<<(std::ostream &os, Server_socket::State state)'],['../namespaceflow_1_1perf.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer::Checkpoint &checkpoint)'],['../namespaceflow_1_1perf.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::operator<<(std::ostream &os, const Checkpointing_timer &timer)'],['../namespaceflow_1_1perf.html#aa26027bcba9c000350811727f0a8fc21',1,'flow::perf::operator<<(std::ostream &os, Clock_type clock_type)'],['../namespaceflow_1_1perf.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::operator<<(std::ostream &os, const Duration_set &duration_set)'],['../namespaceflow_1_1net__flow.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::operator<<()'],['../namespaceflow_1_1cfg.html#af310e567f2763a9736eda686030e6311',1,'flow::cfg::operator<<(std::ostream &os, const Option_set< Value_set > &val)'],['../namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::operator<<(std::ostream &os, const Config_manager< S_d_value_set... > &val)'],['../namespaceflow_1_1cfg.html#a1d2b6ae24d103455dda888e796830b7d',1,'flow::cfg::operator<<(std::ostream &os, const Static_config_manager< Value_set > &val)'],['../namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501',1,'flow::log::operator<<(std::ostream &os, Sev val)'],['../namespaceflow_1_1log.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::operator<<(std::ostream &os, const Verbosity_config &val)'],['../namespaceflow_1_1net__flow_1_1asio.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Peer_socket *sock)'],['../namespaceflow_1_1net__flow_1_1asio.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::operator<<(std::ostream &os, const Server_socket *serv)'],['../namespaceflow_1_1net__flow.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::operator<<(std::ostream &os, const Remote_endpoint &endpoint)'],['../namespaceflow_1_1net__flow.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::State state)'],['../namespaceflow_1_1net__flow.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../namespaceflow_1_1net__flow.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::operator<<(std::ostream &os, const Peer_socket_receive_stats &stats)'],['../classflow_1_1cfg_1_1Option__set.html#acd1ce6e7c258d7486388915d59019880',1,'flow::cfg::Option_set::operator<<()'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a6d5b7cbbe0ec5133299f97148ef3eaa0',1,'flow::perf::Checkpointing_timer::operator<<()'],['../structflow_1_1perf_1_1Duration__set.html#a4cff304aa30be9d5810f90101d32b761',1,'flow::perf::Duration_set::operator<<()'],['../structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a5bb3a068357516df714c4266ec5c3df4',1,'flow::perf::Checkpointing_timer::Checkpoint::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#a48bc8803c67e75b955a1f2778a8ad2bf',1,'flow::net_flow::Server_socket::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#ab9f537c84f77e9b8fa742fc5dc6d5693',1,'flow::net_flow::Peer_socket_options::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::asio::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1asio_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::asio::Peer_socket::operator<<()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a84e207ad5dc52f3832b5a5f73c75e11e',1,'flow::net_flow::Remote_endpoint::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__info.html#a13391099a7662dbbef0a2ea171d1e7e9',1,'flow::net_flow::Peer_socket_info::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket__send__stats.html#a98357cf7d8e29ec9dd34bd11ab382108',1,'flow::net_flow::Peer_socket_send_stats::operator<<()'],['../structflow_1_1net__flow_1_1Peer__socket__receive__stats.html#a26fb85d618cb12e9ee1b22f52bdfcaa5',1,'flow::net_flow::Peer_socket_receive_stats::operator<<()'],['../classflow_1_1net__flow_1_1Server__socket.html#acbbe4fae58626a54fabdcd4bcdfdb011',1,'flow::net_flow::Server_socket::operator<<()'],['../classflow_1_1net__flow_1_1Peer__socket.html#a8497776b61df32a79707c264f8f2422b',1,'flow::net_flow::Peer_socket::operator<<()'],['../classflow_1_1net__flow_1_1Event__set.html#ac57b16fd356cacb8432a8ce7b021b54c',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::Event_type ev_type)'],['../classflow_1_1net__flow_1_1Event__set.html#aebbf2b8f19e2b3d887fe234cd5bdcffc',1,'flow::net_flow::Event_set::operator<<(std::ostream &os, Event_set::State state)'],['../classflow_1_1log_1_1Verbosity__config.html#a8cf08ca4573526c68e0164a6915b6e44',1,'flow::log::Verbosity_config::operator<<()'],['../classflow_1_1cfg_1_1Static__config__manager.html#a9e86f85d749892c9e55ae74e07e48a35',1,'flow::cfg::Static_config_manager::operator<<()'],['../classflow_1_1cfg_1_1Config__manager.html#a453d83bf1e8b57b1aaff511fbe913ecc',1,'flow::cfg::Config_manager::operator<<()']]], - ['operator_3d_12',['operator=',['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=(const Blob_with_log_context &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=(Blob_with_log_context &&moved_src)'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete']]], + ['operator_3d_12',['operator=',['../classflow_1_1util_1_1Linked__hash__set.html#add06f0744ac3838635500262c96282cd',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1log_1_1Config.html#a60c9a16ebb764e4fcc4208a55c2e785d',1,'flow::log::Config::operator=(const Config &)=delete'],['../classflow_1_1log_1_1Config.html#ac8a787b8026d84814bf4edcc91432447',1,'flow::log::Config::operator=(Config &&)=delete'],['../classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e',1,'flow::log::Component::operator=(const Component &src)'],['../classflow_1_1log_1_1Component.html#ae0587562779694526b8dd1e8f7012494',1,'flow::log::Component::operator=(Payload new_payload)'],['../classflow_1_1log_1_1Component.html#a78dc45840c6fb12bd53784f7ea277ab4',1,'flow::log::Component::operator=(Component &&src_moved)'],['../classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308',1,'flow::log::Log_context::operator=()'],['../classflow_1_1util_1_1Scoped__setter.html#aa4464d1c39413033a0e457a494363bce',1,'flow::util::Scoped_setter::operator=(const Scoped_setter &)=delete'],['../classflow_1_1util_1_1Scoped__setter.html#ae0dcbc446c250933940ead3cb589c1eb',1,'flow::util::Scoped_setter::operator=(Scoped_setter &&)=delete'],['../structflow_1_1util_1_1Noncopyable.html#a50501b7b5fcc26f2bcb4503c7b32a360',1,'flow::util::Noncopyable::operator=()'],['../classflow_1_1util_1_1Unique__id__holder.html#abb6bab931f868d2a2e933d94f7540b1c',1,'flow::util::Unique_id_holder::operator=()'],['../classflow_1_1util_1_1Linked__hash__map.html#aa05f597ec2dcb9fd1d50ff40ca482232',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e',1,'flow::log::Log_context::operator=()'],['../classflow_1_1util_1_1Basic__string__view.html#a29622c65bafdae826514a625262b0fba',1,'flow::util::Basic_string_view::operator=()'],['../classflow_1_1util_1_1Linked__hash__set.html#a8fc7b499be6563aff0f8bded23c05fb0',1,'flow::util::Linked_hash_set::operator=()'],['../classflow_1_1util_1_1Linked__hash__map.html#acdba28273d24b962c76b1926a93d9772',1,'flow::util::Linked_hash_map::operator=()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a6961a2450106669479bcc8dd2061bc2c',1,'flow::util::Blob_with_log_context::operator=(const Blob_with_log_context &src)'],['../classflow_1_1util_1_1Blob__with__log__context.html#a73f4a5d64cf770a043d9591cd1f8e26f',1,'flow::util::Blob_with_log_context::operator=(Blob_with_log_context &&moved_src)'],['../classflow_1_1util_1_1Basic__blob.html#a72eda661d71306c2fbd0422993922309',1,'flow::util::Basic_blob::operator=(const Basic_blob &src)'],['../classflow_1_1util_1_1Basic__blob.html#a151d35b3c35219089d53061503841b75',1,'flow::util::Basic_blob::operator=(Basic_blob &&moved_src)'],['../classflow_1_1perf_1_1Checkpointing__timer.html#a4c26ee75e58df6abc3b59083f920897c',1,'flow::perf::Checkpointing_timer::operator=(Checkpointing_timer &&)=delete'],['../classflow_1_1perf_1_1Checkpointing__timer.html#ac8c6a294890c7b59b79555c8116be552',1,'flow::perf::Checkpointing_timer::operator=(const Checkpointing_timer &)=delete']]], ['operator_3d_3d_13',['operator==',['../namespaceflow_1_1log.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::operator==()'],['../namespaceflow_1_1net__flow.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::operator==()'],['../structflow_1_1net__flow_1_1Remote__endpoint.html#a8504aeca20f41a8f2b98ae04803a600e',1,'flow::net_flow::Remote_endpoint::operator==()'],['../classflow_1_1log_1_1Verbosity__config.html#abfd655adc908d249fe66baf6e8e426e6',1,'flow::log::Verbosity_config::operator==()']]], - ['operator_3e_3e_14',['operator>>',['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>()'],['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>()']]], + ['operator_3e_3e_14',['operator>>',['../namespaceflow_1_1net__flow.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::operator>>()'],['../classflow_1_1log_1_1Verbosity__config.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::Verbosity_config::operator>>()'],['../structflow_1_1net__flow_1_1Peer__socket__options.html#aad968d3e7e9c3f284bea03e799d5fbc0',1,'flow::net_flow::Peer_socket_options::operator>>()'],['../namespaceflow_1_1log.html#ab7770a6970cce952c422c27f0bf57d8d',1,'flow::log::operator>>(std::istream &is, Verbosity_config &val)'],['../namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056',1,'flow::log::operator>>(std::istream &is, Sev &val)']]], ['operator_5b_5d_15',['operator[]',['../classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265',1,'flow::async::Op_list::operator[]()'],['../classflow_1_1util_1_1Linked__hash__map.html#a60d1d95f11148f7ed30a7dd92193563a',1,'flow::util::Linked_hash_map::operator[]()']]], ['ops_5fsequence_16',['ops_sequence',['../classflow_1_1async_1_1Op__list.html#a70726f4c547b813687419f3c7cc9f977',1,'flow::async::Op_list']]], ['optimal_5fworker_5fthread_5fcount_5fper_5fpool_17',['optimal_worker_thread_count_per_pool',['../namespaceflow_1_1async.html#ac2f32e9fc685e2e9013900b100321fff',1,'flow::async']]], diff --git a/doc/flow_doc/generated/html_public/search/typedefs_2.js b/doc/flow_doc/generated/html_public/search/typedefs_2.js index 7dbff8abf..82d4b040e 100644 --- a/doc/flow_doc/generated/html_public/search/typedefs_2.js +++ b/doc/flow_doc/generated/html_public/search/typedefs_2.js @@ -6,10 +6,10 @@ var searchData= ['component_5fsev_5fpair_5fseq_3',['Component_sev_pair_seq',['../classflow_1_1log_1_1Verbosity__config.html#ad90642c12d92b59954114a06c22217da',1,'flow::log::Verbosity_config']]], ['component_5fto_5funion_5fidx_5ffunc_4',['Component_to_union_idx_func',['../classflow_1_1log_1_1Config.html#a8d5fa60a6334b988ec54ef1d68763f7c',1,'flow::log::Config']]], ['component_5funion_5fidx_5ft_5',['component_union_idx_t',['../classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d',1,'flow::log::Config']]], - ['const_5fiterator_6',['Const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context']]], - ['const_5fiterator_7',['const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()']]], - ['const_5fiterator_8',['Const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()']]], - ['const_5fiterator_9',['const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context']]], + ['const_5fiterator_6',['const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#a04d832dee0d6f9e060dec9f40d81f4f7',1,'flow::util::Blob_with_log_context']]], + ['const_5fiterator_7',['Const_iterator',['../classflow_1_1util_1_1Linked__hash__set.html#a57f3367e577133372e20341f4c4f6413',1,'flow::util::Linked_hash_set::Const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2185f193ced2c3c0bf566b06f54b7c83',1,'flow::util::Linked_hash_map::Const_iterator()'],['../classflow_1_1util_1_1Basic__blob.html#a3e21c26d61b50e019987097f7779ed51',1,'flow::util::Basic_blob::Const_iterator()']]], + ['const_5fiterator_8',['const_iterator',['../classflow_1_1util_1_1Basic__blob.html#a527a63b2de0a165bb63296935aee954c',1,'flow::util::Basic_blob::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__map.html#a2b5383264c89ac63cc8827b18063f2ca',1,'flow::util::Linked_hash_map::const_iterator()'],['../classflow_1_1util_1_1Linked__hash__set.html#a09f6834d99cc4ad91bf0e386c4ade4a7',1,'flow::util::Linked_hash_set::const_iterator()']]], + ['const_5fiterator_9',['Const_iterator',['../classflow_1_1util_1_1Blob__with__log__context.html#af1649a4983f8c6b5d435779c45ce947c',1,'flow::util::Blob_with_log_context']]], ['const_5fpointer_10',['const_pointer',['../classflow_1_1util_1_1Basic__blob.html#ab73d1c26268670495dda161f95d33ec1',1,'flow::util::Basic_blob::const_pointer()'],['../classflow_1_1util_1_1Blob__with__log__context.html#a950e0692366572312b48ba56d98668ae',1,'flow::util::Blob_with_log_context::const_pointer()'],['../classflow_1_1util_1_1Linked__hash__map.html#a657eef8b8299a7c87d48a6e373a6db3a',1,'flow::util::Linked_hash_map::const_pointer()'],['../classflow_1_1util_1_1Linked__hash__set.html#a9c16ed9c8ac77595d66f3d1593ed0a4d',1,'flow::util::Linked_hash_set::const_pointer()']]], ['const_5fptr_11',['Const_ptr',['../classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886',1,'flow::util::Shared_ptr_alias_holder']]], ['const_5freference_12',['const_reference',['../classflow_1_1util_1_1Basic__blob.html#a8b5a94572c51f89991987ca9f5bcf2b2',1,'flow::util::Basic_blob::const_reference()'],['../classflow_1_1util_1_1Blob__with__log__context.html#ac4ed9c11ae020e314ce51c46dbb14afd',1,'flow::util::Blob_with_log_context::const_reference()'],['../classflow_1_1util_1_1Linked__hash__map.html#a82d0a782f7dee3fefaae51e85d05657b',1,'flow::util::Linked_hash_map::const_reference()'],['../classflow_1_1util_1_1Linked__hash__set.html#a39f45d5e6ea44d01a3921116c76e3043',1,'flow::util::Linked_hash_set::const_reference()']]], diff --git a/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8cpp.html index a4cc54b63..abacdd1a4 100644 --- a/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8cpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8hpp.html index 8bda8ff1f..4d3de5653 100644 --- a/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_public/segregated__thread__task__loop_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/server__socket_8cpp.html b/doc/flow_doc/generated/html_public/server__socket_8cpp.html index 0be9572ab..2390e5beb 100644 --- a/doc/flow_doc/generated/html_public/server__socket_8cpp.html +++ b/doc/flow_doc/generated/html_public/server__socket_8cpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/server__socket_8hpp.html b/doc/flow_doc/generated/html_public/server__socket_8hpp.html index e8a4f4ede..c2a411183 100644 --- a/doc/flow_doc/generated/html_public/server__socket_8hpp.html +++ b/doc/flow_doc/generated/html_public/server__socket_8hpp.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_public/shared__ptr__alias__holder_8hpp.html b/doc/flow_doc/generated/html_public/shared__ptr__alias__holder_8hpp.html index f6941fd2c..c7fb15f00 100644 --- a/doc/flow_doc/generated/html_public/shared__ptr__alias__holder_8hpp.html +++ b/doc/flow_doc/generated/html_public/shared__ptr__alias__holder_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/simple__ostream__logger_8cpp.html b/doc/flow_doc/generated/html_public/simple__ostream__logger_8cpp.html index 02041e99b..9a796718a 100644 --- a/doc/flow_doc/generated/html_public/simple__ostream__logger_8cpp.html +++ b/doc/flow_doc/generated/html_public/simple__ostream__logger_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/simple__ostream__logger_8hpp.html b/doc/flow_doc/generated/html_public/simple__ostream__logger_8hpp.html index fdccabb8e..178c834be 100644 --- a/doc/flow_doc/generated/html_public/simple__ostream__logger_8hpp.html +++ b/doc/flow_doc/generated/html_public/simple__ostream__logger_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/single__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_public/single__thread__task__loop_8cpp.html index 6e76e2926..7fc859f9c 100644 --- a/doc/flow_doc/generated/html_public/single__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_public/single__thread__task__loop_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/single__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_public/single__thread__task__loop_8hpp.html index 6a3116e5d..47bfd5de0 100644 --- a/doc/flow_doc/generated/html_public/single__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_public/single__thread__task__loop_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/static__cfg__manager_8hpp.html b/doc/flow_doc/generated/html_public/static__cfg__manager_8hpp.html index be2dcd5c0..8da943299 100644 --- a/doc/flow_doc/generated/html_public/static__cfg__manager_8hpp.html +++ b/doc/flow_doc/generated/html_public/static__cfg__manager_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/string__ostream_8cpp.html b/doc/flow_doc/generated/html_public/string__ostream_8cpp.html index 552ddc033..747acfe38 100644 --- a/doc/flow_doc/generated/html_public/string__ostream_8cpp.html +++ b/doc/flow_doc/generated/html_public/string__ostream_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/string__ostream_8hpp.html b/doc/flow_doc/generated/html_public/string__ostream_8hpp.html index 9dab06428..39bc6ba5f 100644 --- a/doc/flow_doc/generated/html_public/string__ostream_8hpp.html +++ b/doc/flow_doc/generated/html_public/string__ostream_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/string__view_8hpp.html b/doc/flow_doc/generated/html_public/string__view_8hpp.html index 5ed5e1053..96f97626c 100644 --- a/doc/flow_doc/generated/html_public/string__view_8hpp.html +++ b/doc/flow_doc/generated/html_public/string__view_8hpp.html @@ -100,7 +100,7 @@ diff --git a/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html b/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html index 90b9973c8..fbf341aaa 100644 --- a/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html +++ b/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4-members.html @@ -77,7 +77,7 @@ diff --git a/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html b/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html index 2c161ccab..3bd3b57c3 100644 --- a/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html +++ b/doc/flow_doc/generated/html_public/structboost_1_1system_1_1is__error__code__enum_3_1_1flow_1_1net__flow_1_1error_1_1Code_01_4.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html index 570b9bc04..6a4c6f56c 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html index b02687d12..3af3b8571 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Config__manager_1_1On__dynamic__change__func__handle.html @@ -99,7 +99,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func-members.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func-members.html index e7b076db2..bc92dc01f 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func.html index c86a5b62f..68543b120 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Final__validator__func.html @@ -158,7 +158,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set-members.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set-members.html index 299657b60..d4b1ea02e 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set.html index f92f835ed..5e859c52a 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Null__value__set.html @@ -125,7 +125,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html index 1d2f529f0..20cb5c3ca 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args-members.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html index 7ce30d80c..4c873fa01 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1cfg_1_1Option__set_1_1Declare__options__func__args.html @@ -275,7 +275,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html index bf67e3875..8c8ab64ef 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html index 43eedbefd..1ffada8ed 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Async__file__logger_1_1Throttling__cfg.html @@ -144,7 +144,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata-members.html b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata-members.html index a978ebdf0..a529befa2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata-members.html @@ -84,7 +84,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata.html b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata.html index e4875242b..011e2c6be 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1log_1_1Msg__metadata.html @@ -221,7 +221,7 @@

                                                                                                                                                                                                                                                Perf rationale: Why not use const char* instead?

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options-members.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options-members.html index 58f07bb08..90c2a2825 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options-members.html @@ -88,7 +88,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options.html index c93d41013..9933312b2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Node__options.html @@ -321,7 +321,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info-members.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info-members.html index a2e6dd51a..c6e615a00 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info-members.html @@ -111,7 +111,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info.html index 2de8e6d47..e1f387039 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__info.html @@ -531,7 +531,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options-members.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options-members.html index d75dacd15..0bb1cfc2e 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options-members.html @@ -113,7 +113,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options.html index 47684698b..05d4be140 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__options.html @@ -784,7 +784,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html index 8be21e9a2..7f580d71c 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats-members.html @@ -116,7 +116,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html index 0d3212bba..4180b7082 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Peer__socket__receive__stats.html @@ -424,7 +424,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint-members.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint-members.html index 934fe5edf..e8219df02 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint-members.html @@ -82,7 +82,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint.html b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint.html index 7d9fbbb48..c61ad6ea2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1net__flow_1_1Remote__endpoint.html @@ -275,7 +275,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html index 43e1688ea..231efc6bb 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint-members.html @@ -79,7 +79,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html index e368a704c..cdc38a4c5 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html @@ -179,7 +179,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set-members.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set-members.html index c33182917..92bff65c2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set-members.html @@ -81,7 +81,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set.html index 939a8c018..04d372cb2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Duration__set.html @@ -303,7 +303,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set-members.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set-members.html index 70201b76f..bb465a691 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set-members.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set-members.html @@ -78,7 +78,7 @@ diff --git a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set.html b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set.html index 58fa5101c..87079e4e2 100644 --- a/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set.html +++ b/doc/flow_doc/generated/html_public/structflow_1_1perf_1_1Time__pt__set.html @@ -151,7 +151,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable-members.html b/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable-members.html new file mode 100644 index 000000000..650c54b53 --- /dev/null +++ b/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable-members.html @@ -0,0 +1,85 @@ + + + + + + + +Flow: Member List + + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Flow 1.0.2 +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Flow project: Public API.
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                flow::util::Noncopyable Member List
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                This is the complete list of members for flow::util::Noncopyable, including all inherited members.

                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                Noncopyable()=defaultflow::util::Noncopyable
                                                                                                                                                                                                                                                Noncopyable(const Noncopyable &)=deleteflow::util::Noncopyable
                                                                                                                                                                                                                                                operator=(const Noncopyable &)=deleteflow::util::Noncopyable
                                                                                                                                                                                                                                                + + + + diff --git a/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable.html b/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable.html new file mode 100644 index 000000000..3f3bf4e74 --- /dev/null +++ b/doc/flow_doc/generated/html_public/structflow_1_1util_1_1Noncopyable.html @@ -0,0 +1,111 @@ + + + + + + + +Flow: flow::util::Noncopyable Struct Reference + + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Flow 1.0.2 +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Flow project: Public API.
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                flow::util::Noncopyable Struct Reference
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). + More...

                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                #include <util.hpp>

                                                                                                                                                                                                                                                + + + + + + + + + + + +

                                                                                                                                                                                                                                                +Public Member Functions

                                                                                                                                                                                                                                                Noncopyable ()=default
                                                                                                                                                                                                                                                 Makes it possible to instantiate.
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                Noncopyable (const Noncopyable &)=delete
                                                                                                                                                                                                                                                 Forbid copying.
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                +void operator= (const Noncopyable &)=delete
                                                                                                                                                                                                                                                 Forbid copying.
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Detailed Description

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized).

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                So you can do: [[no_unique_address]] flow::util::Noncopyable m_nc{};.

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Rationale

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                The usual technique of deriving from boost::noncopyable disables aggregateness. In C++20 declaring a = delete copy ctor also disables it. This trick still works though.

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                The documentation for this struct was generated from the following file: +
                                                                                                                                                                                                                                                + + + + diff --git a/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8cpp.html b/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8cpp.html index f1c7c4224..b1a3392aa 100644 --- a/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8hpp.html b/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8hpp.html index 500ccdf8d..b86b178e2 100644 --- a/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_public/timed__concurrent__task__loop_8hpp.html @@ -95,7 +95,7 @@ diff --git a/doc/flow_doc/generated/html_public/timed__function_8hpp.html b/doc/flow_doc/generated/html_public/timed__function_8hpp.html index c9ee0095c..27d84f9fa 100644 --- a/doc/flow_doc/generated/html_public/timed__function_8hpp.html +++ b/doc/flow_doc/generated/html_public/timed__function_8hpp.html @@ -97,7 +97,7 @@ diff --git a/doc/flow_doc/generated/html_public/timed__handler_8hpp.html b/doc/flow_doc/generated/html_public/timed__handler_8hpp.html index 67ae7dd37..a5eb145b5 100644 --- a/doc/flow_doc/generated/html_public/timed__handler_8hpp.html +++ b/doc/flow_doc/generated/html_public/timed__handler_8hpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/todo.html b/doc/flow_doc/generated/html_public/todo.html index fdf89a600..b7eee85a5 100644 --- a/doc/flow_doc/generated/html_public/todo.html +++ b/doc/flow_doc/generated/html_public/todo.html @@ -210,7 +210,7 @@ diff --git a/doc/flow_doc/generated/html_public/traits_8hpp.html b/doc/flow_doc/generated/html_public/traits_8hpp.html index e59168d05..362ccba8c 100644 --- a/doc/flow_doc/generated/html_public/traits_8hpp.html +++ b/doc/flow_doc/generated/html_public/traits_8hpp.html @@ -107,7 +107,7 @@ diff --git a/doc/flow_doc/generated/html_public/uniq__id__holder_8cpp.html b/doc/flow_doc/generated/html_public/uniq__id__holder_8cpp.html index 1ae074712..4e3738e8a 100644 --- a/doc/flow_doc/generated/html_public/uniq__id__holder_8cpp.html +++ b/doc/flow_doc/generated/html_public/uniq__id__holder_8cpp.html @@ -85,7 +85,7 @@ diff --git a/doc/flow_doc/generated/html_public/uniq__id__holder_8hpp.html b/doc/flow_doc/generated/html_public/uniq__id__holder_8hpp.html index 1b17f60ca..48e72f8f2 100644 --- a/doc/flow_doc/generated/html_public/uniq__id__holder_8hpp.html +++ b/doc/flow_doc/generated/html_public/uniq__id__holder_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/util_2util_8hpp.html b/doc/flow_doc/generated/html_public/util_2util_8hpp.html index 26b3784d7..069c483f9 100644 --- a/doc/flow_doc/generated/html_public/util_2util_8hpp.html +++ b/doc/flow_doc/generated/html_public/util_2util_8hpp.html @@ -80,6 +80,9 @@ class  flow::util::Null_interface  An empty interface, consisting of nothing but a default virtual destructor, intended as a boiler-plate-reducing base for any other (presumably virtual-method-having) class that would otherwise require a default virtual destructor. More...
                                                                                                                                                                                                                                                  +struct  flow::util::Noncopyable + Useful as a no-unique-address private member to make a type noncopyable while keeping that type an aggregate (can be direct-initialized). More...
                                                                                                                                                                                                                                                +  class  flow::util::Scoped_setter< Value >  A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value. More...
                                                                                                                                                                                                                                                  @@ -175,7 +178,7 @@ diff --git a/doc/flow_doc/generated/html_public/util_8cpp.html b/doc/flow_doc/generated/html_public/util_8cpp.html index ee76bc7f3..038429aba 100644 --- a/doc/flow_doc/generated/html_public/util_8cpp.html +++ b/doc/flow_doc/generated/html_public/util_8cpp.html @@ -98,7 +98,7 @@ diff --git a/doc/flow_doc/generated/html_public/util__fwd_8hpp.html b/doc/flow_doc/generated/html_public/util__fwd_8hpp.html index c33ec61c1..514a69a56 100644 --- a/doc/flow_doc/generated/html_public/util__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/util__fwd_8hpp.html @@ -402,7 +402,7 @@

                                                                                                                                                                                                                                                diff --git a/doc/flow_doc/generated/html_public/verbosity__config_8cpp.html b/doc/flow_doc/generated/html_public/verbosity__config_8cpp.html index d187e45b1..2cd7f3526 100644 --- a/doc/flow_doc/generated/html_public/verbosity__config_8cpp.html +++ b/doc/flow_doc/generated/html_public/verbosity__config_8cpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_public/verbosity__config_8hpp.html b/doc/flow_doc/generated/html_public/verbosity__config_8hpp.html index d773ddd0f..6ffae5281 100644 --- a/doc/flow_doc/generated/html_public/verbosity__config_8hpp.html +++ b/doc/flow_doc/generated/html_public/verbosity__config_8hpp.html @@ -92,7 +92,7 @@ diff --git a/doc/flow_doc/generated/html_public/verbosity__config__fwd_8hpp.html b/doc/flow_doc/generated/html_public/verbosity__config__fwd_8hpp.html index 88a4b0cef..8efa262ca 100644 --- a/doc/flow_doc/generated/html_public/verbosity__config__fwd_8hpp.html +++ b/doc/flow_doc/generated/html_public/verbosity__config__fwd_8hpp.html @@ -101,7 +101,7 @@ diff --git a/doc/flow_doc/generated/html_public/x__thread__task__loop_8cpp.html b/doc/flow_doc/generated/html_public/x__thread__task__loop_8cpp.html index 48ef6c3e2..4c47382bd 100644 --- a/doc/flow_doc/generated/html_public/x__thread__task__loop_8cpp.html +++ b/doc/flow_doc/generated/html_public/x__thread__task__loop_8cpp.html @@ -93,7 +93,7 @@ diff --git a/doc/flow_doc/generated/html_public/x__thread__task__loop_8hpp.html b/doc/flow_doc/generated/html_public/x__thread__task__loop_8hpp.html index f51d00df8..0add423fb 100644 --- a/doc/flow_doc/generated/html_public/x__thread__task__loop_8hpp.html +++ b/doc/flow_doc/generated/html_public/x__thread__task__loop_8hpp.html @@ -92,7 +92,7 @@